Merge branch 'removing-not-implemented-and-play-dead-and-minor-tweaks'

This commit is contained in:
Erwin Ried 2020-05-11 11:09:15 +02:00
commit 190379c626
6 changed files with 51 additions and 46 deletions

View File

@ -346,7 +346,7 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) {
DebugMenuView::DebugMenuView(NavigationView& nav) {
add_items({
{ "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>(); } },
{ "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
{ "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push<TemperatureView>(); } },

View File

@ -183,6 +183,7 @@ SetFrequencyCorrectionModel SetRadioView::form_collect() {
};
}
/*
SetPlayDeadView::SetPlayDeadView(NavigationView& nav) {
add_children({
&text_sequence,
@ -234,10 +235,11 @@ SetPlayDeadView::SetPlayDeadView(NavigationView& nav) {
void SetPlayDeadView::focus() {
button_cancel.focus();
}
*/
SetUIView::SetUIView(NavigationView& nav) {
add_children({
&checkbox_login,
//&checkbox_login,
&checkbox_bloff,
&options_bloff,
&checkbox_showsplash,
@ -245,7 +247,7 @@ SetUIView::SetUIView(NavigationView& nav) {
});
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();
@ -263,13 +265,13 @@ SetUIView::SetUIView(NavigationView& nav) {
persistent_memory::set_config_backlight_timer(0);
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();
};
}
void SetUIView::focus() {
checkbox_login.focus();
button_ok.focus();
}
SetAudioView::SetAudioView(NavigationView& nav) {
@ -478,7 +480,7 @@ SettingsMenuView::SettingsMenuView(NavigationView& nav) {
//{ "SD card modules", ui::Color::dark_cyan(), [&nav](){ nav.push<ModInfoView>(); } },
{ "Date/Time", ui::Color::dark_cyan(), nullptr, [&nav](){ nav.push<SetDateTimeView>(); } },
{ "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
}

View File

@ -101,11 +101,11 @@ private:
Button button_done {
{ 2 * 8, 16 * 16, 12 * 8, 32 },
"Done"
"Save"
};
Button button_cancel {
{ 16 * 8, 16 * 16, 12 * 8, 32 },
"Cancel",
"Cancel"
};
void form_init(const SetDateTimeModel& model);
@ -174,7 +174,7 @@ private:
Button button_done {
{ 2 * 8, 16 * 16, 12 * 8, 32 },
"Done"
"Save"
};
Button button_cancel {
{ 16 * 8, 16 * 16, 12 * 8, 32 },
@ -194,11 +194,11 @@ public:
std::string title() const override { return "UI settings"; };
private:
Checkbox checkbox_login {
/*Checkbox checkbox_login {
{ 3 * 8, 2 * 16 },
20,
"Login with play dead"
};
};*/
Checkbox checkbox_bloff {
{ 3 * 8, 5 * 16 },
@ -212,7 +212,9 @@ private:
{
{ "5 seconds", 5 },
{ "15 seconds", 15 },
{ "30 seconds", 30 },
{ "1 minute", 60 },
{ "3 minutes", 180 },
{ "5 minutes", 300 },
{ "10 minutes", 600 }
}
@ -226,7 +228,7 @@ private:
Button button_ok {
{ 2 * 8, 16 * 16, 12 * 8, 32 },
"OK"
"Save"
};
};
@ -253,10 +255,11 @@ private:
Button button_ok {
{ 2 * 8, 16 * 16, 12 * 8, 32 },
"OK"
"Save"
};
};
/*
class SetPlayDeadView : public View {
public:
SetPlayDeadView(NavigationView& nav);
@ -284,7 +287,7 @@ private:
{ 128, 192, 96, 24 },
"Cancel"
};
};
};*/
/*class ModInfoView : public View {
public:

View File

@ -34,7 +34,7 @@ public:
void focus() override;
std::string title() const override { return "Touch calibration"; };
std::string title() const override { return "Calibration"; };
private:
enum class Phase {

View File

@ -50,7 +50,7 @@
#include "ui_morse.hpp"
//#include "ui_numbers.hpp"
//#include "ui_nuoptix.hpp"
#include "ui_playdead.hpp"
//#include "ui_playdead.hpp"
#include "ui_pocsag_tx.hpp"
#include "ui_rds.hpp"
#include "ui_remote.hpp"
@ -359,15 +359,15 @@ ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGAppView>(); } },
{ "Radiosnde", ui::Color::yellow(), &bitmap_icon_sonde, [&nav](){ nav.push<SondeView>(); } },
{ "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>(); } },
{ "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>(); } },
{ "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 **************************************************/
@ -405,7 +405,7 @@ UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
//{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } },
{ "Freq manager", ui::Color::green(), &bitmap_icon_freqman, [&nav](){ nav.push<FrequencyManagerView>(); } },
{ "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>(); } },
//{ "Tone search", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<ToneSearchView>(); } },
{ "Wave viewer", ui::Color::blue(), nullptr, [&nav](){ nav.push<ViewWavView>(); } },
@ -418,7 +418,7 @@ UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
/* SystemMenuView ********************************************************/
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) {
if (choice) {
EventDispatcher::request_stop();
@ -429,21 +429,21 @@ void SystemMenuView::hackrf_mode(NavigationView& nav) {
SystemMenuView::SystemMenuView(NavigationView& nav) {
add_items({
{ "Play dead", ui::Color::red(), &bitmap_icon_playdead, [&nav](){ nav.push<PlayDeadView>(); } },
{ "Receivers", ui::Color::dark_cyan(), &bitmap_icon_receivers, [&nav](){ nav.push<ReceiversMenuView>(); } },
//{ "Play dead", ui::Color::red(), &bitmap_icon_playdead, [&nav](){ nav.push<PlayDeadView>(); } },
{ "Receive", ui::Color::dark_cyan(), &bitmap_icon_receivers, [&nav](){ nav.push<ReceiversMenuView>(); } },
{ "Transmit", ui::Color::green(), &bitmap_icon_transmit, [&nav](){ nav.push<TransmittersMenuView>(); } },
{ "Capture", ui::Color::blue(), &bitmap_icon_capture, [&nav](){ nav.push<CaptureAppView>(); } },
{ "Replay", ui::Color::purple(), &bitmap_icon_replay, [&nav](){ nav.push<ReplayAppView>(); } },
{ "Calls", ui::Color::yellow(), &bitmap_icon_closecall, [&nav](){ nav.push<SearchView>(); } },
{ "Scanner", ui::Color::orange(), &bitmap_icon_scanner, [&nav](){ nav.push<ScannerView>(); } },
{ "Utilities", ui::Color::light_grey(), &bitmap_icon_utilities, [&nav](){ nav.push<UtilitiesMenuView>(); } },
{ "Settings", ui::Color::cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SettingsMenuView>(); } },
{ "Tools", ui::Color::light_grey(), &bitmap_icon_utilities, [&nav](){ nav.push<UtilitiesMenuView>(); } },
{ "Options", ui::Color::cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SettingsMenuView>(); } },
{ "Debug", ui::Color::cyan(), nullptr, [&nav](){ nav.push<DebugMenuView>(); } },
{ "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_highlighted(1); // Startup selection is "Receivers"
set_max_rows(2); // allow wider buttons
//set_highlighted(1); // Startup selection
}
/* SystemView ************************************************************/
@ -528,7 +528,7 @@ void BMPView::paint(Painter&) {
/* NotImplementedView ****************************************************/
NotImplementedView::NotImplementedView(NavigationView& nav) {
/*NotImplementedView::NotImplementedView(NavigationView& nav) {
button_done.on_select = [&nav](Button&){
nav.pop();
};
@ -541,7 +541,7 @@ NotImplementedView::NotImplementedView(NavigationView& nav) {
void NotImplementedView::focus() {
button_done.focus();
}
}*/
/* ModalMessageView ******************************************************/

View File

@ -249,7 +249,7 @@ private:
Context& context_;
};
class NotImplementedView : public View {
/*class NotImplementedView : public View {
public:
NotImplementedView(NavigationView& nav);
@ -265,7 +265,7 @@ private:
{ 10 * 8, 13 * 16, 10 * 8, 24 },
"Bummer",
};
};
};*/
class ModalMessageView : public View {
public: