mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Bugfix display off
This commit is contained in:
@@ -1105,17 +1105,18 @@ void startGUITask(void const *argument) {
|
|||||||
} else {
|
} else {
|
||||||
setStatusLED(LED_STANDBY);
|
setStatusLED(LED_STANDBY);
|
||||||
}
|
}
|
||||||
// Preemptively turn the display on. Turn it off if and only if
|
// Turn it off if and only if
|
||||||
// the tip temperature is below 50 degrees C *and* motion sleep
|
// the tip temperature is below 50 degrees C *and* motion sleep
|
||||||
// detection is enabled *and* there has been no activity (movement or
|
// detection is enabled *and* there has been no activity (movement or
|
||||||
// button presses) in a while.
|
// button presses) in a while.
|
||||||
// This is zero cost really as state is only changed on display updates
|
// This is zero cost really as state is only changed on display updates
|
||||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
|
||||||
|
|
||||||
if ((tipTemp < 50) && getSettingValue(SettingsOptions::Sensitivity)
|
if ((tipTemp < 50) && getSettingValue(SettingsOptions::Sensitivity)
|
||||||
&& (((xTaskGetTickCount() - lastMovementTime) > MOVEMENT_INACTIVITY_TIME) && ((xTaskGetTickCount() - lastButtonTime) > BUTTON_INACTIVITY_TIME))) {
|
&& (((xTaskGetTickCount() - lastMovementTime) > MOVEMENT_INACTIVITY_TIME) && ((xTaskGetTickCount() - lastButtonTime) > BUTTON_INACTIVITY_TIME))) {
|
||||||
OLED::setDisplayState(OLED::DisplayState::OFF);
|
OLED::setDisplayState(OLED::DisplayState::OFF);
|
||||||
setStatusLED(LED_OFF);
|
setStatusLED(LED_OFF);
|
||||||
|
}else {
|
||||||
|
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||||
}
|
}
|
||||||
// Clear the lcd buffer
|
// Clear the lcd buffer
|
||||||
OLED::clearScreen();
|
OLED::clearScreen();
|
||||||
|
|||||||
Reference in New Issue
Block a user