mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-22 07:29:03 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d326ec831c | |||
| faac5b45c6 | |||
| 5e930a7717 | |||
| aff5e22843 | |||
| 344a8dc0a0 | |||
| 7576432e44 | |||
| 3ddc753c88 | |||
| d3a7414e51 | |||
| 1406c81e03 | |||
| 0f28fefc82 | |||
| 496b124baf | |||
| 5a5445e980 | |||
| eecdd3acda | |||
| c66df8c807 |
@@ -1 +1 @@
|
||||
v1.7.0
|
||||
v1.7.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
v1.7.1
|
||||
v1.7.2
|
||||
|
||||
@@ -221,6 +221,7 @@ set(CPPSRC
|
||||
ui/ui_freqlist.cpp
|
||||
ui/ui_tv.cpp
|
||||
ui/ui_spectrum.cpp
|
||||
ui/ui_styles.cpp
|
||||
ui/ui_tabview.cpp
|
||||
ui/ui_textentry.cpp
|
||||
ui/ui_transmitter.cpp
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace ui {
|
||||
|
||||
/* AMOptionsView *********************************************************/
|
||||
|
||||
static const Style& style_options_group = Styles::bg_blue;
|
||||
|
||||
AMOptionsView::AMOptionsView(
|
||||
const Rect parent_rect,
|
||||
const Style* const style)
|
||||
|
||||
@@ -28,18 +28,12 @@
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_spectrum.hpp"
|
||||
#include "ui_record_view.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "app_settings.hpp"
|
||||
#include "tone_key.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
constexpr Style style_options_group{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::blue(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
class AMOptionsView : public View {
|
||||
public:
|
||||
AMOptionsView(const Rect parent_rect, const Style* const style);
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace ui {
|
||||
|
||||
/* AnalogTvView *******************************************************/
|
||||
|
||||
static const Style& style_options_group_new = Styles::bg_blue;
|
||||
|
||||
AnalogTvView::AnalogTvView(
|
||||
NavigationView& nav)
|
||||
: nav_(nav) {
|
||||
|
||||
@@ -29,19 +29,13 @@
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_tv.hpp"
|
||||
#include "ui_record_view.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "app_settings.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "tone_key.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
constexpr Style style_options_group_new{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::blue(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
class AnalogTvView : public View {
|
||||
public:
|
||||
AnalogTvView(NavigationView& nav);
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "rfm69.hpp"
|
||||
|
||||
#include "message.hpp"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_geomap.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "string_format.hpp"
|
||||
|
||||
#include "file.hpp"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "ui_textentry.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
|
||||
#include "message.hpp"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "ui_tabview.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "bht.hpp"
|
||||
#include "bitmap.hpp"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "message.hpp"
|
||||
#include "transmitter_model.hpp"
|
||||
|
||||
@@ -381,10 +381,54 @@ DebugMenuView::DebugMenuView(NavigationView& nav) {
|
||||
{"Peripherals", ui::Color::dark_cyan(), &bitmap_icon_peripherals, [&nav]() { nav.push<DebugPeripheralsMenuView>(); }},
|
||||
{"Temperature", ui::Color::dark_cyan(), &bitmap_icon_temperature, [&nav]() { nav.push<TemperatureView>(); }},
|
||||
{"Buttons Test", ui::Color::dark_cyan(), &bitmap_icon_controls, [&nav]() { nav.push<DebugControlsView>(); }},
|
||||
{"Pmem", ui::Color::dark_cyan(), &bitmap_icon_memory, [&nav]() { nav.push<DebugPmemView>(); }},
|
||||
});
|
||||
set_max_rows(2); // allow wider buttons
|
||||
}
|
||||
|
||||
/* DebugPmemView *********************************************************/
|
||||
|
||||
DebugPmemView::DebugPmemView(NavigationView& nav)
|
||||
: data{*reinterpret_cast<pmem_data*>(memory::map::backup_ram.base())}, registers_widget(RegistersWidgetConfig{page_size, 8}, std::bind(&DebugPmemView::registers_widget_feed, this, std::placeholders::_1)) {
|
||||
static_assert(sizeof(pmem_data) == memory::map::backup_ram.size());
|
||||
|
||||
add_children({&text_page, ®isters_widget, &text_checksum, &button_ok});
|
||||
|
||||
registers_widget.set_parent_rect({0, 32, 240, 192});
|
||||
|
||||
text_checksum.set("Size: " + to_string_dec_uint(portapack::persistent_memory::data_size()) + " CRC: " + to_string_hex(data.check_value, 8));
|
||||
|
||||
button_ok.on_select = [&nav](Button&) {
|
||||
nav.pop();
|
||||
};
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
bool DebugPmemView::on_encoder(const EncoderEvent delta) {
|
||||
page = std::max(0l, std::min((int32_t)page_max, page + delta));
|
||||
|
||||
update();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void DebugPmemView::focus() {
|
||||
button_ok.focus();
|
||||
}
|
||||
|
||||
void DebugPmemView::update() {
|
||||
text_page.set(to_string_hex(page_size * page, 2) + "+");
|
||||
registers_widget.update();
|
||||
}
|
||||
|
||||
uint32_t DebugPmemView::registers_widget_feed(const size_t register_number) {
|
||||
if (page_size * page + register_number >= memory::map::backup_ram.size()) {
|
||||
return 0xff;
|
||||
}
|
||||
return data.regfile[(page_size * page + register_number) / 4] >> (register_number % 4 * 8);
|
||||
}
|
||||
|
||||
/*DebugLCRView::DebugLCRView(NavigationView& nav, std::string lcr_string) {
|
||||
|
||||
std::string debug_text;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "rffc507x.hpp"
|
||||
#include "portapack.hpp"
|
||||
#include "memory_map.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
@@ -263,6 +264,41 @@ class DebugControlsView : public View {
|
||||
"Done"};
|
||||
};
|
||||
|
||||
class DebugPmemView : public View {
|
||||
public:
|
||||
DebugPmemView(NavigationView& nav);
|
||||
void focus() override;
|
||||
bool on_encoder(const EncoderEvent delta) override;
|
||||
std::string title() const override { return "Pmem"; }
|
||||
|
||||
private:
|
||||
struct pmem_data {
|
||||
uint32_t regfile[63];
|
||||
uint32_t check_value;
|
||||
};
|
||||
|
||||
static constexpr uint8_t page_size{96}; // Must be multiply of 4 otherwise bit shifting for register view wont work properly
|
||||
static constexpr uint8_t page_max{(portapack::memory::map::backup_ram.size() + page_size - 1) / page_size - 1};
|
||||
|
||||
int32_t page{0};
|
||||
|
||||
const pmem_data& data;
|
||||
|
||||
Text text_page{{16, 16, 208, 16}};
|
||||
|
||||
RegistersWidget registers_widget;
|
||||
|
||||
Text text_checksum{{16, 240, 208, 16}};
|
||||
|
||||
Button button_ok{
|
||||
{240 / 3, 270, 240 / 3, 24},
|
||||
"OK",
|
||||
};
|
||||
|
||||
void update();
|
||||
uint32_t registers_widget_feed(const size_t register_number);
|
||||
};
|
||||
|
||||
/*class DebugLCRView : public View {
|
||||
public:
|
||||
DebugLCRView(NavigationView& nav, std::string lcrstring);
|
||||
|
||||
@@ -195,17 +195,6 @@ class EncodersView : public View {
|
||||
void start_tx(const bool scan);
|
||||
void on_tx_progress(const uint32_t progress, const bool done);
|
||||
|
||||
/*const Style style_address {
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
const Style style_data {
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::blue(),
|
||||
};*/
|
||||
|
||||
Rect view_rect = {0, 4 * 8, 240, 168};
|
||||
|
||||
EncodersConfigView view_config{nav_, view_rect};
|
||||
|
||||
@@ -29,29 +29,21 @@ using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
|
||||
static int32_t last_category_id{0};
|
||||
static int32_t current_category_id = 0;
|
||||
|
||||
FreqManBaseView::FreqManBaseView(
|
||||
NavigationView& nav)
|
||||
: nav_(nav) {
|
||||
file_list = get_freqman_files();
|
||||
|
||||
add_children({&label_category,
|
||||
add_children({&options_category,
|
||||
&label_category,
|
||||
&button_exit});
|
||||
|
||||
if (file_list.size()) {
|
||||
add_child(&options_category);
|
||||
populate_categories();
|
||||
} else
|
||||
error_ = ERROR_NOFILES;
|
||||
|
||||
// initialize
|
||||
change_category(last_category_id);
|
||||
|
||||
// Default function
|
||||
on_change_category = [this](int32_t category_id) {
|
||||
refresh_list();
|
||||
options_category.on_change = [this](size_t category_id, int32_t) {
|
||||
change_category(category_id);
|
||||
};
|
||||
options_category.set_selected_index(current_category_id);
|
||||
|
||||
button_exit.on_select = [this, &nav](Button&) {
|
||||
nav.pop();
|
||||
@@ -70,8 +62,39 @@ void FreqManBaseView::focus() {
|
||||
}
|
||||
}
|
||||
|
||||
void FreqManBaseView::populate_categories() {
|
||||
void FreqManBaseView::get_freqman_files() {
|
||||
std::vector<std::string>().swap(file_list);
|
||||
|
||||
auto files = scan_root_files(u"FREQMAN", u"*.TXT");
|
||||
|
||||
for (auto file : files) {
|
||||
std::string file_name = file.stem().string();
|
||||
// don't propose tmp / hidden files in freqman's list
|
||||
if (file_name.length() && file_name[0] != '.') {
|
||||
file_list.emplace_back(file_name);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void FreqManBaseView::change_category(int32_t category_id) {
|
||||
current_category_id = category_id;
|
||||
|
||||
if (file_list.empty()) return;
|
||||
|
||||
std::vector<freqman_entry>().swap(database);
|
||||
|
||||
if (!load_freqman_file(file_list[categories[category_id].second], database)) {
|
||||
error_ = ERROR_ACCESS;
|
||||
}
|
||||
menu_view.set_db(database);
|
||||
text_empty.hidden(!database.empty());
|
||||
menu_view.set_dirty();
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
void FreqManBaseView::refresh_list() {
|
||||
categories.clear();
|
||||
get_freqman_files();
|
||||
|
||||
for (size_t n = 0; n < file_list.size(); n++)
|
||||
categories.emplace_back(std::make_pair(file_list[n].substr(0, 14), n));
|
||||
@@ -82,56 +105,13 @@ void FreqManBaseView::populate_categories() {
|
||||
});
|
||||
|
||||
options_category.set_options(categories);
|
||||
options_category.set_selected_index(last_category_id);
|
||||
|
||||
options_category.on_change = [this](size_t category_id, int32_t) {
|
||||
if (on_change_category)
|
||||
on_change_category(category_id);
|
||||
};
|
||||
}
|
||||
|
||||
void FreqManBaseView::change_category(int32_t category_id) {
|
||||
if (!file_list.size()) return;
|
||||
|
||||
last_category_id = current_category_id = category_id;
|
||||
|
||||
std::vector<freqman_entry>().swap(database);
|
||||
menu_view.set_db(database);
|
||||
|
||||
if (!load_freqman_file(file_list[categories[current_category_id].second], database))
|
||||
error_ = ERROR_ACCESS;
|
||||
else {
|
||||
menu_view.set_db(database);
|
||||
refresh_list();
|
||||
}
|
||||
}
|
||||
|
||||
void FreqManBaseView::refresh_list() {
|
||||
if (!database.size()) {
|
||||
if (on_refresh_widgets)
|
||||
on_refresh_widgets(true);
|
||||
} else {
|
||||
if (on_refresh_widgets)
|
||||
on_refresh_widgets(false);
|
||||
}
|
||||
if ((unsigned)current_category_id >= categories.size())
|
||||
current_category_id = categories.size() - 1;
|
||||
}
|
||||
|
||||
void FrequencySaveView::save_current_file() {
|
||||
if (database.size() > FREQMAN_MAX_PER_FILE) {
|
||||
nav_.display_modal(
|
||||
"Error", "Too many entries, maximum is\n" FREQMAN_MAX_PER_FILE_STR ". Trim list ?",
|
||||
YESNO,
|
||||
[this](bool choice) {
|
||||
if (choice) {
|
||||
database.resize(FREQMAN_MAX_PER_FILE);
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
}
|
||||
nav_.pop();
|
||||
});
|
||||
} else {
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
nav_.pop();
|
||||
}
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
nav_.pop();
|
||||
}
|
||||
|
||||
void FrequencySaveView::on_save_name() {
|
||||
@@ -155,11 +135,11 @@ FrequencySaveView::FrequencySaveView(
|
||||
|
||||
// Todo: add back ?
|
||||
/*for (size_t n = 0; n < database.size(); n++) {
|
||||
if (database[n].value == value_) {
|
||||
error_ = ERROR_DUPLICATE;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
if (database[n].value == value_) {
|
||||
error_ = ERROR_DUPLICATE;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
add_children({&labels,
|
||||
&big_display,
|
||||
@@ -175,6 +155,11 @@ FrequencySaveView::FrequencySaveView(
|
||||
button_save_timestamp.on_select = [this, &nav](Button&) {
|
||||
on_save_timestamp();
|
||||
};
|
||||
|
||||
options_category.on_change = [this, value](size_t category_id, int32_t) {
|
||||
change_category(category_id);
|
||||
big_display.set(value);
|
||||
};
|
||||
}
|
||||
|
||||
void FrequencyLoadView::refresh_widgets(const bool v) {
|
||||
@@ -197,9 +182,6 @@ FrequencyLoadView::FrequencyLoadView(
|
||||
// Resize menu view to fill screen
|
||||
menu_view.set_parent_rect({0, 3 * 8, 240, 30 * 8});
|
||||
|
||||
change_category(last_category_id);
|
||||
refresh_list();
|
||||
|
||||
menu_view.on_select = [&nav, this](FreqManUIList&) {
|
||||
nav_.pop();
|
||||
|
||||
@@ -223,14 +205,14 @@ FrequencyLoadView::FrequencyLoadView(
|
||||
void FrequencyManagerView::on_edit_freq(rf::Frequency f) {
|
||||
database[menu_view.get_index()].frequency_a = f;
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
refresh_list();
|
||||
change_category(current_category_id);
|
||||
}
|
||||
|
||||
void FrequencyManagerView::on_edit_desc(NavigationView& nav) {
|
||||
text_prompt(nav, desc_buffer, 28, [this](std::string& buffer) {
|
||||
database[menu_view.get_index()].description = buffer;
|
||||
refresh_list();
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
change_category(current_category_id);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -238,23 +220,30 @@ void FrequencyManagerView::on_new_category(NavigationView& nav) {
|
||||
text_prompt(nav, desc_buffer, 12, [this](std::string& buffer) {
|
||||
File freqman_file;
|
||||
create_freqman_file(buffer, freqman_file);
|
||||
refresh_list();
|
||||
change_category(current_category_id);
|
||||
});
|
||||
populate_categories();
|
||||
refresh_list();
|
||||
}
|
||||
|
||||
void FrequencyManagerView::on_delete() {
|
||||
database.erase(database.begin() + menu_view.get_index());
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
refresh_list();
|
||||
if (database.empty()) {
|
||||
delete_freqman_file(file_list[categories[current_category_id].second]);
|
||||
refresh_list();
|
||||
} else {
|
||||
database.erase(database.begin() + menu_view.get_index());
|
||||
save_freqman_file(file_list[categories[current_category_id].second], database);
|
||||
}
|
||||
change_category(current_category_id);
|
||||
}
|
||||
|
||||
void FrequencyManagerView::refresh_widgets(const bool v) {
|
||||
button_edit_freq.hidden(v);
|
||||
button_edit_desc.hidden(v);
|
||||
button_delete.hidden(v);
|
||||
menu_view.hidden(v);
|
||||
text_empty.hidden(!v);
|
||||
menu_view.hidden(v);
|
||||
menu_view.set_dirty();
|
||||
labels.hidden(v);
|
||||
// display.fill_rectangle(menu_view.screen_rect(), Color::black());
|
||||
set_dirty();
|
||||
}
|
||||
@@ -278,9 +267,6 @@ FrequencyManagerView::FrequencyManagerView(
|
||||
&button_edit_desc,
|
||||
&button_delete});
|
||||
|
||||
change_category(last_category_id);
|
||||
refresh_list();
|
||||
|
||||
menu_view.on_select = [this](FreqManUIList&) {
|
||||
button_edit_freq.focus();
|
||||
};
|
||||
@@ -291,6 +277,9 @@ FrequencyManagerView::FrequencyManagerView(
|
||||
};
|
||||
|
||||
button_edit_freq.on_select = [this, &nav](Button&) {
|
||||
if (database.empty()) {
|
||||
database.push_back({0, 0, "", SINGLE});
|
||||
}
|
||||
auto new_view = nav.push<FrequencyKeypadView>(database[menu_view.get_index()].frequency_a);
|
||||
new_view->on_changed = [this](rf::Frequency f) {
|
||||
on_edit_freq(f);
|
||||
@@ -298,16 +287,15 @@ FrequencyManagerView::FrequencyManagerView(
|
||||
};
|
||||
|
||||
button_edit_desc.on_select = [this, &nav](Button&) {
|
||||
if (database.empty()) {
|
||||
database.push_back({0, 0, "", SINGLE});
|
||||
}
|
||||
desc_buffer = database[menu_view.get_index()].description;
|
||||
on_edit_desc(nav);
|
||||
};
|
||||
|
||||
button_delete.on_select = [this, &nav](Button&) {
|
||||
nav.push<ModalMessageView>("Confirm", "Are you sure ?", YESNO,
|
||||
[this](bool choice) {
|
||||
if (choice)
|
||||
on_delete();
|
||||
});
|
||||
on_delete();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -46,17 +46,15 @@ class FreqManBaseView : public View {
|
||||
NavigationView& nav_;
|
||||
freqman_error error_{NO_ERROR};
|
||||
options_t categories{};
|
||||
std::function<void(int32_t category_id)> on_change_category{nullptr};
|
||||
std::function<void(void)> on_select_frequency{nullptr};
|
||||
std::function<void(bool)> on_refresh_widgets{nullptr};
|
||||
std::vector<std::string> file_list{};
|
||||
int32_t current_category_id{0};
|
||||
|
||||
void populate_categories();
|
||||
void get_freqman_files();
|
||||
void change_category(int32_t category_id);
|
||||
void refresh_list();
|
||||
|
||||
freqman_db database{};
|
||||
std::vector<std::string> file_list{};
|
||||
|
||||
Labels label_category{
|
||||
{{0, 4}, "Category:", Color::light_grey()}};
|
||||
@@ -75,8 +73,10 @@ class FreqManBaseView : public View {
|
||||
};
|
||||
|
||||
Button button_exit{
|
||||
{20 * 8, 34 * 8, 10 * 8, 4 * 8},
|
||||
{16 * 8, 34 * 8, 14 * 8, 4 * 8},
|
||||
"Exit"};
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class FrequencySaveView : public FreqManBaseView {
|
||||
@@ -154,7 +154,7 @@ class FrequencyManagerView : public FreqManBaseView {
|
||||
"Description"};
|
||||
|
||||
Button button_delete{
|
||||
{18 * 8, 27 * 8, 12 * 8, 32},
|
||||
{16 * 8, 29 * 8, 14 * 8, 32},
|
||||
"Delete"};
|
||||
};
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ void RangeView::focus() {
|
||||
check_enabled.focus();
|
||||
}
|
||||
|
||||
extern constexpr Style RangeView::style_info;
|
||||
|
||||
void RangeView::update_start(rf::Frequency f) {
|
||||
// Change everything except max
|
||||
frequency_range.min = f;
|
||||
@@ -200,9 +198,6 @@ void JammerView::set_jammer_channel(uint32_t i, uint32_t width, uint64_t center,
|
||||
jammer_channels[i].duration = 30720 * duration;
|
||||
}
|
||||
|
||||
extern constexpr Style JammerView::style_val;
|
||||
extern constexpr Style JammerView::style_cancel;
|
||||
|
||||
void JammerView::start_tx() {
|
||||
uint32_t c, i = 0;
|
||||
size_t num_channels;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_tabview.hpp"
|
||||
#include "transmitter_model.hpp"
|
||||
@@ -52,11 +52,7 @@ class RangeView : public View {
|
||||
uint32_t width{};
|
||||
rf::Frequency center{};
|
||||
|
||||
static constexpr Style style_info{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
const Style& style_info = Styles::grey;
|
||||
|
||||
Labels labels{
|
||||
{{2 * 8, 8 * 8 + 4}, "Start", Color::light_grey()},
|
||||
@@ -117,16 +113,8 @@ class JammerView : public View {
|
||||
int16_t mscounter = 0; // euquiq: Internal ms counter for do_timer()
|
||||
lfsr_word_t lfsr_v = 1; // euquiq: Used to generate "random" Jitter
|
||||
|
||||
static constexpr Style style_val{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
static constexpr Style style_cancel{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
const Style& style_val = Styles::green;
|
||||
const Style& style_cancel = Styles::red;
|
||||
|
||||
RangeView view_range_a{nav_};
|
||||
RangeView view_range_b{nav_};
|
||||
|
||||
@@ -151,8 +151,8 @@ LevelView::LevelView(NavigationView& nav)
|
||||
// FILL STEP OPTIONS
|
||||
freqman_set_modulation_option(field_mode);
|
||||
freqman_set_step_option_short(step_mode);
|
||||
freq_stats_rssi.set_style(&style_white);
|
||||
freq_stats_db.set_style(&style_white);
|
||||
freq_stats_rssi.set_style(&Styles::white);
|
||||
freq_stats_db.set_style(&Styles::white);
|
||||
}
|
||||
|
||||
void LevelView::on_statistics_update(const ChannelStatistics& statistics) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "ui.hpp"
|
||||
#include "receiver_model.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "freqman.hpp"
|
||||
#include "analog_audio_app.hpp"
|
||||
#include "audio.hpp"
|
||||
@@ -48,48 +48,6 @@ class LevelView : public View {
|
||||
|
||||
void focus() override;
|
||||
|
||||
const Style style_grey{
|
||||
// level
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
|
||||
const Style style_white{
|
||||
// level
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const Style style_yellow{
|
||||
// Found signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::yellow(),
|
||||
};
|
||||
|
||||
const Style style_green{
|
||||
// Found signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
|
||||
const Style style_red{
|
||||
// erasing freq
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
|
||||
const Style style_blue{
|
||||
// quick level, wait == 0
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::blue(),
|
||||
};
|
||||
|
||||
std::string title() const override { return "Level"; };
|
||||
|
||||
private:
|
||||
|
||||
@@ -490,11 +490,11 @@ GlassView::GlassView(
|
||||
button_range.on_select = [this](Button&) {
|
||||
if (locked_range) {
|
||||
locked_range = false;
|
||||
button_range.set_style(&style_white);
|
||||
button_range.set_style(&Styles::white);
|
||||
button_range.set_text(" " + to_string_dec_uint(search_span) + " ");
|
||||
} else {
|
||||
locked_range = true;
|
||||
button_range.set_style(&style_red);
|
||||
button_range.set_style(&Styles::red);
|
||||
button_range.set_text(">" + to_string_dec_uint(search_span) + "<");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "string_format.hpp"
|
||||
#include "analog_audio_app.hpp"
|
||||
#include "spectrum_color_lut.hpp"
|
||||
@@ -74,20 +75,6 @@ class GlassView : public View {
|
||||
std::string label{};
|
||||
};
|
||||
|
||||
const Style style_white{
|
||||
// free range
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const Style style_red{
|
||||
// locked range
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
|
||||
std::vector<preset_entry> presets_db{};
|
||||
void clip_min(int32_t v);
|
||||
void clip_max(int32_t v);
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "rtc_time.hpp"
|
||||
#include "clock_manager.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
@@ -63,11 +62,6 @@ class NumbersStationView : public View {
|
||||
SIGNOFF
|
||||
};
|
||||
|
||||
Style style_red{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red()};
|
||||
|
||||
typedef struct {
|
||||
char code;
|
||||
uint32_t index;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
|
||||
@@ -55,23 +55,23 @@ void ReconView::reset_indexes() {
|
||||
void ReconView::colorize_waits() {
|
||||
// colorize wait on match
|
||||
if (wait == 0) {
|
||||
field_wait.set_style(&style_blue);
|
||||
field_wait.set_style(&Styles::blue);
|
||||
} else if (wait >= 500) {
|
||||
field_wait.set_style(&style_white);
|
||||
field_wait.set_style(&Styles::white);
|
||||
} else if (wait > -500 && wait < 500) {
|
||||
field_wait.set_style(&style_red);
|
||||
field_wait.set_style(&Styles::red);
|
||||
} else if (wait <= -500) {
|
||||
field_wait.set_style(&style_green);
|
||||
field_wait.set_style(&Styles::green);
|
||||
}
|
||||
// colorize lock time if in SPARSE mode as in continuous the lock_wait time is disarmed at first lock count
|
||||
if (recon_match_mode == RECON_MATCH_SPARSE) {
|
||||
if ((recon_lock_duration / STATS_UPDATE_INTERVAL) <= recon_lock_nb_match) {
|
||||
field_lock_wait.set_style(&style_yellow);
|
||||
field_lock_wait.set_style(&Styles::yellow);
|
||||
} else {
|
||||
field_lock_wait.set_style(&style_white);
|
||||
field_lock_wait.set_style(&Styles::white);
|
||||
}
|
||||
} else {
|
||||
field_lock_wait.set_style(&style_white);
|
||||
field_lock_wait.set_style(&Styles::white);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,17 +263,17 @@ void ReconView::recon_redraw() {
|
||||
text_nb_locks.set(to_string_dec_uint(freq_lock) + "/" + to_string_dec_uint(recon_lock_nb_match));
|
||||
if (freq_lock == 0) {
|
||||
// NO FREQ LOCK, ONGOING STANDARD SCANNING
|
||||
big_display.set_style(&style_white);
|
||||
big_display.set_style(&Styles::white);
|
||||
if (recon)
|
||||
button_pause.set_text("<PAUSE>");
|
||||
else
|
||||
button_pause.set_text("<RESUME>");
|
||||
} else if (freq_lock == 1 && recon_lock_nb_match != 1) {
|
||||
// STARTING LOCK FREQ
|
||||
big_display.set_style(&style_yellow);
|
||||
big_display.set_style(&Styles::yellow);
|
||||
button_pause.set_text("<SKPLCK>");
|
||||
} else if (freq_lock >= recon_lock_nb_match) {
|
||||
big_display.set_style(&style_green);
|
||||
big_display.set_style(&Styles::green);
|
||||
button_pause.set_text("<UNLOCK>");
|
||||
// FREQ IS STRONG: GREEN and recon will pause when on_statistics_update()
|
||||
if ((!scanner_mode) && autosave && frequency_list.size() > 0) {
|
||||
@@ -716,18 +716,18 @@ ReconView::ReconView(NavigationView& nav)
|
||||
|
||||
frequency_list.push_back(manual_freq_entry);
|
||||
|
||||
big_display.set_style(&style_white); // Back to white color
|
||||
big_display.set_style(&Styles::white); // Back to white color
|
||||
|
||||
freq_stats.set_style(&style_white);
|
||||
freq_stats.set_style(&Styles::white);
|
||||
freq_stats.set("0/0/0");
|
||||
|
||||
text_cycle.set_text("1");
|
||||
text_max.set("/1");
|
||||
button_scanner_mode.set_style(&style_white);
|
||||
button_scanner_mode.set_style(&Styles::white);
|
||||
button_scanner_mode.set_text("MSEARCH");
|
||||
file_name.set_style(&style_white);
|
||||
file_name.set_style(&Styles::white);
|
||||
file_name.set("MANUAL RANGE RECON");
|
||||
desc_cycle.set_style(&style_white);
|
||||
desc_cycle.set_style(&Styles::white);
|
||||
|
||||
last_entry.modulation = -1;
|
||||
last_entry.bandwidth = -1;
|
||||
@@ -767,12 +767,12 @@ ReconView::ReconView(NavigationView& nav)
|
||||
recon_resume();
|
||||
}
|
||||
if (scanner_mode) {
|
||||
file_name.set_style(&style_red);
|
||||
button_scanner_mode.set_style(&style_red);
|
||||
file_name.set_style(&Styles::red);
|
||||
button_scanner_mode.set_style(&Styles::red);
|
||||
button_scanner_mode.set_text("SCANNER");
|
||||
} else {
|
||||
file_name.set_style(&style_blue);
|
||||
button_scanner_mode.set_style(&style_blue);
|
||||
file_name.set_style(&Styles::blue);
|
||||
button_scanner_mode.set_style(&Styles::blue);
|
||||
button_scanner_mode.set_text("RECON");
|
||||
}
|
||||
};
|
||||
@@ -792,12 +792,12 @@ ReconView::ReconView(NavigationView& nav)
|
||||
manual_mode = false;
|
||||
if (scanner_mode) {
|
||||
scanner_mode = false;
|
||||
button_scanner_mode.set_style(&style_blue);
|
||||
button_scanner_mode.set_style(&Styles::blue);
|
||||
button_scanner_mode.set_text("RECON");
|
||||
button_remove.set_text("DELETE");
|
||||
} else {
|
||||
scanner_mode = true;
|
||||
button_scanner_mode.set_style(&style_red);
|
||||
button_scanner_mode.set_style(&Styles::red);
|
||||
button_scanner_mode.set_text("SCANNER");
|
||||
button_scanner_mode.set_text("REMOVE");
|
||||
}
|
||||
@@ -861,7 +861,7 @@ ReconView::ReconView(NavigationView& nav)
|
||||
};
|
||||
|
||||
// PRE-CONFIGURATION:
|
||||
button_scanner_mode.set_style(&style_blue);
|
||||
button_scanner_mode.set_style(&Styles::blue);
|
||||
button_scanner_mode.set_text("RECON");
|
||||
file_name.set("=>");
|
||||
|
||||
@@ -907,31 +907,31 @@ void ReconView::frequency_file_load(bool stop_all_before) {
|
||||
std::string file_input = input_file; // default recon mode
|
||||
if (scanner_mode) {
|
||||
file_input = output_file;
|
||||
file_name.set_style(&style_red);
|
||||
button_scanner_mode.set_style(&style_red);
|
||||
file_name.set_style(&Styles::red);
|
||||
button_scanner_mode.set_style(&Styles::red);
|
||||
button_scanner_mode.set_text("SCANNER");
|
||||
} else {
|
||||
file_name.set_style(&style_blue);
|
||||
button_scanner_mode.set_style(&style_blue);
|
||||
file_name.set_style(&Styles::blue);
|
||||
button_scanner_mode.set_style(&Styles::blue);
|
||||
button_scanner_mode.set_text("RECON");
|
||||
}
|
||||
desc_cycle.set_style(&style_white);
|
||||
desc_cycle.set_style(&Styles::white);
|
||||
if (!load_freqman_file_ex(file_input, frequency_list, load_freqs, load_ranges, load_hamradios, RECON_FREQMAN_MAX_PER_FILE)) {
|
||||
file_name.set_style(&style_red);
|
||||
desc_cycle.set_style(&style_red);
|
||||
file_name.set_style(&Styles::red);
|
||||
desc_cycle.set_style(&Styles::red);
|
||||
desc_cycle.set(" NO " + file_input + ".TXT FILE ...");
|
||||
file_name.set("=> NO DATA");
|
||||
} else {
|
||||
file_name.set("=> " + file_input);
|
||||
if (frequency_list.size() == 0) {
|
||||
file_name.set_style(&style_red);
|
||||
desc_cycle.set_style(&style_red);
|
||||
file_name.set_style(&Styles::red);
|
||||
desc_cycle.set_style(&Styles::red);
|
||||
desc_cycle.set("/0 no entries in list");
|
||||
file_name.set("BadOrEmpty " + file_input);
|
||||
} else {
|
||||
if (frequency_list.size() > RECON_FREQMAN_MAX_PER_FILE) {
|
||||
file_name.set_style(&style_yellow);
|
||||
desc_cycle.set_style(&style_yellow);
|
||||
file_name.set_style(&Styles::yellow);
|
||||
desc_cycle.set_style(&Styles::yellow);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ void ReconView::on_statistics_update(const ChannelStatistics& statistics) {
|
||||
continuous_lock = false;
|
||||
freq_lock = 0;
|
||||
timer = recon_lock_duration;
|
||||
big_display.set_style(&style_white);
|
||||
big_display.set_style(&Styles::white);
|
||||
}
|
||||
if (freq_lock < recon_lock_nb_match) // LOCKING
|
||||
{
|
||||
@@ -1239,7 +1239,7 @@ void ReconView::recon_pause() {
|
||||
|
||||
audio_output_start();
|
||||
|
||||
big_display.set_style(&style_white);
|
||||
big_display.set_style(&Styles::white);
|
||||
button_pause.set_text("<RESUME>"); // PAUSED, show resume
|
||||
}
|
||||
|
||||
@@ -1251,7 +1251,7 @@ void ReconView::recon_resume() {
|
||||
|
||||
audio::output::stop();
|
||||
|
||||
big_display.set_style(&style_white);
|
||||
big_display.set_style(&Styles::white);
|
||||
button_pause.set_text("<PAUSE>");
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "ui.hpp"
|
||||
#include "receiver_model.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "freqman.hpp"
|
||||
#include "analog_audio_app.hpp"
|
||||
#include "audio.hpp"
|
||||
@@ -53,48 +53,6 @@ class ReconView : public View {
|
||||
|
||||
void focus() override;
|
||||
|
||||
const Style style_grey{
|
||||
// recon
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
|
||||
const Style style_white{
|
||||
// recon
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const Style style_yellow{
|
||||
// found signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::yellow(),
|
||||
};
|
||||
|
||||
const Style style_green{
|
||||
// Found signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
|
||||
const Style style_red{
|
||||
// erasing freq
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
|
||||
const Style style_blue{
|
||||
// quick recon, wait == 0
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::blue(),
|
||||
};
|
||||
|
||||
std::string title() const override { return "Recon"; };
|
||||
|
||||
// void set_parent_rect(const Rect new_parent_rect) override;
|
||||
|
||||
@@ -179,16 +179,16 @@ void ScannerView::bigdisplay_update(int32_t v) {
|
||||
|
||||
switch (bigdisplay_current_color) {
|
||||
case BDC_GREY:
|
||||
big_display.set_style(&style_grey);
|
||||
big_display.set_style(&Styles::grey);
|
||||
break;
|
||||
case BDC_YELLOW:
|
||||
big_display.set_style(&style_yellow);
|
||||
big_display.set_style(&Styles::yellow);
|
||||
break;
|
||||
case BDC_GREEN:
|
||||
big_display.set_style(&style_green);
|
||||
big_display.set_style(&Styles::green);
|
||||
break;
|
||||
case BDC_RED:
|
||||
big_display.set_style(&style_red);
|
||||
big_display.set_style(&Styles::red);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -254,10 +254,10 @@ void ScannerView::show_max_index() { // show total number of freqs to scan
|
||||
text_current_index.set("---");
|
||||
|
||||
if (frequency_list.size() == FREQMAN_MAX_PER_FILE) {
|
||||
text_max_index.set_style(&style_red);
|
||||
text_max_index.set_style(&Styles::red);
|
||||
text_max_index.set("/ " + to_string_dec_uint(FREQMAN_MAX_PER_FILE) + " (DB MAX!)");
|
||||
} else {
|
||||
text_max_index.set_style(&style_grey);
|
||||
text_max_index.set_style(&Styles::grey);
|
||||
text_max_index.set("/ " + to_string_dec_uint(frequency_list.size()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "ui.hpp"
|
||||
#include "receiver_model.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "freqman.hpp"
|
||||
#include "analog_audio_app.hpp"
|
||||
#include "audio.hpp"
|
||||
@@ -87,34 +87,6 @@ class ScannerView : public View {
|
||||
|
||||
void focus() override;
|
||||
|
||||
const Style style_grey{
|
||||
// scanning
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
|
||||
const Style style_yellow{
|
||||
// Found signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::dark_yellow(),
|
||||
};
|
||||
|
||||
const Style style_green{
|
||||
// Found signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
|
||||
const Style style_red{
|
||||
// erasing freq
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
|
||||
std::string title() const override { return "Scanner"; };
|
||||
std::vector<rf::Frequency> frequency_list{};
|
||||
std::vector<string> description_list{};
|
||||
|
||||
@@ -117,7 +117,7 @@ void SearchView::do_detection() {
|
||||
recent_entries_view.set_dirty();
|
||||
|
||||
text_infos.set("Locked ! ");
|
||||
big_display.set_style(&style_locked);
|
||||
big_display.set_style(&Styles::green);
|
||||
|
||||
locked = true;
|
||||
locked_bin = bin_max;
|
||||
@@ -152,7 +152,7 @@ void SearchView::do_detection() {
|
||||
recent_entries_view.set_dirty();
|
||||
|
||||
text_infos.set("Listening");
|
||||
big_display.set_style(&style_grey);
|
||||
big_display.set_style(&Styles::grey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,11 +362,11 @@ SearchView::SearchView(
|
||||
nav.push<FrequencyKeypadView>(entry.frequency);
|
||||
};
|
||||
|
||||
text_mean.set_style(&style_grey);
|
||||
text_slices.set_style(&style_grey);
|
||||
text_rate.set_style(&style_grey);
|
||||
progress_timers.set_style(&style_grey);
|
||||
big_display.set_style(&style_grey);
|
||||
text_mean.set_style(&Styles::grey);
|
||||
text_slices.set_style(&Styles::grey);
|
||||
text_rate.set_style(&Styles::grey);
|
||||
progress_timers.set_style(&Styles::grey);
|
||||
big_display.set_style(&Styles::grey);
|
||||
|
||||
check_snap.set_value(true);
|
||||
options_snap.set_selected_index(1); // 12.5kHz
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "spectrum_color_lut.hpp"
|
||||
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "recent_entries.hpp"
|
||||
|
||||
namespace ui {
|
||||
@@ -90,19 +90,6 @@ class SearchView : public View {
|
||||
private:
|
||||
NavigationView& nav_;
|
||||
|
||||
const Style style_grey{
|
||||
// For informations and lost signal
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
|
||||
const Style style_locked{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
|
||||
struct slice_t {
|
||||
rf::Frequency center_frequency;
|
||||
uint8_t max_power;
|
||||
|
||||
@@ -36,7 +36,7 @@ using portapack::receiver_model;
|
||||
using namespace portapack;
|
||||
|
||||
#include "string_format.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "cpld_update.hpp"
|
||||
|
||||
#include "freqman.hpp"
|
||||
@@ -129,9 +129,9 @@ SetRadioView::SetRadioView(
|
||||
value_source.set(source_name);
|
||||
value_source_frequency.set(to_string_dec_uint(reference.frequency / 1000000, 2) + "." + to_string_dec_uint((reference.frequency % 1000000) / 100, 4, '0') + " MHz");
|
||||
|
||||
label_source.set_style(&style_text);
|
||||
value_source.set_style(&style_text);
|
||||
value_source_frequency.set_style(&style_text);
|
||||
label_source.set_style(&Styles::light_grey);
|
||||
value_source.set_style(&Styles::light_grey);
|
||||
value_source_frequency.set_style(&Styles::light_grey);
|
||||
|
||||
add_children({
|
||||
&label_source,
|
||||
@@ -169,7 +169,7 @@ SetRadioView::SetRadioView(
|
||||
};
|
||||
|
||||
field_clkout_freq.set_value(portapack::persistent_memory::clkout_freq());
|
||||
value_freq_step.set_style(&style_text);
|
||||
value_freq_step.set_style(&Styles::light_grey);
|
||||
|
||||
field_clkout_freq.on_select = [this](NumberField&) {
|
||||
freq_step_khz++;
|
||||
|
||||
@@ -127,11 +127,6 @@ class SetRadioView : public View {
|
||||
std::string title() const override { return "Radio"; };
|
||||
|
||||
private:
|
||||
const Style style_text{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::light_grey(),
|
||||
};
|
||||
uint8_t freq_step_khz = 3;
|
||||
|
||||
Text label_source{
|
||||
|
||||
@@ -131,9 +131,9 @@ SIGFRXView::SIGFRXView(
|
||||
&text_data,
|
||||
&button_exit});
|
||||
|
||||
text_type.set_style(&style_white);
|
||||
text_channel.set_style(&style_white);
|
||||
text_data.set_style(&style_white);
|
||||
text_type.set_style(&Styles::bg_white);
|
||||
text_channel.set_style(&Styles::bg_white);
|
||||
text_data.set_style(&Styles::bg_white);
|
||||
|
||||
button_exit.on_select = [&nav](Button&) {
|
||||
nav.pop();
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_menu.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "clock_manager.hpp"
|
||||
#include "message.hpp"
|
||||
#include "rf_path.hpp"
|
||||
@@ -50,11 +50,6 @@ class SIGFRXView : public View {
|
||||
uint8_t last_channel;
|
||||
uint8_t detect_counter = 0;
|
||||
|
||||
const Style style_white{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::white(),
|
||||
.foreground = Color::black()};
|
||||
|
||||
const uint16_t sigfrx_marks[18] = {
|
||||
10, 8, 0,
|
||||
60, 52, 90,
|
||||
|
||||
@@ -234,14 +234,14 @@ std::vector<uint8_t> SpectrumInputImageView::get_line(uint16_t y) {
|
||||
grey_buffer[px] = color.to_greyscale();
|
||||
}
|
||||
|
||||
delete buffer;
|
||||
delete[] buffer;
|
||||
|
||||
std::vector<uint8_t> values(width);
|
||||
for (int i = 0; i < width; i++) {
|
||||
values[i] = grey_buffer[i];
|
||||
}
|
||||
|
||||
delete grey_buffer;
|
||||
delete[] grey_buffer;
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "ui_spectrum_painter_text.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "cpld_update.hpp"
|
||||
#include "bmp.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "io_file.hpp"
|
||||
#include "file.hpp"
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
|
||||
@@ -42,21 +42,17 @@ bool ScreenshotViewer::on_key(KeyEvent) {
|
||||
void ScreenshotViewer::paint(Painter& painter) {
|
||||
constexpr size_t pixel_width = 240;
|
||||
constexpr size_t pixel_height = 320;
|
||||
Style style_default{
|
||||
.font = ui::font::fixed_8x16,
|
||||
.background = ui::Color::black(),
|
||||
.foreground = ui::Color::white()};
|
||||
File file{};
|
||||
|
||||
painter.fill_rectangle({0, 0, pixel_width, pixel_height}, Color::black());
|
||||
|
||||
auto show_invalid = [&]() {
|
||||
painter.draw_string({10, 160}, style_default, "Not a valid screenshot.");
|
||||
painter.draw_string({10, 160}, Styles::white, "Not a valid screenshot.");
|
||||
};
|
||||
|
||||
auto error = file.open(path_);
|
||||
if (error) {
|
||||
painter.draw_string({10, 160}, style_default, error->what());
|
||||
painter.draw_string({10, 160}, Styles::white, error->what());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "ui.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "file.hpp"
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
#include "message.hpp"
|
||||
|
||||
@@ -205,7 +205,7 @@ void TextViewer::paint_text(Painter& painter, uint32_t line, uint16_t col) {
|
||||
if (result && *result > 0)
|
||||
painter.draw_string(
|
||||
{0, r.top() + (int)i * char_height},
|
||||
style_text, {buffer, *result});
|
||||
Styles::white_small, {buffer, *result});
|
||||
|
||||
// Clear empty line sections. This is less visually jarring than full clear.
|
||||
int32_t clear_width = max_col - (result ? *result : 0);
|
||||
@@ -214,7 +214,7 @@ void TextViewer::paint_text(Painter& painter, uint32_t line, uint16_t col) {
|
||||
{(max_col - clear_width) * char_width,
|
||||
r.top() + (int)i * char_height,
|
||||
clear_width * char_width, char_height},
|
||||
style_text.background);
|
||||
Styles::white_small.background);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,8 +235,8 @@ void TextViewer::paint_cursor(Painter& painter) {
|
||||
};
|
||||
|
||||
// Clear old cursor. CONSIDER: XOR cursor?
|
||||
draw_cursor(paint_state_.line, paint_state_.col, style_text.background);
|
||||
draw_cursor(cursor_.line, cursor_.col, style_text.foreground);
|
||||
draw_cursor(paint_state_.line, paint_state_.col, Styles::white_small.background);
|
||||
draw_cursor(cursor_.line, cursor_.col, Styles::white_small.foreground);
|
||||
paint_state_.line = cursor_.line;
|
||||
paint_state_.col = cursor_.col;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#define __UI_TEXT_EDITOR_H__
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_font_fixed_5x8.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
|
||||
#include "file_wrapper.hpp"
|
||||
@@ -78,11 +78,6 @@ class TextViewer : public Widget {
|
||||
private:
|
||||
static constexpr int8_t char_width = 5;
|
||||
static constexpr int8_t char_height = 8;
|
||||
static constexpr Style style_text{
|
||||
.font = font::fixed_5x8,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const uint8_t max_line = 32;
|
||||
const uint8_t max_col = 48;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "receiver_model.hpp"
|
||||
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
#include <hal.h>
|
||||
#include <string>
|
||||
|
||||
#include "ui_painter.hpp"
|
||||
#include "portapack.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "string_format.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
|
||||
using namespace ui;
|
||||
|
||||
void runtime_error(LED);
|
||||
std::string number_to_hex_string(uint32_t);
|
||||
@@ -37,33 +38,29 @@ void draw_line(int32_t, const char*, regarm_t);
|
||||
static bool error_shown = false;
|
||||
|
||||
void draw_guru_meditation_header(uint8_t source, const char* hint) {
|
||||
ui::Painter painter;
|
||||
ui::Style style_default{
|
||||
.font = ui::font::fixed_8x16,
|
||||
.background = ui::Color::black(),
|
||||
.foreground = ui::Color::white()};
|
||||
Painter painter;
|
||||
|
||||
painter.fill_rectangle(
|
||||
{0, 0, portapack::display.width(), portapack::display.height()},
|
||||
ui::Color::red());
|
||||
Color::red());
|
||||
|
||||
constexpr int border = 8;
|
||||
painter.fill_rectangle(
|
||||
{border, border, portapack::display.width() - (border * 2), portapack::display.height() - (border * 2)},
|
||||
ui::Color::black());
|
||||
Color::black());
|
||||
|
||||
// NOTE: in situations like a hard fault it seems not possible to write strings longer than 16 characters.
|
||||
painter.draw_string({48, 24}, style_default, "M? Guru");
|
||||
painter.draw_string({48 + 8 * 8, 24}, style_default, "Meditation");
|
||||
painter.draw_string({48, 24}, Styles::white, "M? Guru");
|
||||
painter.draw_string({48 + 8 * 8, 24}, Styles::white, "Meditation");
|
||||
|
||||
if (source == CORTEX_M0)
|
||||
painter.draw_string({48 + 8, 24}, style_default, "0");
|
||||
painter.draw_string({48 + 8, 24}, Styles::white, "0");
|
||||
|
||||
if (source == CORTEX_M4)
|
||||
painter.draw_string({48 + 8, 24}, style_default, "4");
|
||||
painter.draw_string({48 + 8, 24}, Styles::white, "4");
|
||||
|
||||
painter.draw_string({15, 55}, style_default, "Hint: ");
|
||||
painter.draw_string({15 + 8 * 8, 55}, style_default, hint);
|
||||
painter.draw_string({15, 55}, Styles::white, "Hint: ");
|
||||
painter.draw_string({15 + 8 * 8, 55}, Styles::white, hint);
|
||||
}
|
||||
|
||||
void draw_guru_meditation(uint8_t source, const char* hint) {
|
||||
@@ -114,14 +111,10 @@ void draw_guru_meditation(uint8_t source, const char* hint, struct extctx* ctxp,
|
||||
}
|
||||
|
||||
void draw_line(int32_t y_offset, const char* label, regarm_t value) {
|
||||
ui::Painter painter;
|
||||
ui::Style style_default{
|
||||
.font = ui::font::fixed_8x16,
|
||||
.background = ui::Color::black(),
|
||||
.foreground = ui::Color::white()};
|
||||
Painter painter;
|
||||
|
||||
painter.draw_string({15, y_offset}, style_default, label);
|
||||
painter.draw_string({15 + 8 * 8, y_offset}, style_default, to_string_hex((uint32_t)value, 8));
|
||||
painter.draw_string({15, y_offset}, Styles::white, label);
|
||||
painter.draw_string({15 + 8 * 8, y_offset}, Styles::white, to_string_hex((uint32_t)value, 8));
|
||||
}
|
||||
|
||||
void runtime_error(LED led) {
|
||||
|
||||
@@ -42,7 +42,6 @@ using namespace lpc43xx;
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -86,22 +86,6 @@ options_t freqman_entry_steps_short = {
|
||||
{"500kHz", 500000},
|
||||
{"1MHz", 1000000}};
|
||||
|
||||
std::vector<std::string> get_freqman_files() {
|
||||
std::vector<std::string> file_list;
|
||||
|
||||
auto files = scan_root_files(u"FREQMAN", u"*.TXT");
|
||||
|
||||
for (auto file : files) {
|
||||
std::string file_name = file.stem().string();
|
||||
// don't propose tmp / hidden files in freqman's list
|
||||
if (file_name.length() && file_name[0] != '.') {
|
||||
file_list.emplace_back(file_name);
|
||||
}
|
||||
}
|
||||
|
||||
return file_list;
|
||||
};
|
||||
|
||||
bool load_freqman_file(std::string& file_stem, freqman_db& db) {
|
||||
return load_freqman_file_ex(file_stem, db, true, true, true, FREQMAN_MAX_PER_FILE);
|
||||
}
|
||||
@@ -297,28 +281,24 @@ bool get_freq_string(freqman_entry& entry, std::string& item_string) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool delete_freqman_file(std::string& file_stem) {
|
||||
File freqman_file;
|
||||
std::string freq_file_path = "/FREQMAN/" + file_stem + ".TXT";
|
||||
delete_file(freq_file_path);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool save_freqman_file(std::string& file_stem, freqman_db& db) {
|
||||
File freqman_file;
|
||||
|
||||
std::string freq_file_path = "FREQMAN/" + file_stem + ".TXT";
|
||||
std::string tmp_freq_file_path = "FREQMAN/" + file_stem + ".TXT.TMP";
|
||||
|
||||
if (!db.size()) {
|
||||
delete_file("FREQMAN/" + file_stem + ".TXT");
|
||||
return true;
|
||||
}
|
||||
|
||||
delete_file(tmp_freq_file_path);
|
||||
auto result = freqman_file.open(tmp_freq_file_path);
|
||||
std::string freq_file_path = "/FREQMAN/" + file_stem + ".TXT";
|
||||
delete_file(freq_file_path);
|
||||
auto result = freqman_file.create(freq_file_path);
|
||||
if (!result.is_valid()) {
|
||||
for (size_t n = 0; n < db.size(); n++) {
|
||||
std::string item_string;
|
||||
auto& entry = db[n];
|
||||
get_freq_string(entry, item_string);
|
||||
freqman_file.write_line(item_string);
|
||||
std::string line;
|
||||
get_freq_string(db[n], line);
|
||||
freqman_file.write_line(line);
|
||||
}
|
||||
delete_file(freq_file_path);
|
||||
rename_file(tmp_freq_file_path, freq_file_path);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -95,10 +95,10 @@ struct freqman_entry {
|
||||
|
||||
using freqman_db = std::vector<freqman_entry>;
|
||||
|
||||
std::vector<std::string> get_freqman_files();
|
||||
bool load_freqman_file(std::string& file_stem, freqman_db& db);
|
||||
bool load_freqman_file_ex(std::string& file_stem, freqman_db& db, bool load_freqs, bool load_ranges, bool load_hamradios, uint8_t limit);
|
||||
bool get_freq_string(freqman_entry& entry, std::string& item_string);
|
||||
bool delete_freqman_file(std::string& file_stem);
|
||||
bool save_freqman_file(std::string& file_stem, freqman_db& db);
|
||||
bool create_freqman_file(std::string& file_stem, File& freqman_file);
|
||||
|
||||
|
||||
@@ -233,20 +233,23 @@ static PortaPackModel portapack_model() {
|
||||
|
||||
if (!model.is_valid()) {
|
||||
const auto switches_state = get_switches_state();
|
||||
if (switches_state[(size_t)ui::KeyEvent::Up]) {
|
||||
save_config(1);
|
||||
// model = PortaPackModel::R2_20170522; // Commented these out as they should be set down below anyway
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Down]) {
|
||||
save_config(2);
|
||||
// model = PortaPackModel::R1_20150901;
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Left]) {
|
||||
save_config(3);
|
||||
// model = PortaPackModel::R1_20150901;
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Right]) {
|
||||
save_config(4);
|
||||
// model = PortaPackModel::R2_20170522;
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Select]) {
|
||||
save_config(0);
|
||||
// Only save config if no other multi key boot action is triggered (like pmem reset)
|
||||
if (switches_state.count() == 1) {
|
||||
if (switches_state[(size_t)ui::KeyEvent::Up]) {
|
||||
save_config(1);
|
||||
// model = PortaPackModel::R2_20170522; // Commented these out as they should be set down below anyway
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Down]) {
|
||||
save_config(2);
|
||||
// model = PortaPackModel::R1_20150901;
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Left]) {
|
||||
save_config(3);
|
||||
// model = PortaPackModel::R1_20150901;
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Right]) {
|
||||
save_config(4);
|
||||
// model = PortaPackModel::R2_20170522;
|
||||
} else if (switches_state[(size_t)ui::KeyEvent::Select]) {
|
||||
save_config(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (load_config() == 1) {
|
||||
@@ -469,13 +472,13 @@ bool init() {
|
||||
i2c0.start(i2c_config_fast_clock);
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
/* Cache some configuration data from persistent memory. */
|
||||
persistent_memory::cache::init();
|
||||
|
||||
touch::adc::init();
|
||||
controls_init();
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
/* Cache some configuration data from persistent memory. */
|
||||
persistent_memory::cache::init();
|
||||
|
||||
clock_manager.set_reference_ppb(persistent_memory::correction_ppb());
|
||||
clock_manager.enable_if_clocks();
|
||||
clock_manager.enable_codec_clocks();
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#define __RECENT_ENTRIES_H__
|
||||
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -43,8 +43,8 @@ class AlphanumView : public TextEntryView {
|
||||
bool on_encoder(const EncoderEvent delta) override;
|
||||
|
||||
private:
|
||||
const char* const keys_upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ' .<";
|
||||
const char* const keys_lower = "abcdefghijklmnopqrstuvwxyz' .<";
|
||||
const char* const keys_upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ, .<";
|
||||
const char* const keys_lower = "abcdefghijklmnopqrstuvwxyz, .<";
|
||||
const char* const keys_digit = "0123456789!\"#'()*+-/:;=>?@[\\]<";
|
||||
|
||||
const std::pair<std::string, const char*> key_sets[3] = {
|
||||
|
||||
@@ -69,24 +69,28 @@ void FreqManUIList::paint(Painter& painter) {
|
||||
if (freqlist_db.size() == 0)
|
||||
return;
|
||||
// coloration if file is too big
|
||||
Style* text_color = &style_default;
|
||||
auto text_color = &Styles::white;
|
||||
if (freqlist_db.size() > FREQMAN_MAX_PER_FILE)
|
||||
text_color = &style_yellow;
|
||||
text_color = &Styles::yellow;
|
||||
uint8_t nb_lines = 0;
|
||||
for (uint8_t it = current_index; it < freqlist_db.size(); it++) {
|
||||
uint8_t line_height = (int)nb_lines * char_height;
|
||||
if (line_height < (r.height() - char_height)) {
|
||||
if (line_height < (r.height() - char_height)) { // line is within the widget
|
||||
std::string description = freqman_item_string(freqlist_db[it], 30);
|
||||
// line is within the widget
|
||||
painter.draw_string(
|
||||
{0, r.location().y() + (int)nb_lines * char_height},
|
||||
*text_color, description);
|
||||
if (nb_lines == highlighted_index) {
|
||||
const Rect r_highlighted_freq{0, r.location().y() + (int)nb_lines * char_height, 240, char_height};
|
||||
painter.draw_rectangle(
|
||||
painter.fill_rectangle(
|
||||
r_highlighted_freq,
|
||||
Color::white());
|
||||
painter.draw_string(
|
||||
{0, r.location().y() + (int)nb_lines * char_height},
|
||||
Styles::bg_white, description);
|
||||
} else {
|
||||
painter.draw_string(
|
||||
{0, r.location().y() + (int)nb_lines * char_height},
|
||||
*text_color, description);
|
||||
}
|
||||
|
||||
nb_lines++;
|
||||
} else {
|
||||
// rect is filled, we can break
|
||||
@@ -104,8 +108,19 @@ void FreqManUIList::paint(Painter& painter) {
|
||||
|
||||
void FreqManUIList::set_db(freqman_db& db) {
|
||||
freqlist_db = db;
|
||||
current_index = 0;
|
||||
highlighted_index = 0;
|
||||
if (db.size() == 0) {
|
||||
current_index = 0;
|
||||
highlighted_index = 0;
|
||||
} else {
|
||||
if ((unsigned)(current_index + highlighted_index) >= db.size()) {
|
||||
current_index = db.size() - 1 - highlighted_index;
|
||||
}
|
||||
if (current_index < 0) {
|
||||
current_index = 0;
|
||||
if (highlighted_index > 0)
|
||||
highlighted_index--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FreqManUIList::on_focus() {
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#define __UI_FREQLIST_H__
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_font_fixed_5x8.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "event_m0.hpp"
|
||||
#include "message.hpp"
|
||||
#include "freqman.hpp"
|
||||
@@ -56,21 +56,12 @@ class FreqManUIList : public Widget {
|
||||
bool on_touch(const TouchEvent event) override;
|
||||
bool on_encoder(EncoderEvent delta) override;
|
||||
|
||||
void set_highlighted_index(int index); // set highlighted_index and return capped highlighted_index value to set in caller
|
||||
void set_highlighted_index(int index); // internal set highlighted_index in list handler
|
||||
uint8_t get_index(); // return highlighed + index
|
||||
uint8_t set_index(uint8_t index); // try to set current_index + highlighed from index, return capped index
|
||||
void set_db(freqman_db& db);
|
||||
|
||||
private:
|
||||
Style style_default{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
Style style_yellow{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::yellow(),
|
||||
};
|
||||
static constexpr int8_t char_height = 16;
|
||||
bool instant_exec_{false};
|
||||
freqman_db freqlist_db{};
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "ui.hpp"
|
||||
#include "file.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "ui.hpp"
|
||||
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "qrcodegen.hpp"
|
||||
#include "portapack.hpp"
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Kyle Reed
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_font_fixed_5x8.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
using namespace ui;
|
||||
|
||||
const Style Styles::white{
|
||||
.font = ui::font::fixed_8x16,
|
||||
.background = ui::Color::black(),
|
||||
.foreground = ui::Color::white(),
|
||||
};
|
||||
|
||||
const Style Styles::bg_white{
|
||||
.font = ui::font::fixed_8x16,
|
||||
.background = ui::Color::white(),
|
||||
.foreground = ui::Color::black(),
|
||||
};
|
||||
|
||||
const Style Styles::white_small{
|
||||
.font = font::fixed_5x8,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const Style Styles::yellow{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::yellow(),
|
||||
};
|
||||
|
||||
const Style Styles::green{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
|
||||
const Style Styles::red{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
|
||||
const Style Styles::blue{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::blue(),
|
||||
};
|
||||
|
||||
const Style Styles::bg_blue{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::blue(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const Style Styles::light_grey{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::light_grey(),
|
||||
};
|
||||
|
||||
const Style Styles::grey{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
|
||||
const Style Styles::dark_grey{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::dark_grey(),
|
||||
};
|
||||
|
||||
const Style Styles::bg_dark_grey{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::dark_grey(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
const Style Styles::orange{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::orange(),
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Kyle Reed
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __UI_STYLES_H__
|
||||
#define __UI_STYLES_H__
|
||||
|
||||
#include "ui_painter.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
class Styles {
|
||||
public:
|
||||
/* White foreground. */
|
||||
static const Style white;
|
||||
|
||||
/* White background. */
|
||||
static const Style bg_white;
|
||||
|
||||
/* White foreground, small font. */
|
||||
static const Style white_small;
|
||||
|
||||
/* Yellow foreground. */
|
||||
static const Style yellow;
|
||||
|
||||
/* Green foreground. */
|
||||
static const Style green;
|
||||
|
||||
/* Red foreground. */
|
||||
static const Style red;
|
||||
|
||||
/* Blue foreground. */
|
||||
static const Style blue;
|
||||
|
||||
/* Blue background. */
|
||||
static const Style bg_blue;
|
||||
|
||||
/* Light grey foreground. */
|
||||
static const Style light_grey;
|
||||
|
||||
/* Grey foreground. */
|
||||
static const Style grey;
|
||||
|
||||
/* Dark grey foreground. */
|
||||
static const Style dark_grey;
|
||||
|
||||
/* Dark grey background. */
|
||||
static const Style bg_dark_grey;
|
||||
|
||||
/* Orange foreground. */
|
||||
static const Style orange;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
|
||||
#endif /*__UI_STYLES_H__*/
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "ui_tabview.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
using namespace portapack;
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include "ui.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "rf_path.hpp"
|
||||
|
||||
@@ -73,36 +73,12 @@ class TransmitterView : public View {
|
||||
void set_transmitting(const bool transmitting);
|
||||
|
||||
private:
|
||||
const Style style_start{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
const Style style_stop{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
const Style style_locked{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::dark_grey(),
|
||||
};
|
||||
const Style style_power_low{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::yellow(),
|
||||
};
|
||||
const Style style_power_med{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::orange(),
|
||||
};
|
||||
const Style style_power_high{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
const Style& style_start = Styles::green;
|
||||
const Style style_stop = Styles::red;
|
||||
const Style style_locked = Styles::dark_grey;
|
||||
const Style style_power_low = Styles::yellow;
|
||||
const Style style_power_med = Styles::orange;
|
||||
const Style style_power_high = Styles::red;
|
||||
|
||||
bool lock_{false};
|
||||
bool transmitting_{false};
|
||||
@@ -168,21 +144,9 @@ class TransmitterView2 : public View {
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
private:
|
||||
const Style style_power_low{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::yellow(),
|
||||
};
|
||||
const Style style_power_med{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::orange(),
|
||||
};
|
||||
const Style style_power_high{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
const Style& style_power_low = Styles::yellow;
|
||||
const Style& style_power_med = Styles::orange;
|
||||
const Style& style_power_high = Styles::red;
|
||||
|
||||
Text text_gain_amp{
|
||||
{0, 3 * 8, 5 * 8, 1 * 16},
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "ui_menu.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "core_control.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "ui_debug.hpp"
|
||||
#include "ui_encoders.hpp"
|
||||
#include "ui_fileman.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_freqman.hpp"
|
||||
#include "ui_jammer.hpp"
|
||||
// #include "ui_keyfob.hpp"
|
||||
@@ -65,6 +66,7 @@
|
||||
#include "ui_siggen.hpp"
|
||||
#include "ui_sonde.hpp"
|
||||
#include "ui_sstvtx.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
// #include "ui_test.hpp"
|
||||
#include "ui_text_editor.hpp"
|
||||
#include "ui_tone_search.hpp"
|
||||
@@ -104,12 +106,6 @@ namespace ui {
|
||||
SystemStatusView::SystemStatusView(
|
||||
NavigationView& nav)
|
||||
: nav_(nav) {
|
||||
static constexpr Style style_systemstatus{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::dark_grey(),
|
||||
.foreground = Color::white(),
|
||||
};
|
||||
|
||||
add_children({
|
||||
&backdrop,
|
||||
&button_back,
|
||||
@@ -147,7 +143,7 @@ SystemStatusView::SystemStatusView(
|
||||
}
|
||||
|
||||
button_back.id = -1; // Special ID used by FocusManager
|
||||
title.set_style(&style_systemstatus);
|
||||
title.set_style(&Styles::bg_dark_grey);
|
||||
|
||||
if (portapack::persistent_memory::stealth_mode())
|
||||
button_stealth.set_foreground(ui::Color::green());
|
||||
@@ -645,17 +641,12 @@ SystemMenuView::SystemMenuView(NavigationView& nav) {
|
||||
|
||||
/* SystemView ************************************************************/
|
||||
|
||||
static constexpr ui::Style style_default{
|
||||
.font = ui::font::fixed_8x16,
|
||||
.background = ui::Color::black(),
|
||||
.foreground = ui::Color::white()};
|
||||
|
||||
SystemView::SystemView(
|
||||
Context& context,
|
||||
const Rect parent_rect)
|
||||
: View{parent_rect},
|
||||
context_(context) {
|
||||
set_style(&style_default);
|
||||
set_style(&ui::Styles::white);
|
||||
|
||||
constexpr ui::Dim status_view_height = 16;
|
||||
constexpr ui::Dim info_view_height = 16;
|
||||
|
||||
@@ -35,7 +35,7 @@ class GoertzelDetector {
|
||||
|
||||
private:
|
||||
float coefficient{};
|
||||
int16_t s[2]{0};
|
||||
int16_t s[3]{0};
|
||||
};
|
||||
|
||||
} /* namespace dsp */
|
||||
|
||||
@@ -1835,7 +1835,7 @@ void gen_numname (
|
||||
if (c > '9') c += 7;
|
||||
ns[i--] = c;
|
||||
seq /= 16;
|
||||
} while (seq);
|
||||
} while (seq && i != 0);
|
||||
ns[i] = '~';
|
||||
|
||||
/* Append the number */
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include <fstream>
|
||||
#include "file.hpp"
|
||||
|
||||
#include "irq_controls.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace portapack {
|
||||
@@ -445,7 +447,8 @@ void defaults() {
|
||||
}
|
||||
|
||||
void init() {
|
||||
if (backup_ram->is_valid()) {
|
||||
const auto switches_state = get_switches_state();
|
||||
if (!(switches_state[(size_t)ui::KeyEvent::Left] && switches_state[(size_t)ui::KeyEvent::Right]) && backup_ram->is_valid()) {
|
||||
// Copy valid persistent data into cache.
|
||||
cached_backup_ram = *backup_ram;
|
||||
|
||||
@@ -867,5 +870,9 @@ int load_persistent_settings_from_file() {
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t data_size() {
|
||||
return sizeof(data_t);
|
||||
}
|
||||
|
||||
} /* namespace persistent_memory */
|
||||
} /* namespace portapack */
|
||||
|
||||
@@ -257,6 +257,8 @@ bool should_use_sdcard_for_pmem();
|
||||
int save_persistent_settings_to_file();
|
||||
int load_persistent_settings_from_file();
|
||||
|
||||
size_t data_size();
|
||||
|
||||
} /* namespace persistent_memory */
|
||||
|
||||
} /* namespace portapack */
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "ui_text.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_focus.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "rtc_time.hpp"
|
||||
#include "radio.hpp"
|
||||
|
||||
|
||||
@@ -43,43 +43,3 @@ f=27375000,d=CB E (GER) CH 37
|
||||
f=27385000,d=CB E (GER) CH 38
|
||||
f=27395000,d=CB E (GER) CH 39
|
||||
f=27405000,d=CB E (GER) CH 40
|
||||
f=26565000,d=CB E (GER) CH 41
|
||||
f=26575000,d=CB E (GER) CH 42
|
||||
f=26585000,d=CB E (GER) CH 43
|
||||
f=26595000,d=CB E (GER) CH 44
|
||||
f=26605000,d=CB E (GER) CH 45
|
||||
f=26615000,d=CB E (GER) CH 46
|
||||
f=26625000,d=CB E (GER) CH 47
|
||||
f=26635000,d=CB E (GER) CH 48
|
||||
f=26645000,d=CB E (GER) CH 49
|
||||
f=26655000,d=CB E (GER) CH 50
|
||||
f=26665000,d=CB E (GER) CH 51
|
||||
f=26675000,d=CB E (GER) CH 52
|
||||
f=26685000,d=CB E (GER) CH 53
|
||||
f=26695000,d=CB E (GER) CH 54
|
||||
f=26705000,d=CB E (GER) CH 55
|
||||
f=26715000,d=CB E (GER) CH 56
|
||||
f=26725000,d=CB E (GER) CH 57
|
||||
f=26735000,d=CB E (GER) CH 58
|
||||
f=26745000,d=CB E (GER) CH 59
|
||||
f=26755000,d=CB E (GER) CH 60
|
||||
f=26765000,d=CB E (GER) CH 61
|
||||
f=26775000,d=CB E (GER) CH 62
|
||||
f=26785000,d=CB E (GER) CH 63
|
||||
f=26795000,d=CB E (GER) CH 64
|
||||
f=26805000,d=CB E (GER) CH 65
|
||||
f=26815000,d=CB E (GER) CH 66
|
||||
f=26825000,d=CB E (GER) CH 67
|
||||
f=26835000,d=CB E (GER) CH 68
|
||||
f=26845000,d=CB E (GER) CH 69
|
||||
f=26855000,d=CB E (GER) CH 70
|
||||
f=26865000,d=CB E (GER) CH 71
|
||||
f=26875000,d=CB E (GER) CH 72
|
||||
f=26885000,d=CB E (GER) CH 73
|
||||
f=26895000,d=CB E (GER) CH 74
|
||||
f=26905000,d=CB E (GER) CH 75
|
||||
f=26915000,d=CB E (GER) CH 76
|
||||
f=26925000,d=CB E (GER) CH 77
|
||||
f=26935000,d=CB E (GER) CH 78
|
||||
f=26945000,d=CB E (GER) CH 79
|
||||
f=26955000,d=CB E (GER) CH 80
|
||||
@@ -0,0 +1,40 @@
|
||||
f=26565000,d=CB E (GER) CH 41
|
||||
f=26575000,d=CB E (GER) CH 42
|
||||
f=26585000,d=CB E (GER) CH 43
|
||||
f=26595000,d=CB E (GER) CH 44
|
||||
f=26605000,d=CB E (GER) CH 45
|
||||
f=26615000,d=CB E (GER) CH 46
|
||||
f=26625000,d=CB E (GER) CH 47
|
||||
f=26635000,d=CB E (GER) CH 48
|
||||
f=26645000,d=CB E (GER) CH 49
|
||||
f=26655000,d=CB E (GER) CH 50
|
||||
f=26665000,d=CB E (GER) CH 51
|
||||
f=26675000,d=CB E (GER) CH 52
|
||||
f=26685000,d=CB E (GER) CH 53
|
||||
f=26695000,d=CB E (GER) CH 54
|
||||
f=26705000,d=CB E (GER) CH 55
|
||||
f=26715000,d=CB E (GER) CH 56
|
||||
f=26725000,d=CB E (GER) CH 57
|
||||
f=26735000,d=CB E (GER) CH 58
|
||||
f=26745000,d=CB E (GER) CH 59
|
||||
f=26755000,d=CB E (GER) CH 60
|
||||
f=26765000,d=CB E (GER) CH 61
|
||||
f=26775000,d=CB E (GER) CH 62
|
||||
f=26785000,d=CB E (GER) CH 63
|
||||
f=26795000,d=CB E (GER) CH 64
|
||||
f=26805000,d=CB E (GER) CH 65
|
||||
f=26815000,d=CB E (GER) CH 66
|
||||
f=26825000,d=CB E (GER) CH 67
|
||||
f=26835000,d=CB E (GER) CH 68
|
||||
f=26845000,d=CB E (GER) CH 69
|
||||
f=26855000,d=CB E (GER) CH 70
|
||||
f=26865000,d=CB E (GER) CH 71
|
||||
f=26875000,d=CB E (GER) CH 72
|
||||
f=26885000,d=CB E (GER) CH 73
|
||||
f=26895000,d=CB E (GER) CH 74
|
||||
f=26905000,d=CB E (GER) CH 75
|
||||
f=26915000,d=CB E (GER) CH 76
|
||||
f=26925000,d=CB E (GER) CH 77
|
||||
f=26935000,d=CB E (GER) CH 78
|
||||
f=26945000,d=CB E (GER) CH 79
|
||||
f=26955000,d=CB E (GER) CH 80
|
||||
@@ -1,2 +1,2 @@
|
||||
a=144000000,b=147990000,m=NFM,bw=11k,s=5kHz,d=HAM 2m
|
||||
a=144000000,b=148000000,m=NFM,bw=11k,s=5kHz,d=HAM 2m
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
a=935000000,b=945000000,d=GSM900 Orange FR
|
||||
a=1808000000,b=1832000000,d=GSM1800 Orange FR
|
||||
a=950000000,b=960000000,d=GSM900 SFR FR
|
||||
a=1832000000,b=1853000000,d=GSM1800 SFR FR
|
||||
a=925000000,b=935000000,d=GSM900 Bouygues FR
|
||||
a=1858000000,b=1880000000,d=GSM1800 Bouygues FR
|
||||
a=945000000,b=950000000,d=GSM Free FR
|
||||
a=921000000,b=925000000,d=GSM-R FR
|
||||
a=1880000000,b=1900000000,d=DECT
|
||||
a=162930000,b=162970000,d=PMV AFSK
|
||||
a=433050000,b=434790000,d=ISM 433
|
||||
a=868000000,b=868200000,d=ISM 868
|
||||
a=1574920000,b=1575920000,d=GPS L1
|
||||
a=1226600000,b=1228600000,d=GPS L2
|
||||
@@ -1,17 +1,3 @@
|
||||
a=935000000,b=945000000,d=GSM900 Orange FR
|
||||
a=1808000000,b=1832000000,d=GSM1800 Orange FR
|
||||
a=950000000,b=960000000,d=GSM900 SFR FR
|
||||
a=1832000000,b=1853000000,d=GSM1800 SFR FR
|
||||
a=925000000,b=935000000,d=GSM900 Bouygues FR
|
||||
a=1858000000,b=1880000000,d=GSM1800 Bouygues FR
|
||||
a=945000000,b=950000000,d=GSM Free FR
|
||||
a=921000000,b=925000000,d=GSM-R FR
|
||||
a=1880000000,b=1900000000,d=DECT
|
||||
a=162930000,b=162970000,d=PMV AFSK
|
||||
a=433050000,b=434790000,d=ISM 433
|
||||
a=868000000,b=868200000,d=ISM 868
|
||||
a=1574920000,b=1575920000,d=GPS L1
|
||||
a=1226600000,b=1228600000,d=GPS L2
|
||||
a=2401000000,b=2423000000,d=WLAN 2.4G CH1
|
||||
a=2406000000,b=2428000000,d=WLAN 2.4G CH2
|
||||
a=2411000000,b=2433000000,d=WLAN 2.4G CH3
|
||||
@@ -58,12 +58,3 @@ f=434475000,d=LPD433 CH57
|
||||
f=434500000,d=LPD433 CH58
|
||||
f=434525000,d=LPD433 CH59
|
||||
f=434550000,d=LPD433 CH60
|
||||
f=434575000,d=LPD433 CH61
|
||||
f=434600000,d=LPD433 CH62
|
||||
f=434625000,d=LPD433 CH63
|
||||
f=434650000,d=LPD433 CH64
|
||||
f=434675000,d=LPD433 CH65
|
||||
f=434700000,d=LPD433 CH66
|
||||
f=434725000,d=LPD433 CH67
|
||||
f=434750000,d=LPD433 CH68
|
||||
f=434775000,d=LPD433 CH69
|
||||
@@ -0,0 +1,9 @@
|
||||
f=434575000,d=LPD433 CH61
|
||||
f=434600000,d=LPD433 CH62
|
||||
f=434625000,d=LPD433 CH63
|
||||
f=434650000,d=LPD433 CH64
|
||||
f=434675000,d=LPD433 CH65
|
||||
f=434700000,d=LPD433 CH66
|
||||
f=434725000,d=LPD433 CH67
|
||||
f=434750000,d=LPD433 CH68
|
||||
f=434775000,d=LPD433 CH69
|
||||
@@ -24,6 +24,7 @@ f=446525000,d=FRA Priv2
|
||||
f=448425000,d=GER Fire 1200
|
||||
f=465970000,d=GER Skyper1
|
||||
f=466075000,d=GER Skyper2
|
||||
f=439987500,d=GER HAM Dapnet
|
||||
f=169650000,d=NL Medical
|
||||
f=172450000,d=NL KPN3-Public
|
||||
f=169800000,d=SWE Minicall1
|
||||
@@ -36,4 +37,4 @@ f=147325000,d=CH Swissphone 2
|
||||
f=147375000,d=CH Swissphone 3
|
||||
f=147400000,d=CH Swissphone 4
|
||||
f=169700000,d=CH Swissphone 5
|
||||
f=173250000,d=SLO Fire
|
||||
f=173250000,d=SLO Fire
|
||||
|
||||
@@ -8,7 +8,9 @@ f=401600000,d=FR
|
||||
f=402000000,d=BR FR GR IT RS
|
||||
f=402010000,d=TR
|
||||
f=402200000,d=GR
|
||||
f=402300000,d=DE
|
||||
f=402500000,d=AU DE
|
||||
f=402700000,d=DE
|
||||
f=402740000,d=GR
|
||||
f=402790000,d=RS
|
||||
f=402800000,d=GB IT RS
|
||||
@@ -16,7 +18,7 @@ f=402870000,d=BE
|
||||
f=403000000,d=BE BR CZ HU IE IT NL
|
||||
f=403010000,d=DE NL TR
|
||||
f=403150000,d=DE
|
||||
f=403200000,d=HU
|
||||
f=403200000,d=HU DE
|
||||
f=403500000,d=BE HU
|
||||
f=403530000,d=BY
|
||||
f=403600000,d=RO
|
||||
@@ -33,14 +35,17 @@ f=404300000,d=DE
|
||||
f=404310000,d=DE
|
||||
f=404380000,d=GB
|
||||
f=404400000,d=GB
|
||||
f=404500000,d=DE
|
||||
f=404700000,d=DE
|
||||
f=404710000,d=DE
|
||||
f=404800000,d=IT
|
||||
f=405000000,d=ES
|
||||
f=405010000,d=FR
|
||||
f=405030000,d=BY
|
||||
f=405100000,d=GB
|
||||
f=405300000,d=BY ES IE SE
|
||||
f=405100000,d=GB DE
|
||||
f=405300000,d=BY ES IE SE DE
|
||||
f=405600000,d=GB
|
||||
f=405670000,d=DE
|
||||
f=405680000,d=GB
|
||||
f=405700000,d=DE GB
|
||||
f=405900000,d=DE
|
||||
f=405900000,d=DE
|
||||
|
||||
@@ -60,29 +60,3 @@ f=152780000,d=USA LPBP-GU1
|
||||
f=152810000,d=USA LPBP-GV1
|
||||
f=152720000,d=USA LPBP-GX1
|
||||
f=152750000,d=USA LPBP-GY1
|
||||
f=152810000,d=USA LPBP-GZ1
|
||||
f=459025000,d=USA LPBP-GA2
|
||||
f=459050000,d=USA LPBP-GB2
|
||||
f=459075000,d=USA LPBP-GC2
|
||||
f=459100000,d=USA LPBP-GD2
|
||||
f=459125000,d=USA LPBP-GE2
|
||||
f=459150000,d=USA LPBP-GF2
|
||||
f=459175000,d=USA LPBP-GG2
|
||||
f=459200000,d=USA LPBP-GH2
|
||||
f=459225000,d=USA LPBP-GI2
|
||||
f=459250000,d=USA LPBP-GJ2
|
||||
f=459275000,d=USA LPBP-GK2
|
||||
f=459300000,d=USA LPBP-GL2
|
||||
f=459325000,d=USA LPBP-GM2
|
||||
f=157830000,d=USA LPBP-GN2
|
||||
f=157860000,d=USA LPBP-GO2
|
||||
f=157890000,d=USA LPBP-GP2
|
||||
f=157920000,d=USA LPBP-GQ2
|
||||
f=157950000,d=USA LPBP-GR2
|
||||
f=157980000,d=USA LPBP-GS2
|
||||
f=158010000,d=USA LPBP-GT2
|
||||
f=158040000,d=USA LPBP-GU2
|
||||
f=158070000,d=USA LPBP-GV2
|
||||
f=157980000,d=USA LPBP-GX2
|
||||
f=158010000,d=USA LPBP-GY2
|
||||
f=158070000,d=USA LPBP-GZ2
|
||||
@@ -0,0 +1,28 @@
|
||||
# https://www.fcc.gov/wireless/bureau-divisions/mobility-division/paging
|
||||
# Lower Paging Bands - Paired
|
||||
f=152810000,d=USA LPBP-GZ1
|
||||
f=459025000,d=USA LPBP-GA2
|
||||
f=459050000,d=USA LPBP-GB2
|
||||
f=459075000,d=USA LPBP-GC2
|
||||
f=459100000,d=USA LPBP-GD2
|
||||
f=459125000,d=USA LPBP-GE2
|
||||
f=459150000,d=USA LPBP-GF2
|
||||
f=459175000,d=USA LPBP-GG2
|
||||
f=459200000,d=USA LPBP-GH2
|
||||
f=459225000,d=USA LPBP-GI2
|
||||
f=459250000,d=USA LPBP-GJ2
|
||||
f=459275000,d=USA LPBP-GK2
|
||||
f=459300000,d=USA LPBP-GL2
|
||||
f=459325000,d=USA LPBP-GM2
|
||||
f=157830000,d=USA LPBP-GN2
|
||||
f=157860000,d=USA LPBP-GO2
|
||||
f=157890000,d=USA LPBP-GP2
|
||||
f=157920000,d=USA LPBP-GQ2
|
||||
f=157950000,d=USA LPBP-GR2
|
||||
f=157980000,d=USA LPBP-GS2
|
||||
f=158010000,d=USA LPBP-GT2
|
||||
f=158040000,d=USA LPBP-GU2
|
||||
f=158070000,d=USA LPBP-GV2
|
||||
f=157980000,d=USA LPBP-GX2
|
||||
f=158010000,d=USA LPBP-GY2
|
||||
f=158070000,d=USA LPBP-GZ2
|
||||
+57
-114
@@ -1,114 +1,57 @@
|
||||
f=160650000,d=VHF CH01 RX
|
||||
f=156050000,d=VHF CH01 TX
|
||||
f=160700000,d=VHF CH02 RX
|
||||
f=156100000,d=VHF CH02 TX
|
||||
f=160750000,d=VHF CH03 RX
|
||||
f=156150000,d=VHF CH03 TX
|
||||
f=160800000,d=VHF CH04 RX
|
||||
f=156200000,d=VHF CH04 TX
|
||||
f=160850000,d=VHF CH05 RX
|
||||
f=156250000,d=VHF CH05 TX
|
||||
f=156300000,d=VHF CH06 RX
|
||||
f=156300000,d=VHF CH06 TX
|
||||
f=160950000,d=VHF CH07 RX
|
||||
f=156350000,d=VHF CH07 TX
|
||||
f=156400000,d=VHF CH08 RX
|
||||
f=156400000,d=VHF CH08 TX
|
||||
f=156450000,d=VHF CH09 RX
|
||||
f=156450000,d=VHF CH09 TX
|
||||
f=156500000,d=VHF CH10 RX
|
||||
f=156500000,d=VHF CH10 TX
|
||||
f=156550000,d=VHF CH11 RX
|
||||
f=156550000,d=VHF CH11 TX
|
||||
f=156600000,d=VHF CH12 RX
|
||||
f=156600000,d=VHF CH12 TX
|
||||
f=156650000,d=VHF CH13 RX
|
||||
f=156650000,d=VHF CH13 TX
|
||||
f=156700000,d=VHF CH14 RX
|
||||
f=156700000,d=VHF CH14 TX
|
||||
f=156750000,d=VHF CH15 RX
|
||||
f=156750000,d=VHF CH15 TX
|
||||
f=156800000,d=VHF CH16 RX
|
||||
f=156800000,d=VHF CH16 TX
|
||||
f=156850000,d=VHF CH17 RX
|
||||
f=156850000,d=VHF CH17 TX
|
||||
f=161500000,d=VHF CH18 RX
|
||||
f=156900000,d=VHF CH18 TX
|
||||
f=161550000,d=VHF CH19 RX
|
||||
f=156950000,d=VHF CH19 TX
|
||||
f=161600000,d=VHF CH20 RX
|
||||
f=157000000,d=VHF CH20 TX
|
||||
f=161650000,d=VHF CH21 RX
|
||||
f=157050000,d=VHF CH21 TX
|
||||
f=161700000,d=VHF CH22 RX
|
||||
f=157100000,d=VHF CH22 TX
|
||||
f=161750000,d=VHF CH23 RX
|
||||
f=157150000,d=VHF CH23 TX
|
||||
f=161800000,d=VHF CH24 RX
|
||||
f=157200000,d=VHF CH24 TX
|
||||
f=161850000,d=VHF CH25 RX
|
||||
f=157250000,d=VHF CH25 TX
|
||||
f=161900000,d=VHF CH26 RX
|
||||
f=157300000,d=VHF CH26 TX
|
||||
f=161950000,d=VHF CH27 RX
|
||||
f=157350000,d=VHF CH27 TX
|
||||
f=162000000,d=VHF CH28 RX
|
||||
f=157400000,d=VHF CH28 TX
|
||||
f=160625000,d=VHF CH60 RX
|
||||
f=156025000,d=VHF CH60 TX
|
||||
f=160675000,d=VHF CH61 RX
|
||||
f=156075000,d=VHF CH61 TX
|
||||
f=160725000,d=VHF CH62 RX
|
||||
f=156125000,d=VHF CH62 TX
|
||||
f=160775000,d=VHF CH63 RX
|
||||
f=156175000,d=VHF CH63 TX
|
||||
f=160825000,d=VHF CH64 RX
|
||||
f=156225000,d=VHF CH64 TX
|
||||
f=160875000,d=VHF CH65 RX
|
||||
f=156275000,d=VHF CH65 TX
|
||||
f=160925000,d=VHF CH66 RX
|
||||
f=156325000,d=VHF CH66 TX
|
||||
f=156375000,d=VHF CH67 RX
|
||||
f=156375000,d=VHF CH67 TX
|
||||
f=156425000,d=VHF CH68 RX
|
||||
f=156425000,d=VHF CH68 TX
|
||||
f=156475000,d=VHF CH69 RX
|
||||
f=156475000,d=VHF CH69 TX
|
||||
f=156525000,d=VHF CH70 RX
|
||||
f=156525000,d=VHF CH70 TX
|
||||
f=156575000,d=VHF CH71 RX
|
||||
f=156575000,d=VHF CH71 TX
|
||||
f=156625000,d=VHF CH72 RX
|
||||
f=156625000,d=VHF CH72 TX
|
||||
f=156675000,d=VHF CH73 RX
|
||||
f=156675000,d=VHF CH73 TX
|
||||
f=156725000,d=VHF CH74 RX
|
||||
f=156725000,d=VHF CH74 TX
|
||||
f=156775000,d=VHF CH75 RX
|
||||
f=156775000,d=VHF CH75 TX
|
||||
f=156825000,d=VHF CH76 RX
|
||||
f=156825000,d=VHF CH76 TX
|
||||
f=156875000,d=VHF CH77 RX
|
||||
f=156875000,d=VHF CH77 TX
|
||||
f=161525000,d=VHF CH78 RX
|
||||
f=156925000,d=VHF CH78 TX
|
||||
f=161575000,d=VHF CH79 RX
|
||||
f=156975000,d=VHF CH79 TX
|
||||
f=161625000,d=VHF CH80 RX
|
||||
f=157025000,d=VHF CH80 TX
|
||||
f=161675000,d=VHF CH81 RX
|
||||
f=157075000,d=VHF CH81 TX
|
||||
f=161725000,d=VHF CH82 RX
|
||||
f=157125000,d=VHF CH82 TX
|
||||
f=161775000,d=VHF CH83 RX
|
||||
f=157175000,d=VHF CH83 TX
|
||||
f=161825000,d=VHF CH84 RX
|
||||
f=157225000,d=VHF CH84 TX
|
||||
f=161875000,d=VHF CH85 RX
|
||||
f=157275000,d=VHF CH85 TX
|
||||
f=161925000,d=VHF CH86 RX
|
||||
f=157325000,d=VHF CH86 TX
|
||||
f=157375000,d=VHF CH87 RX
|
||||
f=157375000,d=VHF CH87 TX
|
||||
f=157425000,d=VHF CH88 RX
|
||||
f=157425000,d=VHF CH88 TX
|
||||
r=160650000,t=156050000,d=VHF CH01
|
||||
r=160700000,t=156100000,d=VHF CH02
|
||||
r=160750000,t=156150000,d=VHF CH03
|
||||
r=160800000,t=156200000,d=VHF CH04
|
||||
r=160850000,t=156250000,d=VHF CH05
|
||||
r=156300000,t=156300000,d=VHF CH06
|
||||
r=160950000,t=156350000,d=VHF CH07
|
||||
r=156400000,t=156400000,d=VHF CH08
|
||||
r=156450000,t=156450000,d=VHF CH09
|
||||
r=156500000,t=156500000,d=VHF CH10
|
||||
r=156550000,t=156550000,d=VHF CH11
|
||||
r=156600000,t=156600000,d=VHF CH12
|
||||
r=156650000,t=156650000,d=VHF CH13
|
||||
r=156700000,t=156700000,d=VHF CH14
|
||||
r=156750000,t=156750000,d=VHF CH15
|
||||
r=156800000,t=156800000,d=VHF CH16
|
||||
r=156850000,t=156850000,d=VHF CH17
|
||||
r=161500000,t=156900000,d=VHF CH18
|
||||
r=161550000,t=156950000,d=VHF CH19
|
||||
r=161600000,t=157000000,d=VHF CH20
|
||||
r=161650000,t=157050000,d=VHF CH21
|
||||
r=161700000,t=157100000,d=VHF CH22
|
||||
r=161750000,t=157150000,d=VHF CH23
|
||||
r=161800000,t=157200000,d=VHF CH24
|
||||
r=161850000,t=157250000,d=VHF CH25
|
||||
r=161900000,t=157300000,d=VHF CH26
|
||||
r=161950000,t=157350000,d=VHF CH27
|
||||
r=162000000,t=157400000,d=VHF CH28
|
||||
r=160625000,t=156025000,d=VHF CH60
|
||||
r=160675000,t=156075000,d=VHF CH61
|
||||
r=160725000,t=156125000,d=VHF CH62
|
||||
r=160775000,t=156175000,d=VHF CH63
|
||||
r=160825000,t=156225000,d=VHF CH64
|
||||
r=160875000,t=156275000,d=VHF CH65
|
||||
r=160925000,t=156325000,d=VHF CH66
|
||||
r=156375000,t=156375000,d=VHF CH67
|
||||
r=156425000,t=156425000,d=VHF CH68
|
||||
r=156475000,t=156475000,d=VHF CH69
|
||||
r=156525000,t=156525000,d=VHF CH70
|
||||
r=156575000,t=156575000,d=VHF CH71
|
||||
r=156625000,t=156625000,d=VHF CH72
|
||||
r=156675000,t=156675000,d=VHF CH73
|
||||
r=156725000,t=156725000,d=VHF CH74
|
||||
r=156775000,t=156775000,d=VHF CH75
|
||||
r=156825000,t=156825000,d=VHF CH76
|
||||
r=156875000,t=156875000,d=VHF CH77
|
||||
r=161525000,t=156925000,d=VHF CH78
|
||||
r=161575000,t=156975000,d=VHF CH79
|
||||
r=161625000,t=157025000,d=VHF CH80
|
||||
r=161675000,t=157075000,d=VHF CH81
|
||||
r=161725000,t=157125000,d=VHF CH82
|
||||
r=161775000,t=157175000,d=VHF CH83
|
||||
r=161825000,t=157225000,d=VHF CH84
|
||||
r=161875000,t=157275000,d=VHF CH85
|
||||
r=161925000,t=157325000,d=VHF CH86
|
||||
r=157375000,t=157375000,d=VHF CH87
|
||||
r=157425000,t=157425000,d=VHF CH88
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
f=173512500,d=01-REG CE 01
|
||||
f=173437500,d=02-REG CE 02
|
||||
f=173212500,d=03-REG CE 03
|
||||
f=173287500,d=04-REG CE 04
|
||||
f=173387500,d=05-REG SG 05
|
||||
f=173412500,d=06-REG SG 06
|
||||
f=173512500,d=07-REG GO 07
|
||||
f=173375000,d=08-REG GO 08
|
||||
f=173562500,d=09-REG GO 09
|
||||
f=173137500,d=10-REG KK 10
|
||||
f=173212500,d=11-REG KP 11
|
||||
f=173112500,d=12-REG KR 12
|
||||
f=173337500,d=13-REG KR 13
|
||||
f=173287500,d=14-REG KR 14
|
||||
f=173537500,d=15-REG LJ 15
|
||||
f=173437500,d=16-REG LJ 16
|
||||
f=173187500,d=17-REG LJ 17
|
||||
f=173212500,d=18-REG LJ 18
|
||||
f=173387500,d=19-REG LJ 19
|
||||
f=173237500,d=20-REG MB 20
|
||||
f=173262500,d=21-REG MB 21
|
||||
f=173187500,d=22-REG MS 22
|
||||
f=173312500,d=23-REG NM 23
|
||||
f=173087500,d=24-REG NM 24
|
||||
f=173362500,d=25-REG NM 25
|
||||
f=173237500,d=26-REG PO 26
|
||||
f=173562500,d=27-REG PO 27
|
||||
f=173162500,d=28-REG PO 28
|
||||
f=173162500,d=29-REG PT 29
|
||||
f=173550000,d=30-REG TR 30
|
||||
f=173300000,d=31-MREP ZARE 31
|
||||
f=173400000,d=32-MREP ZARE 32
|
||||
@@ -1,35 +1,3 @@
|
||||
f=173512500,d=01-REG CE 01
|
||||
f=173437500,d=02-REG CE 02
|
||||
f=173212500,d=03-REG CE 03
|
||||
f=173287500,d=04-REG CE 04
|
||||
f=173387500,d=05-REG SG 05
|
||||
f=173412500,d=06-REG SG 06
|
||||
f=173512500,d=07-REG GO 07
|
||||
f=173375000,d=08-REG GO 08
|
||||
f=173562500,d=09-REG GO 09
|
||||
f=173137500,d=10-REG KK 10
|
||||
f=173212500,d=11-REG KP 11
|
||||
f=173112500,d=12-REG KR 12
|
||||
f=173337500,d=13-REG KR 13
|
||||
f=173287500,d=14-REG KR 14
|
||||
f=173537500,d=15-REG LJ 15
|
||||
f=173437500,d=16-REG LJ 16
|
||||
f=173187500,d=17-REG LJ 17
|
||||
f=173212500,d=18-REG LJ 18
|
||||
f=173387500,d=19-REG LJ 19
|
||||
f=173237500,d=20-REG MB 20
|
||||
f=173262500,d=21-REG MB 21
|
||||
f=173187500,d=22-REG MS 22
|
||||
f=173312500,d=23-REG NM 23
|
||||
f=173087500,d=24-REG NM 24
|
||||
f=173362500,d=25-REG NM 25
|
||||
f=173237500,d=26-REG PO 26
|
||||
f=173562500,d=27-REG PO 27
|
||||
f=173162500,d=28-REG PO 28
|
||||
f=173162500,d=29-REG PT 29
|
||||
f=173550000,d=30-REG TR 30
|
||||
f=173300000,d=31-MREP ZARE 31
|
||||
f=173400000,d=32-MREP ZARE 32
|
||||
f=173075000,d=33-ZARE ZARE 33
|
||||
f=173100000,d=34-ZARE ZARE 34
|
||||
f=173125000,d=35-ZARE ZARE 35
|
||||
@@ -74,4 +42,4 @@ f=168675000,d=95-GAS 5 95
|
||||
f=168700000,d=96-GAS 6 96
|
||||
f=173225000,d=97-GAS 7 97
|
||||
f=173250000,d=98-GAS 8 98
|
||||
f=173275000,d=99-GAS 9 99
|
||||
f=173275000,d=99-GAS 9 99
|
||||
Reference in New Issue
Block a user