diff options
author | Ben V. Brown <[email protected]> | 2020-05-23 13:59:51 +1000 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2020-05-23 13:59:51 +1000 |
commit | f45fd087ab9b5a2fd153491bf5d71e8d9ab4eab6 (patch) | |
tree | 1fcf235cb7294e71f47efa35047311d3b37dd431 | |
parent | 4814ae139352c185db15c4daa8861aa9e0ad64dd (diff) | |
download | IronOS-f45fd087ab9b5a2fd153491bf5d71e8d9ab4eab6.tar.gz IronOS-f45fd087ab9b5a2fd153491bf5d71e8d9ab4eab6.zip |
Pull default config out
-rw-r--r-- | workspace/TS100/Core/Src/Settings.cpp | 2 | ||||
-rw-r--r-- | workspace/TS100/Core/Src/gui.cpp | 31 | ||||
-rw-r--r-- | workspace/TS100/configuration.h | 5 |
3 files changed, 21 insertions, 17 deletions
diff --git a/workspace/TS100/Core/Src/Settings.cpp b/workspace/TS100/Core/Src/Settings.cpp index 2d0352a0..7f0b84a5 100644 --- a/workspace/TS100/Core/Src/Settings.cpp +++ b/workspace/TS100/Core/Src/Settings.cpp @@ -105,6 +105,6 @@ void resetSettings() { systemSettings.ReverseButtonTempChangeEnabled = REVERSE_BUTTON_TEMP_CHANGE; // systemSettings.TempChangeShortStep = TEMP_CHANGE_SHORT_STEP; // systemSettings.TempChangeLongStep = TEMP_CHANGE_LONG_STEP; // - systemSettings.KeepAwakePulse= 3; + systemSettings.KeepAwakePulse= POWER_PULSE_DEFAULT; saveSettings(); // Save defaults } diff --git a/workspace/TS100/Core/Src/gui.cpp b/workspace/TS100/Core/Src/gui.cpp index 6d8f3f53..dfa4ebfc 100644 --- a/workspace/TS100/Core/Src/gui.cpp +++ b/workspace/TS100/Core/Src/gui.cpp @@ -18,8 +18,8 @@ extern uint32_t lastButtonTime; void gui_Menu(const menuitem *menu); #ifdef MODEL_TS100 - static void settings_setInputVRange(void); - static void settings_displayInputVRange(void); +static void settings_setInputVRange(void); +static void settings_displayInputVRange(void); #else static void settings_setInputPRange(void); static void settings_displayInputPRange(void); @@ -118,14 +118,14 @@ static void settings_enterAdvancedMenu(void); * */ const menuitem rootSettingsMenu[] { - /* - * Power Source - * Soldering Menu - * Power Saving Menu - * UI Menu - * Advanced Menu - * Exit - */ +/* + * Power Source + * Soldering Menu + * Power Saving Menu + * UI Menu + * Advanced Menu + * Exit + */ #ifdef MODEL_TS100 { (const char*) SettingsDescriptions[0], { settings_setInputVRange }, { settings_displayInputVRange } }, /*Voltage input*/ @@ -786,16 +786,15 @@ static void settings_displayTempChangeLongStep(void) { static void settings_setPowerPulse(void) { systemSettings.KeepAwakePulse += POWER_PULSE_INCREMENT; - if (systemSettings.KeepAwakePulse > POWER_PULSE_MAX) { - systemSettings.KeepAwakePulse = POWER_PULSE_MAX; // loop back to 0 - } + systemSettings.KeepAwakePulse %= POWER_PULSE_MAX; + } static void settings_displayPowerPulse(void) { printShortDescription(26, 5); - if (systemSettings.TempChangeLongStep) { - OLED::printNumber(systemSettings.TempChangeLongStep / 10, 1); + if (systemSettings.KeepAwakePulse) { + OLED::printNumber(systemSettings.KeepAwakePulse / 10, 1); OLED::print(SymbolDot); - OLED::printNumber(systemSettings.TempChangeLongStep % 10, 1); + OLED::printNumber(systemSettings.KeepAwakePulse % 10, 1); } else { OLED::drawCheckbox(false); } diff --git a/workspace/TS100/configuration.h b/workspace/TS100/configuration.h index 7b75c691..8dc1212f 100644 --- a/workspace/TS100/configuration.h +++ b/workspace/TS100/configuration.h @@ -57,6 +57,11 @@ /* Power pulse for keeping power banks awake*/ #define POWER_PULSE_INCREMENT 1 #define POWER_PULSE_MAX 50 // x10 max watts +#ifdef MODEL_TS100 +#define POWER_PULSE_DEFAULT 0 +#else +#define POWER_PULSE_DEFAULT 5 +#endif /** * OLED Orientation Sensitivity on Automatic mode! * Motion Sensitivity <0=Off 1=Least Sensitive 9=Most Sensitive> |