aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--workspace/TS100/Core/Src/Settings.cpp2
-rw-r--r--workspace/TS100/Core/Src/gui.cpp31
-rw-r--r--workspace/TS100/configuration.h5
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>