Browse Source
Merge pull request #1057 from liquidraver/wiodev
Disable screen switching on when connected
pull/938/head
fdlamotte
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
10 additions and
2 deletions
-
examples/companion_radio/ui-new/UITask.cpp
-
examples/companion_radio/ui-orig/UITask.cpp
|
|
|
@ -631,9 +631,13 @@ void UITask::newMsg(uint8_t path_len, const char* from_name, const char* text, i |
|
|
|
setCurrScreen(msg_preview); |
|
|
|
|
|
|
|
if (_display != NULL) { |
|
|
|
if (!_display->isOn()) _display->turnOn(); |
|
|
|
if (!_display->isOn() && !hasConnection()) { |
|
|
|
_display->turnOn(); |
|
|
|
} |
|
|
|
if (_display->isOn()) { |
|
|
|
_auto_off = millis() + AUTO_OFF_MILLIS; // extend the auto-off timer
|
|
|
|
_next_refresh = 100; // trigger refresh
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -137,9 +137,13 @@ void UITask::newMsg(uint8_t path_len, const char* from_name, const char* text, i |
|
|
|
StrHelper::strncpy(_msg, text, sizeof(_msg)); |
|
|
|
|
|
|
|
if (_display != NULL) { |
|
|
|
if (!_display->isOn()) _display->turnOn(); |
|
|
|
if (!_display->isOn() && !hasConnection()) { |
|
|
|
_display->turnOn(); |
|
|
|
} |
|
|
|
if (_display->isOn()) { |
|
|
|
_auto_off = millis() + AUTO_OFF_MILLIS; // extend the auto-off timer
|
|
|
|
_need_refresh = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|