Cleanup (#877)
* Clean translation * Create enum for off/slow/med/fast * Update configuration.h * Default loop on * Create Medium speed symbol slot * True/False are no longer defined, move to off string + slightly smoother lerp animations
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "F",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "R",
|
||||
"SettingSlowChar": "P",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "F",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "L",
|
||||
"SettingStartSleepChar": "D",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "S",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "L",
|
||||
"SettingStartSleepChar": "R",
|
||||
"SettingStartSleepOffChar": "K",
|
||||
@@ -303,7 +304,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "F",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "S",
|
||||
"SettingStartSleepChar": "Z",
|
||||
"SettingStartSleepOffChar": "R",
|
||||
@@ -303,7 +304,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "R",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "S",
|
||||
"SettingStartSleepChar": "R",
|
||||
"SettingStartSleepOffChar": "F",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "N",
|
||||
"SettingSlowChar": "H",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "R",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "A",
|
||||
"SettingStartSleepChar": "V",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "B",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "G",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "F",
|
||||
"SettingStartSleepChar": "Z",
|
||||
"SettingStartSleepOffChar": "S",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "V",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "S",
|
||||
"SettingStartSleepChar": "R",
|
||||
"SettingStartSleepOffChar": "A",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "G",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "M",
|
||||
"SettingStartSleepOffChar": "K",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "F",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "S",
|
||||
"SettingSlowChar": "T",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "H",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "L",
|
||||
"SettingStartSleepChar": "D",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "S",
|
||||
"SettingSlowChar": "W",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "Z",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -303,7 +304,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "R",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "А",
|
||||
"SettingFastChar": "Б",
|
||||
"SettingSlowChar": "М",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "П",
|
||||
"SettingStartSleepChar": "О",
|
||||
"SettingStartSleepOffChar": "К",
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "R",
|
||||
"SettingSlowChar": "P",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "S",
|
||||
"SettingStartSleepChar": "K",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "S",
|
||||
"SettingFastChar": "H",
|
||||
"SettingSlowChar": "P",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "S",
|
||||
"SettingStartSleepChar": "Z",
|
||||
"SettingStartSleepOffChar": "V",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "А",
|
||||
"SettingFastChar": "Б",
|
||||
"SettingSlowChar": "С",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "B",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "S",
|
||||
"SettingSlowChar": "L",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -302,7 +303,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "F",
|
||||
"SettingSlowChar": "S",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "T",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "O",
|
||||
@@ -320,7 +321,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "Ш",
|
||||
"SettingSlowChar": "П",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "П",
|
||||
"SettingStartSleepChar": "О",
|
||||
"SettingStartSleepOffChar": "К",
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"SettingAutoChar": "自",
|
||||
"SettingFastChar": "快",
|
||||
"SettingSlowChar": "慢",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "焊",
|
||||
"SettingStartSleepChar": "待",
|
||||
"SettingStartSleepOffChar": "室",
|
||||
@@ -303,7 +304,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"SettingAutoChar": "自",
|
||||
"SettingFastChar": "快",
|
||||
"SettingSlowChar": "慢",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingStartSolderingChar": "焊",
|
||||
"SettingStartSleepChar": "待",
|
||||
"SettingStartSleepOffChar": "室",
|
||||
@@ -303,7 +304,7 @@
|
||||
"Anim.",
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in root menu <Miliseconds> <O=off | L=low | M=medium | H=high>"
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +142,10 @@ var def =
|
||||
"id": "SettingSlowChar",
|
||||
"len": 1
|
||||
},
|
||||
{
|
||||
"id": "SettingMediumChar",
|
||||
"len": 1
|
||||
},
|
||||
{
|
||||
"id": "SettingStartSolderingChar",
|
||||
"len": 1
|
||||
|
||||
@@ -195,7 +195,7 @@ void OLED::transitionSecondaryFramebuffer(bool forwardNavigation) {
|
||||
memmove(&secondStripPtr[newStart], &secondBackStripPtr[newEnd], progress);
|
||||
|
||||
refresh();
|
||||
osDelay(40);
|
||||
osDelay(TICKS_100MS/5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ typedef struct {
|
||||
uint8_t OrientationMode : 2; // Selects between Auto,Right and left handed layouts
|
||||
uint8_t sensitivity : 4; // Sensitivity of accelerometer (5 bits)
|
||||
uint8_t animationLoop : 1; // Animation loop switch
|
||||
uint16_t animationSpeed; // Animation speed (in miliseconds)
|
||||
uint8_t animationSpeed : 2; // Animation speed (in miliseconds)
|
||||
uint8_t autoStartMode : 2; // Should the unit automatically jump straight
|
||||
// into soldering mode when power is applied
|
||||
uint8_t ShutdownTime; // Time until unit shuts down if left alone
|
||||
@@ -63,7 +63,13 @@ typedef struct {
|
||||
// MUST BE LAST
|
||||
|
||||
} systemSettingsType;
|
||||
|
||||
typedef enum {
|
||||
OFF = 0, // Off (disabled)
|
||||
SLOW = 1, //
|
||||
MEDIUM = 2, //
|
||||
FAST = 3, //
|
||||
MAX_VALUE = 4 //
|
||||
} settingOffSpeed_t;
|
||||
extern volatile systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings();
|
||||
|
||||
@@ -44,8 +44,6 @@ extern const char *LockingKeysString;
|
||||
extern const char *UnlockingKeysString;
|
||||
extern const char *WarningKeysLockedString;
|
||||
|
||||
extern const char *SettingTrueChar;
|
||||
extern const char *SettingFalseChar;
|
||||
extern const char *SettingRightChar;
|
||||
extern const char *SettingLeftChar;
|
||||
extern const char *SettingAutoChar;
|
||||
@@ -63,6 +61,7 @@ extern const char *SettingLockFullChar;
|
||||
extern const char *SettingNAChar;
|
||||
|
||||
extern const char *SettingFastChar;
|
||||
extern const char *SettingMediumChar;
|
||||
extern const char *SettingSlowChar;
|
||||
extern const char *TipModelStrings[];
|
||||
extern const char *DebugMenu[];
|
||||
|
||||
@@ -914,37 +914,25 @@ static void settings_displayAnimationLoop(void) {
|
||||
}
|
||||
|
||||
static bool settings_setAnimationSpeed(void) {
|
||||
switch (systemSettings.animationSpeed) {
|
||||
case 0:
|
||||
systemSettings.animationSpeed = TICKS_100MS * 5;
|
||||
break;
|
||||
case TICKS_100MS * 5:
|
||||
systemSettings.animationSpeed = TICKS_100MS * 4;
|
||||
break;
|
||||
case TICKS_100MS * 4:
|
||||
systemSettings.animationSpeed = TICKS_100MS * 3;
|
||||
break;
|
||||
default:
|
||||
systemSettings.animationSpeed = 0;
|
||||
break;
|
||||
}
|
||||
return systemSettings.animationSpeed == TICKS_100MS * 3;
|
||||
systemSettings.animationSpeed++;
|
||||
systemSettings.animationSpeed %= settingOffSpeed_t::MAX_VALUE;
|
||||
return systemSettings.animationSpeed == (uint8_t)settingOffSpeed_t::FAST;
|
||||
}
|
||||
|
||||
static void settings_displayAnimationSpeed(void) {
|
||||
printShortDescription(30, 7);
|
||||
printShortDescription(30, 5);
|
||||
switch (systemSettings.animationSpeed) {
|
||||
case TICKS_100MS * 5:
|
||||
OLED::print(SettingSensitivityLow);
|
||||
case settingOffSpeed_t::SLOW:
|
||||
OLED::print(SettingSlowChar);
|
||||
break;
|
||||
case TICKS_100MS * 4:
|
||||
OLED::print(SettingSensitivityMedium);
|
||||
case settingOffSpeed_t::MEDIUM:
|
||||
OLED::print(SettingMediumChar);
|
||||
break;
|
||||
case TICKS_100MS * 3:
|
||||
OLED::print(SettingSensitivityHigh);
|
||||
case settingOffSpeed_t::FAST:
|
||||
OLED::print(SettingFastChar);
|
||||
break;
|
||||
default:
|
||||
OLED::print(SettingSensitivityOff);
|
||||
OLED::print(OffString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -997,14 +985,26 @@ static void displayMenu(size_t index) {
|
||||
static TickType_t menuSwitchLoopTick = 0;
|
||||
static size_t menuCurrentIndex = sizeof(rootSettingsMenu) + 1;
|
||||
static size_t currentFrame = 0;
|
||||
TickType_t step = TICKS_100MS * 5;
|
||||
switch (systemSettings.animationSpeed) {
|
||||
case settingOffSpeed_t::FAST:
|
||||
step = TICKS_100MS * 3;
|
||||
break;
|
||||
case settingOffSpeed_t::MEDIUM:
|
||||
step = TICKS_100MS * 4;
|
||||
break;
|
||||
default: // SLOW or off - defaulted above
|
||||
break;
|
||||
}
|
||||
if (!animOpenState) {
|
||||
if (menuCurrentIndex != index) {
|
||||
menuCurrentIndex = index;
|
||||
currentFrame = systemSettings.animationSpeed ? 0 : 2;
|
||||
currentFrame = systemSettings.animationSpeed == settingOffSpeed_t::OFF ? 2 : 0;
|
||||
menuSwitchLoopTick = xTaskGetTickCount();
|
||||
}
|
||||
if (systemSettings.animationSpeed && (systemSettings.animationLoop || currentFrame != 2))
|
||||
currentFrame = ((xTaskGetTickCount() - menuSwitchLoopTick) / systemSettings.animationSpeed) % 3;
|
||||
if (systemSettings.animationSpeed && (systemSettings.animationLoop || currentFrame != 2)) {
|
||||
currentFrame = ((xTaskGetTickCount() - menuSwitchLoopTick) / step) % 3;
|
||||
}
|
||||
OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[index][(16 * 2) * currentFrame]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "Model_Config.h"
|
||||
#include "Settings.h"
|
||||
#include <stdint.h>
|
||||
/**
|
||||
* Configuration.h
|
||||
@@ -92,8 +93,8 @@
|
||||
#define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33))
|
||||
#define TEMPERATURE_INF 0 // default to 0
|
||||
#define DESCRIPTION_SCROLL_SPEED 0 // 0: Slow 1: Fast - default to slow
|
||||
#define ANIMATION_LOOP 0 // 0: off 1: on
|
||||
#define ANIMATION_SPEED 400 // 0: off, 300: High, 400: Medium, 500: Low
|
||||
#define ANIMATION_LOOP 1 // 0: off 1: on
|
||||
#define ANIMATION_SPEED settingOffSpeed_t::MEDIUM
|
||||
|
||||
#define OP_AMP_Rf_TS100 750 * 1000 // 750 Kilo-ohms -> From schematic, R1
|
||||
#define OP_AMP_Rin_TS100 2370 // 2.37 Kilo-ohms -> From schematic, R2
|
||||
|
||||
Reference in New Issue
Block a user