mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 10:21:59 +00:00
add UI_NO_HIBERNATE build flag to disable hibernate screen on wio tracker l1
This commit is contained in:
@@ -102,7 +102,9 @@ class HomeScreen : public UIScreen {
|
|||||||
#if UI_SENSORS_PAGE == 1
|
#if UI_SENSORS_PAGE == 1
|
||||||
SENSORS,
|
SENSORS,
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef UI_NO_HIBERNATE
|
||||||
SHUTDOWN,
|
SHUTDOWN,
|
||||||
|
#endif
|
||||||
Count // keep as last
|
Count // keep as last
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -459,6 +461,7 @@ public:
|
|||||||
if (sensors_scroll) sensors_scroll_offset = (sensors_scroll_offset+1)%sensors_nb;
|
if (sensors_scroll) sensors_scroll_offset = (sensors_scroll_offset+1)%sensors_nb;
|
||||||
else sensors_scroll_offset = 0;
|
else sensors_scroll_offset = 0;
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef UI_NO_HIBERNATE
|
||||||
} else if (_page == HomePage::SHUTDOWN) {
|
} else if (_page == HomePage::SHUTDOWN) {
|
||||||
display.setColor(UIColor::corp_blue);
|
display.setColor(UIColor::corp_blue);
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
@@ -470,6 +473,7 @@ public:
|
|||||||
display.drawXbm((display.width() - 32) / 2, 18, power_icon, 32, 32);
|
display.drawXbm((display.width() - 32) / 2, 18, power_icon, 32, 32);
|
||||||
display.drawTextCentered(display.width() / 2, 64 - 11, "hibernate:" PRESS_LABEL);
|
display.drawTextCentered(display.width() / 2, 64 - 11, "hibernate:" PRESS_LABEL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return 5000; // next render after 5000 ms
|
return 5000; // next render after 5000 ms
|
||||||
}
|
}
|
||||||
@@ -516,10 +520,12 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef UI_NO_HIBERNATE
|
||||||
if (c == KEY_ENTER && _page == HomePage::SHUTDOWN) {
|
if (c == KEY_ENTER && _page == HomePage::SHUTDOWN) {
|
||||||
_shutdown_init = true; // need to wait for button to be released
|
_shutdown_init = true; // need to wait for button to be released
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ build_flags = ${WioTrackerL1.build_flags}
|
|||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=SH1106Display
|
-D DISPLAY_CLASS=SH1106Display
|
||||||
-D UI_HAS_JOYSTICK=1
|
-D UI_HAS_JOYSTICK=1
|
||||||
|
-D UI_NO_HIBERNATE
|
||||||
-D OFFLINE_QUEUE_SIZE=256
|
-D OFFLINE_QUEUE_SIZE=256
|
||||||
-D PIN_BUZZER=12
|
-D PIN_BUZZER=12
|
||||||
-D QSPIFLASH=1
|
-D QSPIFLASH=1
|
||||||
@@ -95,6 +96,7 @@ build_flags = ${WioTrackerL1.build_flags}
|
|||||||
-D OFFLINE_QUEUE_SIZE=256
|
-D OFFLINE_QUEUE_SIZE=256
|
||||||
-D DISPLAY_CLASS=SH1106Display
|
-D DISPLAY_CLASS=SH1106Display
|
||||||
-D UI_HAS_JOYSTICK=1
|
-D UI_HAS_JOYSTICK=1
|
||||||
|
-D UI_NO_HIBERNATE
|
||||||
-D PIN_BUZZER=12
|
-D PIN_BUZZER=12
|
||||||
-D QSPIFLASH=1
|
-D QSPIFLASH=1
|
||||||
-D ADVERT_NAME='"@@MAC"'
|
-D ADVERT_NAME='"@@MAC"'
|
||||||
|
|||||||
Reference in New Issue
Block a user