aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2017-11-04 14:18:44 +1100
committerBen V. Brown <[email protected]>2017-11-04 14:18:44 +1100
commitd7a9e1a9ea3aa8e8f9e2753c03878895d93e2952 (patch)
tree2e5dc140febf31a9973a1751c0f79e37f840b898
parentfd922711217dc3316efc7fd377509a4bf9374aee (diff)
downloadIronOS-d7a9e1a9ea3aa8e8f9e2753c03878895d93e2952.tar.gz
IronOS-d7a9e1a9ea3aa8e8f9e2753c03878895d93e2952.zip
Patch #117 sleep temp min()
-rw-r--r--workspace/TS100/src/main.cpp10
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)