diff options
author | Ben V. Brown <[email protected]> | 2018-04-11 09:58:35 +1000 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2018-04-11 09:58:35 +1000 |
commit | 79477685bdbd5ba04e6224a8e9382d997c49bfec (patch) | |
tree | 738c8da749eb0caf389d6b87ae23433c4b046399 | |
parent | a062317e7a02e2857acbd1e38e01ba82ed039781 (diff) | |
download | IronOS-79477685bdbd5ba04e6224a8e9382d997c49bfec.tar.gz IronOS-79477685bdbd5ba04e6224a8e9382d997c49bfec.zip |
Update Settings reset to always zero,
Update GUI for temp setting to round to 10 increments.
-rw-r--r-- | workspace/TS100/..cproject.swp | bin | 0 -> 1024 bytes | |||
-rw-r--r-- | workspace/TS100/.vscode/c_cpp_properties.json | 66 | ||||
-rw-r--r-- | workspace/TS100/src/Settings.cpp | 2 | ||||
-rw-r--r-- | workspace/TS100/src/gui.cpp | 8 |
4 files changed, 75 insertions, 1 deletions
diff --git a/workspace/TS100/..cproject.swp b/workspace/TS100/..cproject.swp Binary files differnew file mode 100644 index 00000000..53e2e892 --- /dev/null +++ b/workspace/TS100/..cproject.swp diff --git a/workspace/TS100/.vscode/c_cpp_properties.json b/workspace/TS100/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..ff685768 --- /dev/null +++ b/workspace/TS100/.vscode/c_cpp_properties.json @@ -0,0 +1,66 @@ +{ + "configurations": [ + { + "name": "Mac", + "includePath": [ + "/usr/include", + "/usr/local/include", + "${workspaceFolder}" + ], + "defines": ["STM32F103T8Ux","STM32F1","STM32","USE_HAL_DRIVER","STM32F103xB","USE_RTOS_SYSTICK"], + "intelliSenseMode": "clang-x64", + "browse": { + "path": [ + "/usr/include", + "/usr/local/include", + "${workspaceFolder}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + }, + "macFrameworkPath": [ + "/System/Library/Frameworks", + "/Library/Frameworks" + ] + }, + { + "name": "STM32", + "includePath": [ + "${workspaceFolder}", + "/usr/include/c++/5", + "/usr/include/x86_64-linux-gnu/c++/5", + "/usr/include/c++/5/backward", + "/usr/lib/llvm-5.0/lib/clang/5.0.0/include", + "/usr/local/include", + "/usr/include/x86_64-linux-gnu", + "/usr/include", + "${workspaceFolder}/inc", + "${workspaceFolder}/HAL_Driver/Inc", + "${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS", + "${workspaceFolder}/CMSIS/device", + "${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/include", + "${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3" + ], + "defines": [], + "intelliSenseMode": "clang-x64", + "browse": { + "path": [ + "${workspaceFolder}", + "/usr/include/c++/5", + "/usr/include/x86_64-linux-gnu/c++/5", + "/usr/include/c++/5/backward", + "/usr/lib/llvm-5.0/lib/clang/5.0.0/include", + "/usr/local/include", + "/usr/include/x86_64-linux-gnu", + "/usr/include" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + }, + "compilerPath": "/usr/bin/clang++-5.0", + "cStandard": "c11", + "cppStandard": "c++17" + } + ], + "version": 3 +}
\ No newline at end of file diff --git a/workspace/TS100/src/Settings.cpp b/workspace/TS100/src/Settings.cpp index 40c2912e..22389404 100644 --- a/workspace/TS100/src/Settings.cpp +++ b/workspace/TS100/src/Settings.cpp @@ -71,7 +71,7 @@ uint8_t lookupVoltageLevel(uint8_t level) { return (level * 33) + (33 * 2); } void resetSettings() { - + memset((void*)&systemSettings,0,sizeof(systemSettingsType)); systemSettings.SleepTemp = 150; //Temperature the iron sleeps at - default 150.0 C systemSettings.SleepTime = 6; //How many seconds/minutes we wait until going to sleep - default 1 min systemSettings.SolderingTemp = 320; //Default soldering temp is 320.0 C diff --git a/workspace/TS100/src/gui.cpp b/workspace/TS100/src/gui.cpp index de109c76..5884ab8f 100644 --- a/workspace/TS100/src/gui.cpp +++ b/workspace/TS100/src/gui.cpp @@ -362,6 +362,14 @@ static void settings_setTempF(void) { systemSettings.SleepTemp = ((systemSettings.SleepTemp - 32) * 5) / 9; } + // Rescale both to be multiples of 10 + systemSettings.BoostTemp = systemSettings.BoostTemp/10; + systemSettings.BoostTemp *=10; + systemSettings.SolderingTemp = systemSettings.SolderingTemp/10; + systemSettings.SolderingTemp *=10; + systemSettings.SleepTemp = systemSettings.SleepTemp/10; + systemSettings.SleepTemp *=10; + } static void settings_displayTempF(void) { |