mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 23:09:26 -05:00
Added HamItUp option (#840)
* Added HamItUp option to allow quick offset of the tuned frequency * New HamItUp icon for top bar * HamItUp checkbox status and frequency persistent settings in Settings/Radio
This commit is contained in:
parent
2457ba016f
commit
92b622deac
@ -166,7 +166,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "AIS Boats RX"; };
|
std::string title() const override { return "AIS RX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr uint32_t initial_target_frequency = 162025000;
|
static constexpr uint32_t initial_target_frequency = 162025000;
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Analog TV RX"; };
|
std::string title() const override { return "AnalogTV RX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr ui::Dim header_height = 3 * 16;
|
static constexpr ui::Dim header_height = 3 * 16;
|
||||||
|
@ -125,7 +125,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "ERT Meter RX"; };
|
std::string title() const override { return "ERT RX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ERTRecentEntries recent { };
|
ERTRecentEntries recent { };
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Soundboard TX"; };
|
std::string title() const override { return "Soundbrd TX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NavigationView& nav_;
|
NavigationView& nav_;
|
||||||
|
@ -103,7 +103,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "TPMS Cars RX"; };
|
std::string title() const override { return "TPMS RX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr uint32_t initial_target_frequency = 315000000;
|
static constexpr uint32_t initial_target_frequency = 315000000;
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "AFSK RX (beta)"; };
|
std::string title() const override { return "AFSK RX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void on_data(uint32_t value, bool is_data);
|
void on_data(uint32_t value, bool is_data);
|
||||||
|
@ -179,7 +179,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "BHT Xy/EP TX"; };
|
std::string title() const override { return "BHT TX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// app save settings
|
// app save settings
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "BurgerPgr TX"; };
|
std::string title() const override { return "BurgerPgrTX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum tx_modes {
|
enum tx_modes {
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
void load_directory_contents(const std::filesystem::path& dir_path);
|
void load_directory_contents(const std::filesystem::path& dir_path);
|
||||||
std::filesystem::path get_selected_path();
|
std::filesystem::path get_selected_path();
|
||||||
|
|
||||||
std::string title() const override { return "File manager"; };
|
std::string title() const override { return "Fileman"; };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NavigationView& nav_;
|
NavigationView& nav_;
|
||||||
|
@ -87,7 +87,7 @@ class FrequencySaveView : public FreqManBaseView {
|
|||||||
public:
|
public:
|
||||||
FrequencySaveView(NavigationView& nav, const rf::Frequency value);
|
FrequencySaveView(NavigationView& nav, const rf::Frequency value);
|
||||||
|
|
||||||
std::string title() const override { return "Save frequency"; };
|
std::string title() const override { return "Save freq."; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string desc_buffer { };
|
std::string desc_buffer { };
|
||||||
@ -126,7 +126,7 @@ public:
|
|||||||
|
|
||||||
FrequencyLoadView(NavigationView& nav);
|
FrequencyLoadView(NavigationView& nav);
|
||||||
|
|
||||||
std::string title() const override { return "Load frequency"; };
|
std::string title() const override { return "Load freq."; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void refresh_widgets(const bool v);
|
void refresh_widgets(const bool v);
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
FrequencyManagerView(NavigationView& nav);
|
FrequencyManagerView(NavigationView& nav);
|
||||||
~FrequencyManagerView();
|
~FrequencyManagerView();
|
||||||
|
|
||||||
std::string title() const override { return "Freq. manager"; };
|
std::string title() const override { return "Freqman"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string desc_buffer { };
|
std::string desc_buffer { };
|
||||||
|
@ -49,7 +49,7 @@ namespace ui
|
|||||||
GlassView& operator=(const GlassView &nav);
|
GlassView& operator=(const GlassView &nav);
|
||||||
|
|
||||||
~GlassView();
|
~GlassView();
|
||||||
std::string title() const override { return "Looking Glass"; };
|
std::string title() const override { return "LookingGlass"; };
|
||||||
|
|
||||||
void on_show() override;
|
void on_show() override;
|
||||||
void on_hide() override;
|
void on_hide() override;
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
~WipeSDView();
|
~WipeSDView();
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Wipe SD Card"; };
|
std::string title() const override { return "Wipe sdcard"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NavigationView& nav_;
|
NavigationView& nav_;
|
||||||
|
@ -38,6 +38,8 @@ using namespace portapack;
|
|||||||
#include "ui_font_fixed_8x16.hpp"
|
#include "ui_font_fixed_8x16.hpp"
|
||||||
#include "cpld_update.hpp"
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
|
#include "freqman.hpp"
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
SetDateTimeView::SetDateTimeView(
|
SetDateTimeView::SetDateTimeView(
|
||||||
@ -144,6 +146,8 @@ SetRadioView::SetRadioView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_children({
|
add_children({
|
||||||
|
&check_hamitup,
|
||||||
|
&button_hamitup_freq,
|
||||||
&check_clkout,
|
&check_clkout,
|
||||||
&field_clkout_freq,
|
&field_clkout_freq,
|
||||||
&labels_clkout_khz,
|
&labels_clkout_khz,
|
||||||
@ -168,6 +172,28 @@ SetRadioView::SetRadioView(
|
|||||||
EventDispatcher::send_message(message);
|
EventDispatcher::send_message(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
check_hamitup.set_value(portapack::persistent_memory::config_hamitup());
|
||||||
|
check_hamitup.on_select = [this](Checkbox&, bool v) {
|
||||||
|
portapack::persistent_memory::set_config_hamitup(v);
|
||||||
|
// Retune to take hamitup change in account
|
||||||
|
receiver_model.set_tuning_frequency( portapack::persistent_memory::tuned_frequency() );
|
||||||
|
//Refresh status bar with/out UP!
|
||||||
|
StatusRefreshMessage message { };
|
||||||
|
EventDispatcher::send_message(message);
|
||||||
|
};
|
||||||
|
|
||||||
|
button_hamitup_freq.set_text( to_string_short_freq( portapack::persistent_memory::config_hamitup_freq() ) + "MHz");
|
||||||
|
|
||||||
|
button_hamitup_freq.on_select = [this, &nav](Button& button) {
|
||||||
|
auto new_view = nav.push<FrequencyKeypadView>(portapack::persistent_memory::config_hamitup_freq() );
|
||||||
|
new_view->on_changed = [this, &button](rf::Frequency f) {
|
||||||
|
portapack::persistent_memory::set_config_hamitup_freq( f );
|
||||||
|
// Retune to take hamitup change in account
|
||||||
|
receiver_model.set_tuning_frequency( portapack::persistent_memory::tuned_frequency() );
|
||||||
|
button_hamitup_freq.set_text( "<" + to_string_short_freq( f ) + " MHz>" );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
field_clkout_freq.set_value(portapack::persistent_memory::clkout_freq());
|
field_clkout_freq.set_value(portapack::persistent_memory::clkout_freq());
|
||||||
value_freq_step.set_style(&style_text);
|
value_freq_step.set_style(&style_text);
|
||||||
|
|
||||||
@ -376,13 +402,13 @@ SettingsMenuView::SettingsMenuView(NavigationView& nav) {
|
|||||||
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } } } );
|
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } } } );
|
||||||
}
|
}
|
||||||
add_items({
|
add_items({
|
||||||
{ "Audio", ui::Color::dark_cyan(), &bitmap_icon_speaker, [&nav](){ nav.push<SetAudioView>(); } },
|
{ "Audio", ui::Color::dark_cyan(), &bitmap_icon_speaker, [&nav](){ nav.push<SetAudioView>(); } },
|
||||||
{ "Radio", ui::Color::dark_cyan(), &bitmap_icon_options_radio, [&nav](){ nav.push<SetRadioView>(); } },
|
{ "Radio", ui::Color::dark_cyan(), &bitmap_icon_options_radio, [&nav](){ nav.push<SetRadioView>(); } },
|
||||||
{ "User Interface", ui::Color::dark_cyan(), &bitmap_icon_options_ui, [&nav](){ nav.push<SetUIView>(); } },
|
{ "User Interface", ui::Color::dark_cyan(), &bitmap_icon_options_ui, [&nav](){ nav.push<SetUIView>(); } },
|
||||||
{ "Date/Time", ui::Color::dark_cyan(), &bitmap_icon_options_datetime, [&nav](){ nav.push<SetDateTimeView>(); } },
|
{ "Date/Time", ui::Color::dark_cyan(), &bitmap_icon_options_datetime, [&nav](){ nav.push<SetDateTimeView>(); } },
|
||||||
{ "Calibration", ui::Color::dark_cyan(), &bitmap_icon_options_touch, [&nav](){ nav.push<TouchCalibrationView>(); } },
|
{ "Calibration", ui::Color::dark_cyan(), &bitmap_icon_options_touch, [&nav](){ nav.push<TouchCalibrationView>(); } },
|
||||||
{ "App Settings", ui::Color::dark_cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SetAppSettingsView>(); } },
|
{ "App Settings", ui::Color::dark_cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SetAppSettingsView>(); } },
|
||||||
{ "QR Code", ui::Color::dark_cyan(), &bitmap_icon_qr_code, [&nav](){ nav.push<SetQRCodeView>(); } }
|
{ "QR Code", ui::Color::dark_cyan(), &bitmap_icon_qr_code, [&nav](){ nav.push<SetQRCodeView>(); } }
|
||||||
});
|
});
|
||||||
set_max_rows(2); // allow wider buttons
|
set_max_rows(2); // allow wider buttons
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Radio settings"; };
|
std::string title() const override { return "Radio"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Style style_text {
|
const Style style_text {
|
||||||
@ -154,7 +154,7 @@ private:
|
|||||||
{ { 6 * 8, 4 * 16 }, "PPM", Color::light_grey() },
|
{ { 6 * 8, 4 * 16 }, "PPM", Color::light_grey() },
|
||||||
};
|
};
|
||||||
|
|
||||||
Checkbox check_clkout {
|
Checkbox check_clkout {
|
||||||
{ 18, (6 * 16 - 4) },
|
{ 18, (6 * 16 - 4) },
|
||||||
13,
|
13,
|
||||||
"Enable CLKOUT"
|
"Enable CLKOUT"
|
||||||
@ -193,11 +193,21 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Checkbox check_bias {
|
Checkbox check_bias {
|
||||||
{ 28, 13 * 16 },
|
{ 18, 12 * 16 },
|
||||||
5,
|
5,
|
||||||
"Turn on bias voltage"
|
"Turn on bias voltage"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Checkbox check_hamitup {
|
||||||
|
{ 18, 14 * 16},
|
||||||
|
7,
|
||||||
|
"HamItUp"
|
||||||
|
};
|
||||||
|
Button button_hamitup_freq {
|
||||||
|
{ 240 - 15 * 8 , 14 * 16 , 15 * 8 , 24 },
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
|
||||||
Button button_save {
|
Button button_save {
|
||||||
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"Save"
|
"Save"
|
||||||
@ -219,7 +229,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "UI settings"; };
|
std::string title() const override { return "UI"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -299,7 +309,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "App Settings"; };
|
std::string title() const override { return "AppSettings"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -332,7 +342,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Audio settings"; };
|
std::string title() const override { return "Audio"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Labels labels {
|
Labels labels {
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Radiosonde RX"; };
|
std::string title() const override { return "Radiosnd RX"; };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
void focus() override;
|
void focus() override;
|
||||||
void paint(Painter&) override;
|
void paint(Painter&) override;
|
||||||
|
|
||||||
std::string title() const override { return "SSTV TX (beta)"; };
|
std::string title() const override { return "SSTV TX"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NavigationView& nav_;
|
NavigationView& nav_;
|
||||||
|
@ -110,7 +110,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "TouchTunes TX"; };
|
std::string title() const override { return "TouchTunes"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t scan_button_index { };
|
uint32_t scan_button_index { };
|
||||||
|
@ -37,7 +37,7 @@ namespace ui
|
|||||||
public:
|
public:
|
||||||
WhipCalcView(NavigationView &nav);
|
WhipCalcView(NavigationView &nav);
|
||||||
void focus() override;
|
void focus() override;
|
||||||
std::string title() const override { return "Antenna length"; };
|
std::string title() const override { return "Ant. length"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const double speed_of_light_mps = 299792458.0; // m/s
|
const double speed_of_light_mps = 299792458.0; // m/s
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -40,6 +40,7 @@ using namespace hackrf::one;
|
|||||||
#include "cpld_update.hpp"
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
|
#include "portapack_persistent_memory.hpp"
|
||||||
|
|
||||||
namespace radio {
|
namespace radio {
|
||||||
|
|
||||||
@ -168,7 +169,11 @@ void set_direction(const rf::Direction new_direction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool set_tuning_frequency(const rf::Frequency frequency) {
|
bool set_tuning_frequency(const rf::Frequency frequency) {
|
||||||
const auto tuning_config = tuning::config::create(frequency);
|
rf::Frequency final_frequency = frequency ;
|
||||||
|
if( portapack::persistent_memory::config_hamitup() ) {
|
||||||
|
final_frequency = frequency + portapack::persistent_memory::config_hamitup_freq();
|
||||||
|
}
|
||||||
|
const auto tuning_config = tuning::config::create(final_frequency);
|
||||||
if( tuning_config.is_valid() ) {
|
if( tuning_config.is_valid() ) {
|
||||||
first_if.disable();
|
first_if.disable();
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ SystemStatusView::SystemStatusView(
|
|||||||
&button_back,
|
&button_back,
|
||||||
&title,
|
&title,
|
||||||
&button_title,
|
&button_title,
|
||||||
|
&button_hamitup,
|
||||||
&button_speaker,
|
&button_speaker,
|
||||||
&button_stealth,
|
&button_stealth,
|
||||||
//&button_textentry,
|
//&button_textentry,
|
||||||
@ -148,6 +149,10 @@ SystemStatusView::SystemStatusView(
|
|||||||
this->on_title();
|
this->on_title();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
button_hamitup.on_select = [this](ImageButton&) {
|
||||||
|
this->on_hamitup();
|
||||||
|
};
|
||||||
|
|
||||||
button_speaker.on_select = [this](ImageButton&) {
|
button_speaker.on_select = [this](ImageButton&) {
|
||||||
this->on_speaker();
|
this->on_speaker();
|
||||||
};
|
};
|
||||||
@ -179,6 +184,17 @@ SystemStatusView::SystemStatusView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SystemStatusView::refresh() {
|
void SystemStatusView::refresh() {
|
||||||
|
if( portapack::persistent_memory::config_hamitup() )
|
||||||
|
{
|
||||||
|
button_hamitup.set_foreground(Color::red());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
button_hamitup.set_foreground(Color::light_grey());
|
||||||
|
}
|
||||||
|
// Retune to take hamitup change in account
|
||||||
|
receiver_model.set_tuning_frequency( portapack::persistent_memory::tuned_frequency() );
|
||||||
|
|
||||||
if (!portapack::persistent_memory::config_speaker()) {
|
if (!portapack::persistent_memory::config_speaker()) {
|
||||||
button_speaker.set_foreground(Color::light_grey());
|
button_speaker.set_foreground(Color::light_grey());
|
||||||
button_speaker.set_bitmap(&bitmap_icon_speaker_mute);
|
button_speaker.set_bitmap(&bitmap_icon_speaker_mute);
|
||||||
@ -187,6 +203,7 @@ void SystemStatusView::refresh() {
|
|||||||
else {
|
else {
|
||||||
button_speaker.hidden(true);
|
button_speaker.hidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (portapack::get_antenna_bias()) {
|
if (portapack::get_antenna_bias()) {
|
||||||
button_bias_tee.set_bitmap(&bitmap_icon_biast_on);
|
button_bias_tee.set_bitmap(&bitmap_icon_biast_on);
|
||||||
button_bias_tee.set_foreground(ui::Color::yellow());
|
button_bias_tee.set_foreground(ui::Color::yellow());
|
||||||
@ -202,6 +219,7 @@ void SystemStatusView::refresh() {
|
|||||||
button_clock_status.set_bitmap(&bitmap_icon_clk_int);
|
button_clock_status.set_bitmap(&bitmap_icon_clk_int);
|
||||||
// button_bias_tee.set_foreground(ui::Color::green());
|
// button_bias_tee.set_foreground(ui::Color::green());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(portapack::persistent_memory::clkout_enabled()) {
|
if(portapack::persistent_memory::clkout_enabled()) {
|
||||||
button_clock_status.set_foreground(ui::Color::green());
|
button_clock_status.set_foreground(ui::Color::green());
|
||||||
} else {
|
} else {
|
||||||
@ -239,6 +257,20 @@ void SystemStatusView::set_title(const std::string new_value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SystemStatusView::on_hamitup() {
|
||||||
|
if(!portapack::persistent_memory::config_hamitup())
|
||||||
|
{
|
||||||
|
portapack::persistent_memory::set_config_hamitup( true );
|
||||||
|
button_hamitup.set_foreground(Color::red());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
portapack::persistent_memory::set_config_hamitup( false );
|
||||||
|
button_hamitup.set_foreground(Color::light_grey());
|
||||||
|
}
|
||||||
|
receiver_model.set_tuning_frequency( portapack::persistent_memory::tuned_frequency() ); // Retune
|
||||||
|
}
|
||||||
|
|
||||||
void SystemStatusView::on_speaker() {
|
void SystemStatusView::on_speaker() {
|
||||||
if (!portapack::speaker_mode)
|
if (!portapack::speaker_mode)
|
||||||
{
|
{
|
||||||
@ -467,26 +499,26 @@ void NavigationView::focus() {
|
|||||||
/* ReceiversMenuView *****************************************************/
|
/* ReceiversMenuView *****************************************************/
|
||||||
|
|
||||||
ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
|
ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
|
||||||
if( portapack::persistent_memory::show_gui_return_icon() )
|
if( portapack::persistent_memory::show_gui_return_icon() )
|
||||||
{
|
{
|
||||||
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
|
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
|
||||||
}
|
}
|
||||||
add_items( {
|
add_items( {
|
||||||
{ "ADS-B", ui::Color::green(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBRxView>(); }, },
|
{ "ADS-B", ui::Color::green(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBRxView>(); }, },
|
||||||
//{ "ACARS", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ACARSAppView>(); }, },
|
//{ "ACARS", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ACARSAppView>(); }, },
|
||||||
{ "AIS Boats", ui::Color::green(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
|
{ "AIS Boats", ui::Color::green(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
|
||||||
{ "AFSK", ui::Color::yellow(), &bitmap_icon_modem, [&nav](){ nav.push<AFSKRxView>(); } },
|
{ "AFSK", ui::Color::yellow(), &bitmap_icon_modem, [&nav](){ nav.push<AFSKRxView>(); } },
|
||||||
{ "BTLE", ui::Color::yellow(), &bitmap_icon_btle, [&nav](){ nav.push<BTLERxView>(); } },
|
{ "BTLE", ui::Color::yellow(), &bitmap_icon_btle, [&nav](){ nav.push<BTLERxView>(); } },
|
||||||
{ "NRF", ui::Color::yellow(), &bitmap_icon_nrf, [&nav](){ nav.push<NRFRxView>(); } },
|
{ "NRF", ui::Color::yellow(), &bitmap_icon_nrf, [&nav](){ nav.push<NRFRxView>(); } },
|
||||||
{ "Audio", ui::Color::green(), &bitmap_icon_speaker, [&nav](){ nav.push<AnalogAudioView>(); } },
|
{ "Audio", ui::Color::green(), &bitmap_icon_speaker, [&nav](){ nav.push<AnalogAudioView>(); } },
|
||||||
{ "Analog TV", ui::Color::yellow(), &bitmap_icon_sstv, [&nav](){ nav.push<AnalogTvView>(); } },
|
{ "Analog TV", ui::Color::yellow(), &bitmap_icon_sstv, [&nav](){ nav.push<AnalogTvView>(); } },
|
||||||
{ "ERT Meter", ui::Color::green(), &bitmap_icon_ert, [&nav](){ nav.push<ERTAppView>(); } },
|
{ "ERT Meter", ui::Color::green(), &bitmap_icon_ert, [&nav](){ nav.push<ERTAppView>(); } },
|
||||||
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGAppView>(); } },
|
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGAppView>(); } },
|
||||||
{ "Radiosnde", ui::Color::green(), &bitmap_icon_sonde, [&nav](){ nav.push<SondeView>(); } },
|
{ "Radiosnde", ui::Color::green(), &bitmap_icon_sonde, [&nav](){ nav.push<SondeView>(); } },
|
||||||
{ "TPMS Cars", ui::Color::green(), &bitmap_icon_tpms, [&nav](){ nav.push<TPMSAppView>(); } },
|
{ "TPMS Cars", ui::Color::green(), &bitmap_icon_tpms, [&nav](){ nav.push<TPMSAppView>(); } },
|
||||||
{ "Recon", ui::Color::green(), &bitmap_icon_scanner, [&nav](){ nav.push<ReconView>(); } },
|
{ "Recon", ui::Color::green(), &bitmap_icon_scanner, [&nav](){ nav.push<ReconView>(); } },
|
||||||
{ "Level", ui::Color::green(), &bitmap_icon_options_radio, [&nav](){ nav.push<LevelView>(); } },
|
{ "Level", ui::Color::green(), &bitmap_icon_options_radio, [&nav](){ nav.push<LevelView>(); } },
|
||||||
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSRXView>(); } }
|
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSRXView>(); } }
|
||||||
/*
|
/*
|
||||||
{ "DMR", ui::Color::dark_grey(), &bitmap_icon_dmr, [&nav](){ nav.push<NotImplementedView>(); } },
|
{ "DMR", ui::Color::dark_grey(), &bitmap_icon_dmr, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
{ "SIGFOX", ui::Color::dark_grey(), &bitmap_icon_fox, [&nav](){ nav.push<NotImplementedView>(); } }, // SIGFRXView
|
{ "SIGFOX", ui::Color::dark_grey(), &bitmap_icon_fox, [&nav](){ nav.push<NotImplementedView>(); } }, // SIGFRXView
|
||||||
@ -501,30 +533,29 @@ ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
|
|||||||
/* TransmittersMenuView **************************************************/
|
/* TransmittersMenuView **************************************************/
|
||||||
|
|
||||||
TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
||||||
if( portapack::persistent_memory::show_gui_return_icon() )
|
if( portapack::persistent_memory::show_gui_return_icon() )
|
||||||
{
|
{
|
||||||
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
|
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
|
||||||
}
|
}
|
||||||
add_items({
|
add_items({
|
||||||
{ "ADS-B [S]", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBTxView>(); } },
|
{ "ADS-B [S]", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBTxView>(); } },
|
||||||
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSTXView>(); } },
|
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSTXView>(); } },
|
||||||
{ "BHT Xy/EP", ui::Color::green(), &bitmap_icon_bht, [&nav](){ nav.push<BHTView>(); } },
|
{ "BHT Xy/EP", ui::Color::green(), &bitmap_icon_bht, [&nav](){ nav.push<BHTView>(); } },
|
||||||
{ "GPS Sim", ui::Color::yellow(), &bitmap_icon_gps_sim, [&nav](){ nav.push<GpsSimAppView>(); } },
|
{ "GPS Sim", ui::Color::yellow(), &bitmap_icon_gps_sim, [&nav](){ nav.push<GpsSimAppView>(); } },
|
||||||
{ "Jammer", ui::Color::green(), &bitmap_icon_jammer, [&nav](){ nav.push<JammerView>(); } },
|
{ "Jammer", ui::Color::green(), &bitmap_icon_jammer, [&nav](){ nav.push<JammerView>(); } },
|
||||||
{ "Key fob", ui::Color::orange(), &bitmap_icon_keyfob, [&nav](){ nav.push<KeyfobView>(); } },
|
{ "Key fob", ui::Color::orange(), &bitmap_icon_keyfob, [&nav](){ nav.push<KeyfobView>(); } },
|
||||||
{ "LGE tool", ui::Color::yellow(), &bitmap_icon_lge, [&nav](){ nav.push<LGEView>(); } },
|
{ "LGE tool", ui::Color::yellow(), &bitmap_icon_lge, [&nav](){ nav.push<LGEView>(); } },
|
||||||
{ "Morse", ui::Color::green(), &bitmap_icon_morse, [&nav](){ nav.push<MorseView>(); } },
|
{ "Morse", ui::Color::green(), &bitmap_icon_morse, [&nav](){ nav.push<MorseView>(); } },
|
||||||
{ "BurgerPgr", ui::Color::yellow(), &bitmap_icon_burger, [&nav](){ nav.push<CoasterPagerView>(); } },
|
{ "BurgerPgr", ui::Color::yellow(), &bitmap_icon_burger, [&nav](){ nav.push<CoasterPagerView>(); } },
|
||||||
//{ "Nuoptix DTMF", ui::Color::green(), &bitmap_icon_nuoptix, [&nav](){ nav.push<NuoptixView>(); } },
|
//{ "Nuoptix DTMF", ui::Color::green(), &bitmap_icon_nuoptix, [&nav](){ nav.push<NuoptixView>(); } },
|
||||||
{ "OOK", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<EncodersView>(); } },
|
{ "OOK", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<EncodersView>(); } },
|
||||||
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGTXView>(); } },
|
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGTXView>(); } },
|
||||||
{ "RDS", ui::Color::green(), &bitmap_icon_rds, [&nav](){ nav.push<RDSView>(); } },
|
{ "RDS", ui::Color::green(), &bitmap_icon_rds, [&nav](){ nav.push<RDSView>(); } },
|
||||||
{ "Soundbrd", ui::Color::green(), &bitmap_icon_soundboard,[&nav](){ nav.push<SoundBoardView>(); } },
|
{ "Soundbrd", ui::Color::green(), &bitmap_icon_soundboard,[&nav](){ nav.push<SoundBoardView>(); } },
|
||||||
{ "SSTV", ui::Color::green(), &bitmap_icon_sstv, [&nav](){ nav.push<SSTVTXView>(); } },
|
{ "SSTV", ui::Color::green(), &bitmap_icon_sstv, [&nav](){ nav.push<SSTVTXView>(); } },
|
||||||
{ "TEDI/LCR", ui::Color::yellow(), &bitmap_icon_lcr, [&nav](){ nav.push<LCRView>(); } },
|
{ "TEDI/LCR", ui::Color::yellow(), &bitmap_icon_lcr, [&nav](){ nav.push<LCRView>(); } },
|
||||||
{ "TouchTune", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<TouchTunesView>(); } },
|
{ "TouchTune", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<TouchTunesView>(); } },
|
||||||
{ "Playlist", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<PlaylistView>(); } },
|
{ "Playlist", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<PlaylistView>(); } },
|
||||||
|
|
||||||
//{ "Remote", ui::Color::dark_grey(), &bitmap_icon_remote, [&nav](){ nav.push<RemoteView>(); } },
|
//{ "Remote", ui::Color::dark_grey(), &bitmap_icon_remote, [&nav](){ nav.push<RemoteView>(); } },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -532,10 +563,10 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
|||||||
/* UtilitiesMenuView *****************************************************/
|
/* UtilitiesMenuView *****************************************************/
|
||||||
|
|
||||||
UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
|
UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
|
||||||
if( portapack::persistent_memory::show_gui_return_icon() )
|
if( portapack::persistent_memory::show_gui_return_icon() )
|
||||||
{
|
{
|
||||||
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
|
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
|
||||||
}
|
}
|
||||||
add_items({
|
add_items({
|
||||||
//{ "Test app", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<TestView>(); } },
|
//{ "Test app", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<TestView>(); } },
|
||||||
{ "Freq. manager", ui::Color::green(), &bitmap_icon_freqman, [&nav](){ nav.push<FrequencyManagerView>(); } },
|
{ "Freq. manager", ui::Color::green(), &bitmap_icon_freqman, [&nav](){ nav.push<FrequencyManagerView>(); } },
|
||||||
@ -570,7 +601,7 @@ SystemMenuView::SystemMenuView(NavigationView& nav) {
|
|||||||
{ "Transmit", ui::Color::cyan(), &bitmap_icon_transmit, [&nav](){ nav.push<TransmittersMenuView>(); } },
|
{ "Transmit", ui::Color::cyan(), &bitmap_icon_transmit, [&nav](){ nav.push<TransmittersMenuView>(); } },
|
||||||
{ "Capture", ui::Color::red(), &bitmap_icon_capture, [&nav](){ nav.push<CaptureAppView>(); } },
|
{ "Capture", ui::Color::red(), &bitmap_icon_capture, [&nav](){ nav.push<CaptureAppView>(); } },
|
||||||
{ "Replay", ui::Color::green(), &bitmap_icon_replay, [&nav](){ nav.push<ReplayAppView>(); } },
|
{ "Replay", ui::Color::green(), &bitmap_icon_replay, [&nav](){ nav.push<ReplayAppView>(); } },
|
||||||
{ "Search", ui::Color::yellow(), &bitmap_icon_search, [&nav](){ nav.push<SearchView>(); } },
|
{ "Search", ui::Color::yellow(), &bitmap_icon_search, [&nav](){ nav.push<SearchView>(); } },
|
||||||
{ "Scanner", ui::Color::yellow(), &bitmap_icon_scanner, [&nav](){ nav.push<ScannerView>(); } },
|
{ "Scanner", ui::Color::yellow(), &bitmap_icon_scanner, [&nav](){ nav.push<ScannerView>(); } },
|
||||||
{ "Microphone", ui::Color::yellow(), &bitmap_icon_microphone,[&nav](){ nav.push<MicTXView>(); } },
|
{ "Microphone", ui::Color::yellow(), &bitmap_icon_microphone,[&nav](){ nav.push<MicTXView>(); } },
|
||||||
{ "Looking Glass", ui::Color::yellow(), &bitmap_icon_looking, [&nav](){ nav.push<GlassView>(); } },
|
{ "Looking Glass", ui::Color::yellow(), &bitmap_icon_looking, [&nav](){ nav.push<GlassView>(); } },
|
||||||
|
@ -142,11 +142,18 @@ namespace ui
|
|||||||
Color::dark_grey()};
|
Color::dark_grey()};
|
||||||
|
|
||||||
ImageButton button_speaker{
|
ImageButton button_speaker{
|
||||||
{17 * 8, 0, 2 * 8, 1 * 16},
|
{15 * 8, 0, 2 * 8, 1 * 16},
|
||||||
&bitmap_icon_speaker_mute,
|
&bitmap_icon_speaker_mute,
|
||||||
Color::light_grey(),
|
Color::light_grey(),
|
||||||
Color::dark_grey()};
|
Color::dark_grey()};
|
||||||
|
|
||||||
|
ImageButton button_hamitup{
|
||||||
|
{17 * 8, 0, 2 * 8, 1 * 16},
|
||||||
|
&bitmap_icon_hamitup,
|
||||||
|
Color::light_grey(),
|
||||||
|
Color::dark_grey()
|
||||||
|
};
|
||||||
|
|
||||||
ImageButton button_stealth{
|
ImageButton button_stealth{
|
||||||
{19 * 8, 0, 2 * 8, 1 * 16},
|
{19 * 8, 0, 2 * 8, 1 * 16},
|
||||||
&bitmap_icon_stealth,
|
&bitmap_icon_stealth,
|
||||||
@ -187,6 +194,7 @@ namespace ui
|
|||||||
SDCardStatusView sd_card_status_view{
|
SDCardStatusView sd_card_status_view{
|
||||||
{28 * 8, 0 * 16, 2 * 8, 1 * 16}};
|
{28 * 8, 0 * 16, 2 * 8, 1 * 16}};
|
||||||
|
|
||||||
|
void on_hamitup();
|
||||||
void on_speaker();
|
void on_speaker();
|
||||||
void on_stealth();
|
void on_stealth();
|
||||||
void on_bias_tee();
|
void on_bias_tee();
|
||||||
|
@ -288,6 +288,10 @@ struct data_t {
|
|||||||
// Recon App
|
// Recon App
|
||||||
uint64_t recon_config;
|
uint64_t recon_config;
|
||||||
|
|
||||||
|
// HamItUp (+125MHz offset by default, configurable)
|
||||||
|
bool hamitup;
|
||||||
|
int64_t hamitup_freq;
|
||||||
|
|
||||||
constexpr data_t() :
|
constexpr data_t() :
|
||||||
structure_version(data_structure_version_enum::VERSION_CURRENT),
|
structure_version(data_structure_version_enum::VERSION_CURRENT),
|
||||||
tuned_frequency(tuned_frequency_reset_value),
|
tuned_frequency(tuned_frequency_reset_value),
|
||||||
@ -315,7 +319,9 @@ struct data_t {
|
|||||||
tone_mix(tone_mix_reset_value),
|
tone_mix(tone_mix_reset_value),
|
||||||
|
|
||||||
hardware_config(0),
|
hardware_config(0),
|
||||||
recon_config(0)
|
recon_config(0),
|
||||||
|
hamitup(0),
|
||||||
|
hamitup_freq(125000000)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -733,6 +739,17 @@ void set_recon_load_hamradios(const bool v ){
|
|||||||
void set_recon_match_mode(const bool v ) {
|
void set_recon_match_mode(const bool v ) {
|
||||||
data->recon_config = (data->recon_config & ~0x00800000UL) | (v << 23);
|
data->recon_config = (data->recon_config & ~0x00800000UL) | (v << 23);
|
||||||
}
|
}
|
||||||
|
bool config_hamitup() {
|
||||||
|
return data->hamitup;
|
||||||
|
}
|
||||||
|
void set_config_hamitup(const bool v ){
|
||||||
|
data-> hamitup = v ;
|
||||||
|
}
|
||||||
|
int64_t config_hamitup_freq() {
|
||||||
|
return data->hamitup_freq ;
|
||||||
|
}
|
||||||
|
void set_config_hamitup_freq(const int64_t v ){
|
||||||
|
data-> hamitup_freq = v ;
|
||||||
|
}
|
||||||
} /* namespace persistent_memory */
|
} /* namespace persistent_memory */
|
||||||
} /* namespace portapack */
|
} /* namespace portapack */
|
||||||
|
@ -151,6 +151,8 @@ uint8_t config_cpld();
|
|||||||
void set_config_cpld(uint8_t i);
|
void set_config_cpld(uint8_t i);
|
||||||
|
|
||||||
bool config_splash();
|
bool config_splash();
|
||||||
|
bool config_hamitup();
|
||||||
|
int64_t config_hamitup_freq();
|
||||||
bool show_gui_return_icon();
|
bool show_gui_return_icon();
|
||||||
bool load_app_settings();
|
bool load_app_settings();
|
||||||
bool save_app_settings();
|
bool save_app_settings();
|
||||||
@ -167,6 +169,8 @@ void set_load_app_settings(bool v);
|
|||||||
void set_save_app_settings(bool v);
|
void set_save_app_settings(bool v);
|
||||||
void set_show_bigger_qr_code(bool v);
|
void set_show_bigger_qr_code(bool v);
|
||||||
void set_config_splash(bool v);
|
void set_config_splash(bool v);
|
||||||
|
void set_config_hamitup(bool v);
|
||||||
|
void set_config_hamitup_freq(const int64_t v );
|
||||||
void set_clock_hidden(bool v);
|
void set_clock_hidden(bool v);
|
||||||
void set_clock_with_date(bool v);
|
void set_clock_with_date(bool v);
|
||||||
void set_config_login(bool v);
|
void set_config_login(bool v);
|
||||||
|
BIN
firmware/graphics/icon_hamitup.png
Executable file
BIN
firmware/graphics/icon_hamitup.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 189 B |
Loading…
Reference in New Issue
Block a user