mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
power up the screen if we need it for bluetooth pairing
This commit is contained in:
parent
593a6e6f83
commit
bf72326d20
@ -337,6 +337,9 @@ void screen_setup()
|
|||||||
|
|
||||||
static bool showingBluetooth;
|
static bool showingBluetooth;
|
||||||
|
|
||||||
|
/// If set to true (possibly from an ISR), we should turn on the screen the next time our idle loop runs.
|
||||||
|
static bool wakeScreen;
|
||||||
|
|
||||||
uint32_t screen_loop()
|
uint32_t screen_loop()
|
||||||
{
|
{
|
||||||
if (!disp)
|
if (!disp)
|
||||||
@ -365,12 +368,11 @@ uint32_t screen_loop()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
if(wakeScreen) {
|
||||||
display->clear();
|
screen_on(); // make sure the screen is not asleep
|
||||||
_screen_header();
|
wakeScreen = false;
|
||||||
display->drawLogBuffer(0, SCREEN_HEADER_HEIGHT);
|
}
|
||||||
display->display();
|
|
||||||
#endif
|
|
||||||
static bool showingBootScreen = true;
|
static bool showingBootScreen = true;
|
||||||
|
|
||||||
ui.update();
|
ui.update();
|
||||||
@ -394,8 +396,8 @@ void screen_start_bluetooth(uint32_t pin) {
|
|||||||
|
|
||||||
DEBUG_MSG("showing bluetooth screen\n");
|
DEBUG_MSG("showing bluetooth screen\n");
|
||||||
showingBluetooth = true;
|
showingBluetooth = true;
|
||||||
|
wakeScreen = true;
|
||||||
|
|
||||||
//screen_on(); // make sure the screen is not asleep - FIXME, this causes crap to draw on the screen
|
|
||||||
ui.disableAutoTransition(); // we now require presses
|
ui.disableAutoTransition(); // we now require presses
|
||||||
ui.setFrames(btFrames, 1); // Just show the bluetooth frame
|
ui.setFrames(btFrames, 1); // Just show the bluetooth frame
|
||||||
// we rely on our main loop to show this screen (because we are invoked deep inside of bluetooth callbacks)
|
// we rely on our main loop to show this screen (because we are invoked deep inside of bluetooth callbacks)
|
||||||
@ -411,7 +413,7 @@ void screen_set_frames() {
|
|||||||
|
|
||||||
/// handle press of the button
|
/// handle press of the button
|
||||||
void screen_press() {
|
void screen_press() {
|
||||||
//screen_start_bluetooth(123456);
|
// screen_start_bluetooth(123456);
|
||||||
|
|
||||||
// Once the user presses a button, stop auto scrolling between screens
|
// Once the user presses a button, stop auto scrolling between screens
|
||||||
ui.disableAutoTransition(); // we now require presses
|
ui.disableAutoTransition(); // we now require presses
|
||||||
|
Loading…
Reference in New Issue
Block a user