diff options
author | Ben V. Brown <[email protected]> | 2018-03-23 10:00:07 +1100 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2018-03-23 10:00:07 +1100 |
commit | 6c346750833d163862e7231abfdd148c7974e8c9 (patch) | |
tree | dfe20c89b1c2a64118ae62532384eee17128d2f6 /workspace/TS100/src/main.cpp | |
parent | b4235bea75b834c5647df2bd8d94fdff798843b0 (diff) | |
download | IronOS-6c346750833d163862e7231abfdd148c7974e8c9.tar.gz IronOS-6c346750833d163862e7231abfdd148c7974e8c9.zip |
Sleep screen check bug
Should fix #248
Diffstat (limited to 'workspace/TS100/src/main.cpp')
-rw-r--r-- | workspace/TS100/src/main.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 7720c1a0..8fc76c1b 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -706,7 +706,7 @@ void startGUITask(void const *argument) { if (buttons != BUTTON_NONE && buttonLockout) buttons = BUTTON_NONE; else - buttonLockout=false; + buttonLockout = false; switch (buttons) { case BUTTON_NONE: // Do nothing @@ -754,16 +754,18 @@ void startGUITask(void const *argument) { } currentlyActiveTemperatureTarget = 0; // ensure tip is off uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0)); - if (tipTemp < 50) + if (tipTemp < 50) { if (systemSettings.sensitivity) { if ((xTaskGetTickCount() - lastMovementTime) > 6000 && (xTaskGetTickCount() - lastButtonTime) > 6000) lcd.displayOnOff(false); // turn lcd off when no movement - else if (xTaskGetTickCount() - lastMovementTime < 100 - || xTaskGetTickCount() - lastButtonTime < 100) /*Use short time for test, and prevent lots of I2C - writes for no need*/ - lcd.displayOnOff(true); // turn lcd back on - } + else + lcd.displayOnOff(true); // turn lcd on + } else + lcd.displayOnOff(true); // turn lcd on + } else + lcd.displayOnOff(true); // turn lcd on + if (tipTemp > 600) tipTemp = 0; if (tipTemp > 50) { |