mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2026-04-05 14:37:03 +00:00
fixing some display timeout issues
This commit is contained in:
parent
ab771fc325
commit
c72668ecad
3 changed files with 19 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include <TaskManager.h>
|
||||
#include <logger.h>
|
||||
|
||||
Display::Display() : _disp(0), _statusFrame(0), _displayOff(false) {
|
||||
Display::Display() : _disp(0), _statusFrame(0), _displayOff(false), _displaySaveMode(false) {
|
||||
}
|
||||
|
||||
void Display::setup(std::shared_ptr<BoardConfig> boardConfig) {
|
||||
|
|
@ -27,6 +27,14 @@ void Display::turn180() {
|
|||
_disp->flipScreenVertically();
|
||||
}
|
||||
|
||||
void Display::activateDisplaySaveMode() {
|
||||
_displaySaveMode = true;
|
||||
}
|
||||
|
||||
void Display::setDisplayTimeout(time_t timeout) {
|
||||
_displayTimeout.setTimeout(timeout);
|
||||
}
|
||||
|
||||
void Display::update() {
|
||||
if (_frameTimeout.check()) {
|
||||
if (_statusFrame->isPrio()) {
|
||||
|
|
@ -53,7 +61,9 @@ void Display::update() {
|
|||
_statusFrame->drawStatusPage(bitmap);
|
||||
activateDisplay();
|
||||
_disp->display(&bitmap);
|
||||
_displayTimeout.start();
|
||||
if (_displaySaveMode) {
|
||||
_displayTimeout.start();
|
||||
}
|
||||
}
|
||||
if (_displayTimeout.check()) {
|
||||
deactivateDisplay();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue