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:
gullradriel 2023-03-22 08:46:58 +01:00 committed by GitHub
parent 2457ba016f
commit 92b622deac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 2436 additions and 2313 deletions

View File

@ -166,7 +166,7 @@ public:
void focus() override;
std::string title() const override { return "AIS Boats RX"; };
std::string title() const override { return "AIS RX"; };
private:
static constexpr uint32_t initial_target_frequency = 162025000;

View File

@ -53,7 +53,7 @@ public:
void focus() override;
std::string title() const override { return "Analog TV RX"; };
std::string title() const override { return "AnalogTV RX"; };
private:
static constexpr ui::Dim header_height = 3 * 16;

View File

@ -125,7 +125,7 @@ public:
void focus() override;
std::string title() const override { return "ERT Meter RX"; };
std::string title() const override { return "ERT RX"; };
private:
ERTRecentEntries recent { };

View File

@ -46,7 +46,7 @@ public:
void focus() override;
std::string title() const override { return "Soundboard TX"; };
std::string title() const override { return "Soundbrd TX"; };
private:
NavigationView& nav_;

View File

@ -103,7 +103,7 @@ public:
void focus() override;
std::string title() const override { return "TPMS Cars RX"; };
std::string title() const override { return "TPMS RX"; };
private:
static constexpr uint32_t initial_target_frequency = 315000000;

View File

@ -52,7 +52,7 @@ public:
void focus() override;
std::string title() const override { return "AFSK RX (beta)"; };
std::string title() const override { return "AFSK RX"; };
private:
void on_data(uint32_t value, bool is_data);

View File

@ -179,7 +179,7 @@ public:
void focus() override;
std::string title() const override { return "BHT Xy/EP TX"; };
std::string title() const override { return "BHT TX"; };
private:
// app save settings

View File

@ -40,7 +40,7 @@ public:
void focus() override;
std::string title() const override { return "BurgerPgr TX"; };
std::string title() const override { return "BurgerPgrTX"; };
private:
enum tx_modes {

View File

@ -48,7 +48,7 @@ public:
void load_directory_contents(const std::filesystem::path& dir_path);
std::filesystem::path get_selected_path();
std::string title() const override { return "File manager"; };
std::string title() const override { return "Fileman"; };
protected:
NavigationView& nav_;

View File

@ -87,7 +87,7 @@ class FrequencySaveView : public FreqManBaseView {
public:
FrequencySaveView(NavigationView& nav, const rf::Frequency value);
std::string title() const override { return "Save frequency"; };
std::string title() const override { return "Save freq."; };
private:
std::string desc_buffer { };
@ -126,7 +126,7 @@ public:
FrequencyLoadView(NavigationView& nav);
std::string title() const override { return "Load frequency"; };
std::string title() const override { return "Load freq."; };
private:
void refresh_widgets(const bool v);
@ -137,7 +137,7 @@ public:
FrequencyManagerView(NavigationView& nav);
~FrequencyManagerView();
std::string title() const override { return "Freq. manager"; };
std::string title() const override { return "Freqman"; };
private:
std::string desc_buffer { };

View File

@ -49,7 +49,7 @@ namespace ui
GlassView& operator=(const GlassView &nav);
~GlassView();
std::string title() const override { return "Looking Glass"; };
std::string title() const override { return "LookingGlass"; };
void on_show() override;
void on_hide() override;

View File

@ -38,7 +38,7 @@ public:
~WipeSDView();
void focus() override;
std::string title() const override { return "Wipe SD Card"; };
std::string title() const override { return "Wipe sdcard"; };
private:
NavigationView& nav_;

View File

@ -38,6 +38,8 @@ using namespace portapack;
#include "ui_font_fixed_8x16.hpp"
#include "cpld_update.hpp"
#include "freqman.hpp"
namespace ui {
SetDateTimeView::SetDateTimeView(
@ -144,6 +146,8 @@ SetRadioView::SetRadioView(
}
add_children({
&check_hamitup,
&button_hamitup_freq,
&check_clkout,
&field_clkout_freq,
&labels_clkout_khz,
@ -168,6 +172,28 @@ SetRadioView::SetRadioView(
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());
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({
{ "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>(); } },
{ "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>(); } },
{ "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>(); } },
{ "QR Code", ui::Color::dark_cyan(), &bitmap_icon_qr_code, [&nav](){ nav.push<SetQRCodeView>(); } }
{ "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>(); } },
{ "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>(); } },
{ "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>(); } },
{ "QR Code", ui::Color::dark_cyan(), &bitmap_icon_qr_code, [&nav](){ nav.push<SetQRCodeView>(); } }
});
set_max_rows(2); // allow wider buttons
}

View File

@ -124,7 +124,7 @@ public:
void focus() override;
std::string title() const override { return "Radio settings"; };
std::string title() const override { return "Radio"; };
private:
const Style style_text {
@ -154,7 +154,7 @@ private:
{ { 6 * 8, 4 * 16 }, "PPM", Color::light_grey() },
};
Checkbox check_clkout {
Checkbox check_clkout {
{ 18, (6 * 16 - 4) },
13,
"Enable CLKOUT"
@ -193,11 +193,21 @@ private:
};
Checkbox check_bias {
{ 28, 13 * 16 },
{ 18, 12 * 16 },
5,
"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 {
{ 2 * 8, 16 * 16, 12 * 8, 32 },
"Save"
@ -219,7 +229,7 @@ public:
void focus() override;
std::string title() const override { return "UI settings"; };
std::string title() const override { return "UI"; };
private:
@ -299,7 +309,7 @@ public:
void focus() override;
std::string title() const override { return "App Settings"; };
std::string title() const override { return "AppSettings"; };
private:
@ -332,7 +342,7 @@ public:
void focus() override;
std::string title() const override { return "Audio settings"; };
std::string title() const override { return "Audio"; };
private:
Labels labels {

View File

@ -62,7 +62,7 @@ public:
void focus() override;
std::string title() const override { return "Radiosonde RX"; };
std::string title() const override { return "Radiosnd RX"; };

View File

@ -53,7 +53,7 @@ public:
void focus() override;
void paint(Painter&) override;
std::string title() const override { return "SSTV TX (beta)"; };
std::string title() const override { return "SSTV TX"; };
private:
NavigationView& nav_;

View File

@ -110,7 +110,7 @@ public:
void focus() override;
std::string title() const override { return "TouchTunes TX"; };
std::string title() const override { return "TouchTunes"; };
private:
uint32_t scan_button_index { };

View File

@ -37,7 +37,7 @@ namespace ui
public:
WhipCalcView(NavigationView &nav);
void focus() override;
std::string title() const override { return "Antenna length"; };
std::string title() const override { return "Ant. length"; };
private:
const double speed_of_light_mps = 299792458.0; // m/s

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,7 @@ using namespace hackrf::one;
#include "cpld_update.hpp"
#include "portapack.hpp"
#include "portapack_persistent_memory.hpp"
namespace radio {
@ -168,7 +169,11 @@ void set_direction(const rf::Direction new_direction) {
}
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() ) {
first_if.disable();

View File

@ -111,6 +111,7 @@ SystemStatusView::SystemStatusView(
&button_back,
&title,
&button_title,
&button_hamitup,
&button_speaker,
&button_stealth,
//&button_textentry,
@ -148,6 +149,10 @@ SystemStatusView::SystemStatusView(
this->on_title();
};
button_hamitup.on_select = [this](ImageButton&) {
this->on_hamitup();
};
button_speaker.on_select = [this](ImageButton&) {
this->on_speaker();
};
@ -179,6 +184,17 @@ SystemStatusView::SystemStatusView(
}
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()) {
button_speaker.set_foreground(Color::light_grey());
button_speaker.set_bitmap(&bitmap_icon_speaker_mute);
@ -187,6 +203,7 @@ void SystemStatusView::refresh() {
else {
button_speaker.hidden(true);
}
if (portapack::get_antenna_bias()) {
button_bias_tee.set_bitmap(&bitmap_icon_biast_on);
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_bias_tee.set_foreground(ui::Color::green());
}
if(portapack::persistent_memory::clkout_enabled()) {
button_clock_status.set_foreground(ui::Color::green());
} 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() {
if (!portapack::speaker_mode)
{
@ -467,26 +499,26 @@ void NavigationView::focus() {
/* ReceiversMenuView *****************************************************/
ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
if( portapack::persistent_memory::show_gui_return_icon() )
{
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
}
add_items( {
{ "ADS-B", ui::Color::green(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBRxView>(); }, },
//{ "ACARS", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ACARSAppView>(); }, },
{ "AIS Boats", ui::Color::green(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
{ "AFSK", ui::Color::yellow(), &bitmap_icon_modem, [&nav](){ nav.push<AFSKRxView>(); } },
{ "BTLE", ui::Color::yellow(), &bitmap_icon_btle, [&nav](){ nav.push<BTLERxView>(); } },
{ "NRF", ui::Color::yellow(), &bitmap_icon_nrf, [&nav](){ nav.push<NRFRxView>(); } },
{ "Audio", ui::Color::green(), &bitmap_icon_speaker, [&nav](){ nav.push<AnalogAudioView>(); } },
{ "Analog TV", ui::Color::yellow(), &bitmap_icon_sstv, [&nav](){ nav.push<AnalogTvView>(); } },
{ "ERT Meter", ui::Color::green(), &bitmap_icon_ert, [&nav](){ nav.push<ERTAppView>(); } },
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGAppView>(); } },
{ "Radiosnde", ui::Color::green(), &bitmap_icon_sonde, [&nav](){ nav.push<SondeView>(); } },
{ "TPMS Cars", ui::Color::green(), &bitmap_icon_tpms, [&nav](){ nav.push<TPMSAppView>(); } },
{ "Recon", ui::Color::green(), &bitmap_icon_scanner, [&nav](){ nav.push<ReconView>(); } },
{ "Level", ui::Color::green(), &bitmap_icon_options_radio, [&nav](){ nav.push<LevelView>(); } },
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSRXView>(); } }
if( portapack::persistent_memory::show_gui_return_icon() )
{
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
}
add_items( {
{ "ADS-B", ui::Color::green(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBRxView>(); }, },
//{ "ACARS", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ACARSAppView>(); }, },
{ "AIS Boats", ui::Color::green(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
{ "AFSK", ui::Color::yellow(), &bitmap_icon_modem, [&nav](){ nav.push<AFSKRxView>(); } },
{ "BTLE", ui::Color::yellow(), &bitmap_icon_btle, [&nav](){ nav.push<BTLERxView>(); } },
{ "NRF", ui::Color::yellow(), &bitmap_icon_nrf, [&nav](){ nav.push<NRFRxView>(); } },
{ "Audio", ui::Color::green(), &bitmap_icon_speaker, [&nav](){ nav.push<AnalogAudioView>(); } },
{ "Analog TV", ui::Color::yellow(), &bitmap_icon_sstv, [&nav](){ nav.push<AnalogTvView>(); } },
{ "ERT Meter", ui::Color::green(), &bitmap_icon_ert, [&nav](){ nav.push<ERTAppView>(); } },
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGAppView>(); } },
{ "Radiosnde", ui::Color::green(), &bitmap_icon_sonde, [&nav](){ nav.push<SondeView>(); } },
{ "TPMS Cars", ui::Color::green(), &bitmap_icon_tpms, [&nav](){ nav.push<TPMSAppView>(); } },
{ "Recon", ui::Color::green(), &bitmap_icon_scanner, [&nav](){ nav.push<ReconView>(); } },
{ "Level", ui::Color::green(), &bitmap_icon_options_radio, [&nav](){ nav.push<LevelView>(); } },
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSRXView>(); } }
/*
{ "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
@ -501,30 +533,29 @@ ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
/* TransmittersMenuView **************************************************/
TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
if( portapack::persistent_memory::show_gui_return_icon() )
{
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
}
add_items({
{ "ADS-B [S]", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBTxView>(); } },
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSTXView>(); } },
{ "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>(); } },
{ "Jammer", ui::Color::green(), &bitmap_icon_jammer, [&nav](){ nav.push<JammerView>(); } },
{ "Key fob", ui::Color::orange(), &bitmap_icon_keyfob, [&nav](){ nav.push<KeyfobView>(); } },
{ "LGE tool", ui::Color::yellow(), &bitmap_icon_lge, [&nav](){ nav.push<LGEView>(); } },
if( portapack::persistent_memory::show_gui_return_icon() )
{
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
}
add_items({
{ "ADS-B [S]", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBTxView>(); } },
{ "APRS", ui::Color::green(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSTXView>(); } },
{ "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>(); } },
{ "Jammer", ui::Color::green(), &bitmap_icon_jammer, [&nav](){ nav.push<JammerView>(); } },
{ "Key fob", ui::Color::orange(), &bitmap_icon_keyfob, [&nav](){ nav.push<KeyfobView>(); } },
{ "LGE tool", ui::Color::yellow(), &bitmap_icon_lge, [&nav](){ nav.push<LGEView>(); } },
{ "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>(); } },
{ "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>(); } },
{ "Soundbrd", ui::Color::green(), &bitmap_icon_soundboard,[&nav](){ nav.push<SoundBoardView>(); } },
{ "SSTV", ui::Color::green(), &bitmap_icon_sstv, [&nav](){ nav.push<SSTVTXView>(); } },
{ "TEDI/LCR", ui::Color::yellow(), &bitmap_icon_lcr, [&nav](){ nav.push<LCRView>(); } },
{ "Soundbrd", ui::Color::green(), &bitmap_icon_soundboard,[&nav](){ nav.push<SoundBoardView>(); } },
{ "SSTV", ui::Color::green(), &bitmap_icon_sstv, [&nav](){ nav.push<SSTVTXView>(); } },
{ "TEDI/LCR", ui::Color::yellow(), &bitmap_icon_lcr, [&nav](){ nav.push<LCRView>(); } },
{ "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>(); } },
});
}
@ -532,10 +563,10 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
/* UtilitiesMenuView *****************************************************/
UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
if( portapack::persistent_memory::show_gui_return_icon() )
{
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
}
if( portapack::persistent_memory::show_gui_return_icon() )
{
add_items( { { "..", ui::Color::light_grey(),&bitmap_icon_previous , [&nav](){ nav.pop(); } } } );
}
add_items({
//{ "Test app", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<TestView>(); } },
{ "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>(); } },
{ "Capture", ui::Color::red(), &bitmap_icon_capture, [&nav](){ nav.push<CaptureAppView>(); } },
{ "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>(); } },
{ "Microphone", ui::Color::yellow(), &bitmap_icon_microphone,[&nav](){ nav.push<MicTXView>(); } },
{ "Looking Glass", ui::Color::yellow(), &bitmap_icon_looking, [&nav](){ nav.push<GlassView>(); } },

View File

@ -142,11 +142,18 @@ namespace ui
Color::dark_grey()};
ImageButton button_speaker{
{17 * 8, 0, 2 * 8, 1 * 16},
{15 * 8, 0, 2 * 8, 1 * 16},
&bitmap_icon_speaker_mute,
Color::light_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{
{19 * 8, 0, 2 * 8, 1 * 16},
&bitmap_icon_stealth,
@ -187,6 +194,7 @@ namespace ui
SDCardStatusView sd_card_status_view{
{28 * 8, 0 * 16, 2 * 8, 1 * 16}};
void on_hamitup();
void on_speaker();
void on_stealth();
void on_bias_tee();

View File

@ -288,6 +288,10 @@ struct data_t {
// Recon App
uint64_t recon_config;
// HamItUp (+125MHz offset by default, configurable)
bool hamitup;
int64_t hamitup_freq;
constexpr data_t() :
structure_version(data_structure_version_enum::VERSION_CURRENT),
tuned_frequency(tuned_frequency_reset_value),
@ -315,7 +319,9 @@ struct data_t {
tone_mix(tone_mix_reset_value),
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 ) {
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 portapack */

View File

@ -151,6 +151,8 @@ uint8_t config_cpld();
void set_config_cpld(uint8_t i);
bool config_splash();
bool config_hamitup();
int64_t config_hamitup_freq();
bool show_gui_return_icon();
bool load_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_show_bigger_qr_code(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_with_date(bool v);
void set_config_login(bool v);

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B