mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Fixing branch, moving block, adding quote
This commit is contained in:
parent
2b7b0d028a
commit
5551c6a676
@ -466,9 +466,9 @@ void NavigationView::focus() {
|
||||
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( { { "..", 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>(); }, },
|
||||
//{ "ACARS", ui::Color::yellow(), &bitmap_icon_adsb, [&nav](){ nav.push<ACARSAppView>(); }, },
|
||||
{ "AIS Boats", ui::Color::green(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
|
||||
@ -498,7 +498,7 @@ ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
|
||||
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( { { "..", 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>(); } },
|
||||
@ -527,7 +527,7 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
||||
UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
|
||||
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({
|
||||
//{ "Test app", ui::Color::dark_grey(), nullptr, [&nav](){ nav.push<TestView>(); } },
|
||||
|
@ -200,13 +200,16 @@ void set_serial_format(const serial_format_t new_value) {
|
||||
data->serial_format = new_value;
|
||||
}
|
||||
|
||||
bool show_gui_return_icon(){ // add return icon in touchscreen menue
|
||||
return data->ui_config & (1 << 20);
|
||||
|
||||
// ui_config is an uint32_t var storing information bitwise
|
||||
// bits 0-2 store the backlight timer
|
||||
// bits 4-19 (16 bits) store the clkout frequency
|
||||
// bits 21-31 store the different single bit configs depicted below
|
||||
// bit 20 store the display state of the gui return icon, hidden (0) or shown (1)
|
||||
|
||||
bool show_gui_return_icon(){ // add return icon in touchscreen menue
|
||||
return data->ui_config & (1 << 20);
|
||||
}
|
||||
|
||||
bool load_app_settings() { // load (last saved) app settings on startup of app
|
||||
return data->ui_config & (1 << 21);
|
||||
}
|
||||
@ -261,6 +264,7 @@ uint32_t config_backlight_timer() {
|
||||
|
||||
void set_gui_return_icon(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 20)) | (v << 20);
|
||||
}
|
||||
|
||||
void set_load_app_settings(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 21)) | (v << 21);
|
||||
|
Loading…
Reference in New Issue
Block a user