diff options
author | Ben V. Brown <[email protected]> | 2017-11-04 14:18:44 +1100 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2017-11-04 14:18:44 +1100 |
commit | d7a9e1a9ea3aa8e8f9e2753c03878895d93e2952 (patch) | |
tree | 2e5dc140febf31a9973a1751c0f79e37f840b898 | |
parent | fd922711217dc3316efc7fd377509a4bf9374aee (diff) | |
download | IronOS-d7a9e1a9ea3aa8e8f9e2753c03878895d93e2952.tar.gz IronOS-d7a9e1a9ea3aa8e8f9e2753c03878895d93e2952.zip |
Patch #117 sleep temp min()
-rw-r--r-- | workspace/TS100/src/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 6e2db273..3dcc107b 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -411,6 +411,12 @@ static int gui_showTipTempWarning() { GUIDelay(); } } +static uint16_t min(uint16_t a,uint16_t b) +{ + if(a>b) + return b; + else return a; +} static int gui_SolderingSleepingMode() { //Drop to sleep temperature and display until movement or button press @@ -424,9 +430,9 @@ static int gui_SolderingSleepingMode() { return 1; //return non-zero on error if (systemSettings.temperatureInF) - currentlyActiveTemperatureTarget = ftoTipMeasurement(systemSettings.SleepTemp); + currentlyActiveTemperatureTarget = ftoTipMeasurement(min(systemSettings.SleepTemp,systemSettings.SolderingTemp)); else - currentlyActiveTemperatureTarget = ctoTipMeasurement(systemSettings.SleepTemp); + currentlyActiveTemperatureTarget = ctoTipMeasurement(min(systemSettings.SleepTemp,systemSettings.SolderingTemp)); //draw the lcd uint16_t tipTemp; if (systemSettings.temperatureInF) |