mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Merge branch 'removing-not-implemented-and-play-dead-and-minor-tweaks'
This commit is contained in:
commit
190379c626
@ -346,7 +346,7 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) {
|
|||||||
DebugMenuView::DebugMenuView(NavigationView& nav) {
|
DebugMenuView::DebugMenuView(NavigationView& nav) {
|
||||||
add_items({
|
add_items({
|
||||||
{ "Memory", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugMemoryView>(); } },
|
{ "Memory", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugMemoryView>(); } },
|
||||||
{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
|
//{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
{ "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push<SDCardDebugView>(); } },
|
{ "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push<SDCardDebugView>(); } },
|
||||||
{ "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
|
{ "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
|
||||||
{ "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push<TemperatureView>(); } },
|
{ "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push<TemperatureView>(); } },
|
||||||
|
@ -183,6 +183,7 @@ SetFrequencyCorrectionModel SetRadioView::form_collect() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
SetPlayDeadView::SetPlayDeadView(NavigationView& nav) {
|
SetPlayDeadView::SetPlayDeadView(NavigationView& nav) {
|
||||||
add_children({
|
add_children({
|
||||||
&text_sequence,
|
&text_sequence,
|
||||||
@ -234,10 +235,11 @@ SetPlayDeadView::SetPlayDeadView(NavigationView& nav) {
|
|||||||
void SetPlayDeadView::focus() {
|
void SetPlayDeadView::focus() {
|
||||||
button_cancel.focus();
|
button_cancel.focus();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
SetUIView::SetUIView(NavigationView& nav) {
|
SetUIView::SetUIView(NavigationView& nav) {
|
||||||
add_children({
|
add_children({
|
||||||
&checkbox_login,
|
//&checkbox_login,
|
||||||
&checkbox_bloff,
|
&checkbox_bloff,
|
||||||
&options_bloff,
|
&options_bloff,
|
||||||
&checkbox_showsplash,
|
&checkbox_showsplash,
|
||||||
@ -245,7 +247,7 @@ SetUIView::SetUIView(NavigationView& nav) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
checkbox_showsplash.set_value(persistent_memory::config_splash());
|
checkbox_showsplash.set_value(persistent_memory::config_splash());
|
||||||
checkbox_login.set_value(persistent_memory::config_login());
|
//checkbox_login.set_value(persistent_memory::config_login());
|
||||||
|
|
||||||
uint32_t backlight_timer = persistent_memory::config_backlight_timer();
|
uint32_t backlight_timer = persistent_memory::config_backlight_timer();
|
||||||
|
|
||||||
@ -263,13 +265,13 @@ SetUIView::SetUIView(NavigationView& nav) {
|
|||||||
persistent_memory::set_config_backlight_timer(0);
|
persistent_memory::set_config_backlight_timer(0);
|
||||||
|
|
||||||
persistent_memory::set_config_splash(checkbox_showsplash.value());
|
persistent_memory::set_config_splash(checkbox_showsplash.value());
|
||||||
persistent_memory::set_config_login(checkbox_login.value());
|
//persistent_memory::set_config_login(checkbox_login.value());
|
||||||
nav.pop();
|
nav.pop();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetUIView::focus() {
|
void SetUIView::focus() {
|
||||||
checkbox_login.focus();
|
button_ok.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetAudioView::SetAudioView(NavigationView& nav) {
|
SetAudioView::SetAudioView(NavigationView& nav) {
|
||||||
@ -478,7 +480,7 @@ SettingsMenuView::SettingsMenuView(NavigationView& nav) {
|
|||||||
//{ "SD card modules", ui::Color::dark_cyan(), [&nav](){ nav.push<ModInfoView>(); } },
|
//{ "SD card modules", ui::Color::dark_cyan(), [&nav](){ nav.push<ModInfoView>(); } },
|
||||||
{ "Date/Time", ui::Color::dark_cyan(), nullptr, [&nav](){ nav.push<SetDateTimeView>(); } },
|
{ "Date/Time", ui::Color::dark_cyan(), nullptr, [&nav](){ nav.push<SetDateTimeView>(); } },
|
||||||
{ "Touch screen", ui::Color::dark_cyan(), nullptr, [&nav](){ nav.push<TouchCalibrationView>(); } },
|
{ "Touch screen", ui::Color::dark_cyan(), nullptr, [&nav](){ nav.push<TouchCalibrationView>(); } },
|
||||||
{ "Play dead", ui::Color::dark_cyan(), &bitmap_icon_playdead, [&nav](){ nav.push<SetPlayDeadView>(); } }
|
//{ "Play dead", ui::Color::dark_cyan(), &bitmap_icon_playdead, [&nav](){ nav.push<SetPlayDeadView>(); } }
|
||||||
});
|
});
|
||||||
set_max_rows(2); // allow wider buttons
|
set_max_rows(2); // allow wider buttons
|
||||||
}
|
}
|
||||||
|
@ -101,11 +101,11 @@ private:
|
|||||||
|
|
||||||
Button button_done {
|
Button button_done {
|
||||||
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"Done"
|
"Save"
|
||||||
};
|
};
|
||||||
Button button_cancel {
|
Button button_cancel {
|
||||||
{ 16 * 8, 16 * 16, 12 * 8, 32 },
|
{ 16 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"Cancel",
|
"Cancel"
|
||||||
};
|
};
|
||||||
|
|
||||||
void form_init(const SetDateTimeModel& model);
|
void form_init(const SetDateTimeModel& model);
|
||||||
@ -174,7 +174,7 @@ private:
|
|||||||
|
|
||||||
Button button_done {
|
Button button_done {
|
||||||
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"Done"
|
"Save"
|
||||||
};
|
};
|
||||||
Button button_cancel {
|
Button button_cancel {
|
||||||
{ 16 * 8, 16 * 16, 12 * 8, 32 },
|
{ 16 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
@ -194,11 +194,11 @@ public:
|
|||||||
std::string title() const override { return "UI settings"; };
|
std::string title() const override { return "UI settings"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Checkbox checkbox_login {
|
/*Checkbox checkbox_login {
|
||||||
{ 3 * 8, 2 * 16 },
|
{ 3 * 8, 2 * 16 },
|
||||||
20,
|
20,
|
||||||
"Login with play dead"
|
"Login with play dead"
|
||||||
};
|
};*/
|
||||||
|
|
||||||
Checkbox checkbox_bloff {
|
Checkbox checkbox_bloff {
|
||||||
{ 3 * 8, 5 * 16 },
|
{ 3 * 8, 5 * 16 },
|
||||||
@ -212,7 +212,9 @@ private:
|
|||||||
{
|
{
|
||||||
{ "5 seconds", 5 },
|
{ "5 seconds", 5 },
|
||||||
{ "15 seconds", 15 },
|
{ "15 seconds", 15 },
|
||||||
|
{ "30 seconds", 30 },
|
||||||
{ "1 minute", 60 },
|
{ "1 minute", 60 },
|
||||||
|
{ "3 minutes", 180 },
|
||||||
{ "5 minutes", 300 },
|
{ "5 minutes", 300 },
|
||||||
{ "10 minutes", 600 }
|
{ "10 minutes", 600 }
|
||||||
}
|
}
|
||||||
@ -226,7 +228,7 @@ private:
|
|||||||
|
|
||||||
Button button_ok {
|
Button button_ok {
|
||||||
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"OK"
|
"Save"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -253,10 +255,11 @@ private:
|
|||||||
|
|
||||||
Button button_ok {
|
Button button_ok {
|
||||||
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
{ 2 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"OK"
|
"Save"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
class SetPlayDeadView : public View {
|
class SetPlayDeadView : public View {
|
||||||
public:
|
public:
|
||||||
SetPlayDeadView(NavigationView& nav);
|
SetPlayDeadView(NavigationView& nav);
|
||||||
@ -284,7 +287,7 @@ private:
|
|||||||
{ 128, 192, 96, 24 },
|
{ 128, 192, 96, 24 },
|
||||||
"Cancel"
|
"Cancel"
|
||||||
};
|
};
|
||||||
};
|
};*/
|
||||||
|
|
||||||
/*class ModInfoView : public View {
|
/*class ModInfoView : public View {
|
||||||
public:
|
public:
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "Touch calibration"; };
|
std::string title() const override { return "Calibration"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase {
|
enum class Phase {
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#include "ui_morse.hpp"
|
#include "ui_morse.hpp"
|
||||||
//#include "ui_numbers.hpp"
|
//#include "ui_numbers.hpp"
|
||||||
//#include "ui_nuoptix.hpp"
|
//#include "ui_nuoptix.hpp"
|
||||||
#include "ui_playdead.hpp"
|
//#include "ui_playdead.hpp"
|
||||||
#include "ui_pocsag_tx.hpp"
|
#include "ui_pocsag_tx.hpp"
|
||||||
#include "ui_rds.hpp"
|
#include "ui_rds.hpp"
|
||||||
#include "ui_remote.hpp"
|
#include "ui_remote.hpp"
|
||||||
@ -354,20 +354,20 @@ ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
|
|||||||
{ "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::yellow(), &bitmap_icon_sonde, [&nav](){ nav.push<SondeView>(); } },
|
{ "Radiosnde", ui::Color::yellow(), &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>(); } },
|
||||||
{ "APRS", ui::Color::dark_grey(), &bitmap_icon_aprs, [&nav](){ nav.push<NotImplementedView>(); } },
|
/*{ "APRS", ui::Color::dark_grey(), &bitmap_icon_aprs, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
{ "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
|
||||||
{ "LoRa", ui::Color::dark_grey(), &bitmap_icon_lora, [&nav](){ nav.push<NotImplementedView>(); } },
|
{ "LoRa", ui::Color::dark_grey(), &bitmap_icon_lora, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
{ "SSTV", ui::Color::dark_grey(), &bitmap_icon_sstv, [&nav](){ nav.push<NotImplementedView>(); } },
|
{ "SSTV", ui::Color::dark_grey(), &bitmap_icon_sstv, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
{ "TETRA", ui::Color::dark_grey(), &bitmap_icon_tetra, [&nav](){ nav.push<NotImplementedView>(); } },
|
{ "TETRA", ui::Color::dark_grey(), &bitmap_icon_tetra, [&nav](){ nav.push<NotImplementedView>(); } },*/
|
||||||
});
|
});
|
||||||
|
|
||||||
set_highlighted(4); // Default selection is "Audio"
|
//set_highlighted(4); // Default selection is "Audio"
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TransmittersMenuView **************************************************/
|
/* TransmittersMenuView **************************************************/
|
||||||
@ -376,21 +376,21 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
|||||||
add_items({
|
add_items({
|
||||||
//{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } },
|
//{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } },
|
||||||
{ "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::orange(), &bitmap_icon_aprs, [&nav](){ nav.push<APRSTXView>(); } },
|
{ "APRS", ui::Color::orange(), &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_gps_sim, [&nav](){ nav.push<GpsSimAppView>(); } },
|
{ "GPS Sim", ui::Color::yellow(), &bitmap_gps_sim, [&nav](){ nav.push<GpsSimAppView>(); } },
|
||||||
{ "Jammer", ui::Color::yellow(), &bitmap_icon_jammer, [&nav](){ nav.push<JammerView>(); } },
|
{ "Jammer", ui::Color::yellow(), &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>(); } },
|
||||||
{ "Mic", ui::Color::green(), &bitmap_icon_microphone,[&nav](){ nav.push<MicTXView>(); } },
|
{ "Mic", ui::Color::green(), &bitmap_icon_microphone,[&nav](){ nav.push<MicTXView>(); } },
|
||||||
{ "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>(); } },
|
||||||
{ "Remote", ui::Color::dark_grey(), &bitmap_icon_remote, [&nav](){ nav.push<RemoteView>(); } },
|
{ "Remote", ui::Color::dark_grey(), &bitmap_icon_remote, [&nav](){ nav.push<RemoteView>(); } },
|
||||||
@ -404,13 +404,13 @@ UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
|
|||||||
//{ "Test app", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<TestView>(); } },
|
//{ "Test app", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<TestView>(); } },
|
||||||
//{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } },
|
//{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } },
|
||||||
{ "Freq manager", ui::Color::green(), &bitmap_icon_freqman, [&nav](){ nav.push<FrequencyManagerView>(); } },
|
{ "Freq manager", ui::Color::green(), &bitmap_icon_freqman, [&nav](){ nav.push<FrequencyManagerView>(); } },
|
||||||
{ "File manager", ui::Color::yellow(), &bitmap_icon_file, [&nav](){ nav.push<FileManagerView>(); } },
|
{ "File manager", ui::Color::yellow(), &bitmap_icon_file, [&nav](){ nav.push<FileManagerView>(); } },
|
||||||
{ "Notepad", ui::Color::dark_grey(), &bitmap_icon_notepad, [&nav](){ nav.push<NotImplementedView>(); } },
|
//{ "Notepad", ui::Color::dark_grey(), &bitmap_icon_notepad, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
{ "Signal gen", ui::Color::green(), &bitmap_icon_cwgen, [&nav](){ nav.push<SigGenView>(); } },
|
{ "Signal gen", ui::Color::green(), &bitmap_icon_cwgen, [&nav](){ nav.push<SigGenView>(); } },
|
||||||
//{ "Tone search", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<ToneSearchView>(); } },
|
//{ "Tone search", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<ToneSearchView>(); } },
|
||||||
{ "Wave viewer", ui::Color::blue(), nullptr, [&nav](){ nav.push<ViewWavView>(); } },
|
{ "Wave viewer", ui::Color::blue(), nullptr, [&nav](){ nav.push<ViewWavView>(); } },
|
||||||
{ "Antenna length", ui::Color::yellow(), nullptr, [&nav](){ nav.push<WhipCalcView>(); } },
|
{ "Antenna length", ui::Color::yellow(), nullptr, [&nav](){ nav.push<WhipCalcView>(); } },
|
||||||
{ "Wipe SD card", ui::Color::red(), nullptr, [&nav](){ nav.push<WipeSDView>(); } },
|
{ "Wipe SD card", ui::Color::red(), nullptr, [&nav](){ nav.push<WipeSDView>(); } },
|
||||||
});
|
});
|
||||||
set_max_rows(2); // allow wider buttons
|
set_max_rows(2); // allow wider buttons
|
||||||
}
|
}
|
||||||
@ -418,7 +418,7 @@ UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
|
|||||||
/* SystemMenuView ********************************************************/
|
/* SystemMenuView ********************************************************/
|
||||||
|
|
||||||
void SystemMenuView::hackrf_mode(NavigationView& nav) {
|
void SystemMenuView::hackrf_mode(NavigationView& nav) {
|
||||||
nav.push<ModalMessageView>("Confirm", "Switch to HackRF mode ?", YESNO,
|
nav.push<ModalMessageView>("HackRF mode", "This mode enables USB\nfunctionality. Reset the\ndevice to get back.\n\nDo you want to Switch now?", YESNO,
|
||||||
[this](bool choice) {
|
[this](bool choice) {
|
||||||
if (choice) {
|
if (choice) {
|
||||||
EventDispatcher::request_stop();
|
EventDispatcher::request_stop();
|
||||||
@ -429,21 +429,21 @@ void SystemMenuView::hackrf_mode(NavigationView& nav) {
|
|||||||
|
|
||||||
SystemMenuView::SystemMenuView(NavigationView& nav) {
|
SystemMenuView::SystemMenuView(NavigationView& nav) {
|
||||||
add_items({
|
add_items({
|
||||||
{ "Play dead", ui::Color::red(), &bitmap_icon_playdead, [&nav](){ nav.push<PlayDeadView>(); } },
|
//{ "Play dead", ui::Color::red(), &bitmap_icon_playdead, [&nav](){ nav.push<PlayDeadView>(); } },
|
||||||
{ "Receivers", ui::Color::dark_cyan(), &bitmap_icon_receivers, [&nav](){ nav.push<ReceiversMenuView>(); } },
|
{ "Receive", ui::Color::dark_cyan(), &bitmap_icon_receivers, [&nav](){ nav.push<ReceiversMenuView>(); } },
|
||||||
{ "Transmit", ui::Color::green(), &bitmap_icon_transmit, [&nav](){ nav.push<TransmittersMenuView>(); } },
|
{ "Transmit", ui::Color::green(), &bitmap_icon_transmit, [&nav](){ nav.push<TransmittersMenuView>(); } },
|
||||||
{ "Capture", ui::Color::blue(), &bitmap_icon_capture, [&nav](){ nav.push<CaptureAppView>(); } },
|
{ "Capture", ui::Color::blue(), &bitmap_icon_capture, [&nav](){ nav.push<CaptureAppView>(); } },
|
||||||
{ "Replay", ui::Color::purple(), &bitmap_icon_replay, [&nav](){ nav.push<ReplayAppView>(); } },
|
{ "Replay", ui::Color::purple(), &bitmap_icon_replay, [&nav](){ nav.push<ReplayAppView>(); } },
|
||||||
{ "Calls", ui::Color::yellow(), &bitmap_icon_closecall, [&nav](){ nav.push<SearchView>(); } },
|
{ "Calls", ui::Color::yellow(), &bitmap_icon_closecall, [&nav](){ nav.push<SearchView>(); } },
|
||||||
{ "Scanner", ui::Color::orange(), &bitmap_icon_scanner, [&nav](){ nav.push<ScannerView>(); } },
|
{ "Scanner", ui::Color::orange(), &bitmap_icon_scanner, [&nav](){ nav.push<ScannerView>(); } },
|
||||||
{ "Utilities", ui::Color::light_grey(), &bitmap_icon_utilities, [&nav](){ nav.push<UtilitiesMenuView>(); } },
|
{ "Tools", ui::Color::light_grey(), &bitmap_icon_utilities, [&nav](){ nav.push<UtilitiesMenuView>(); } },
|
||||||
{ "Settings", ui::Color::cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SettingsMenuView>(); } },
|
{ "Options", ui::Color::cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SettingsMenuView>(); } },
|
||||||
{ "Debug", ui::Color::cyan(), nullptr, [&nav](){ nav.push<DebugMenuView>(); } },
|
{ "Debug", ui::Color::cyan(), nullptr, [&nav](){ nav.push<DebugMenuView>(); } },
|
||||||
{ "HackRF", ui::Color::cyan(), &bitmap_icon_hackrf, [this, &nav](){ hackrf_mode(nav); } },
|
{ "HackRF", ui::Color::cyan(), &bitmap_icon_hackrf, [this, &nav](){ hackrf_mode(nav); } },
|
||||||
{ "About", ui::Color::cyan(), nullptr, [&nav](){ nav.push<AboutView>(); } }
|
//{ "About", ui::Color::cyan(), nullptr, [&nav](){ nav.push<AboutView>(); } }
|
||||||
});
|
});
|
||||||
|
set_max_rows(2); // allow wider buttons
|
||||||
set_highlighted(1); // Startup selection is "Receivers"
|
//set_highlighted(1); // Startup selection
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SystemView ************************************************************/
|
/* SystemView ************************************************************/
|
||||||
@ -528,7 +528,7 @@ void BMPView::paint(Painter&) {
|
|||||||
|
|
||||||
/* NotImplementedView ****************************************************/
|
/* NotImplementedView ****************************************************/
|
||||||
|
|
||||||
NotImplementedView::NotImplementedView(NavigationView& nav) {
|
/*NotImplementedView::NotImplementedView(NavigationView& nav) {
|
||||||
button_done.on_select = [&nav](Button&){
|
button_done.on_select = [&nav](Button&){
|
||||||
nav.pop();
|
nav.pop();
|
||||||
};
|
};
|
||||||
@ -541,7 +541,7 @@ NotImplementedView::NotImplementedView(NavigationView& nav) {
|
|||||||
|
|
||||||
void NotImplementedView::focus() {
|
void NotImplementedView::focus() {
|
||||||
button_done.focus();
|
button_done.focus();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* ModalMessageView ******************************************************/
|
/* ModalMessageView ******************************************************/
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ private:
|
|||||||
Context& context_;
|
Context& context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NotImplementedView : public View {
|
/*class NotImplementedView : public View {
|
||||||
public:
|
public:
|
||||||
NotImplementedView(NavigationView& nav);
|
NotImplementedView(NavigationView& nav);
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ private:
|
|||||||
{ 10 * 8, 13 * 16, 10 * 8, 24 },
|
{ 10 * 8, 13 * 16, 10 * 8, 24 },
|
||||||
"Bummer",
|
"Bummer",
|
||||||
};
|
};
|
||||||
};
|
};*/
|
||||||
|
|
||||||
class ModalMessageView : public View {
|
class ModalMessageView : public View {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user