1
0
forked from me/IronOS
* 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:
Ben V. Brown
2021-03-15 21:43:01 +11:00
committed by GitHub
parent 7fbfde7b33
commit 337c932b23
33 changed files with 95 additions and 58 deletions

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "F", "SettingFastChar": "F",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "R", "SettingFastChar": "R",
"SettingSlowChar": "P", "SettingSlowChar": "P",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "F", "SettingFastChar": "F",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "L", "SettingStartSolderingChar": "L",
"SettingStartSleepChar": "D", "SettingStartSleepChar": "D",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -37,6 +37,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "S", "SettingFastChar": "S",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "L", "SettingStartSolderingChar": "L",
"SettingStartSleepChar": "R", "SettingStartSleepChar": "R",
"SettingStartSleepOffChar": "K", "SettingStartSleepOffChar": "K",
@@ -303,7 +304,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -37,6 +37,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "F", "SettingFastChar": "F",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "S", "SettingStartSolderingChar": "S",
"SettingStartSleepChar": "Z", "SettingStartSleepChar": "Z",
"SettingStartSleepOffChar": "R", "SettingStartSleepOffChar": "R",
@@ -303,7 +304,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "R", "SettingFastChar": "R",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "S", "SettingStartSolderingChar": "S",
"SettingStartSleepChar": "R", "SettingStartSleepChar": "R",
"SettingStartSleepOffChar": "F", "SettingStartSleepOffChar": "F",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "N", "SettingFastChar": "N",
"SettingSlowChar": "H", "SettingSlowChar": "H",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "R", "SettingFastChar": "R",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "A", "SettingStartSolderingChar": "A",
"SettingStartSleepChar": "V", "SettingStartSleepChar": "V",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "B", "SettingFastChar": "B",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "G", "SettingFastChar": "G",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "F", "SettingStartSolderingChar": "F",
"SettingStartSleepChar": "Z", "SettingStartSleepChar": "Z",
"SettingStartSleepOffChar": "S", "SettingStartSleepOffChar": "S",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "V", "SettingFastChar": "V",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "S", "SettingStartSolderingChar": "S",
"SettingStartSleepChar": "R", "SettingStartSleepChar": "R",
"SettingStartSleepOffChar": "A", "SettingStartSleepOffChar": "A",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "G", "SettingFastChar": "G",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "M", "SettingStartSleepChar": "M",
"SettingStartSleepOffChar": "K", "SettingStartSleepOffChar": "K",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "F", "SettingFastChar": "F",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "S", "SettingFastChar": "S",
"SettingSlowChar": "T", "SettingSlowChar": "T",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "H", "SettingFastChar": "H",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "L", "SettingStartSolderingChar": "L",
"SettingStartSleepChar": "D", "SettingStartSleepChar": "D",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -37,6 +37,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "S", "SettingFastChar": "S",
"SettingSlowChar": "W", "SettingSlowChar": "W",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "Z", "SettingStartSleepChar": "Z",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -303,7 +304,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "R", "SettingFastChar": "R",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "А", "SettingAutoChar": "А",
"SettingFastChar": "Б", "SettingFastChar": "Б",
"SettingSlowChar": "М", "SettingSlowChar": "М",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "П", "SettingStartSolderingChar": "П",
"SettingStartSleepChar": "О", "SettingStartSleepChar": "О",
"SettingStartSleepOffChar": "К", "SettingStartSleepOffChar": "К",

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "R", "SettingFastChar": "R",
"SettingSlowChar": "P", "SettingSlowChar": "P",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "S", "SettingStartSolderingChar": "S",
"SettingStartSleepChar": "K", "SettingStartSleepChar": "K",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "S", "SettingAutoChar": "S",
"SettingFastChar": "H", "SettingFastChar": "H",
"SettingSlowChar": "P", "SettingSlowChar": "P",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "S", "SettingStartSolderingChar": "S",
"SettingStartSleepChar": "Z", "SettingStartSleepChar": "Z",
"SettingStartSleepOffChar": "V", "SettingStartSleepOffChar": "V",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "А", "SettingAutoChar": "А",
"SettingFastChar": "Б", "SettingFastChar": "Б",
"SettingSlowChar": "С", "SettingSlowChar": "С",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "B", "SettingFastChar": "B",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "S", "SettingFastChar": "S",
"SettingSlowChar": "L", "SettingSlowChar": "L",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -302,7 +303,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -33,6 +33,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "F", "SettingFastChar": "F",
"SettingSlowChar": "S", "SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "T", "SettingStartSolderingChar": "T",
"SettingStartSleepChar": "S", "SettingStartSleepChar": "S",
"SettingStartSleepOffChar": "O", "SettingStartSleepOffChar": "O",
@@ -320,7 +321,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -36,6 +36,7 @@
"SettingAutoChar": "A", "SettingAutoChar": "A",
"SettingFastChar": "Ш", "SettingFastChar": "Ш",
"SettingSlowChar": "П", "SettingSlowChar": "П",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "П", "SettingStartSolderingChar": "П",
"SettingStartSleepChar": "О", "SettingStartSleepChar": "О",
"SettingStartSleepOffChar": "К", "SettingStartSleepOffChar": "К",

View File

@@ -37,6 +37,7 @@
"SettingAutoChar": "自", "SettingAutoChar": "自",
"SettingFastChar": "快", "SettingFastChar": "快",
"SettingSlowChar": "慢", "SettingSlowChar": "慢",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "焊", "SettingStartSolderingChar": "焊",
"SettingStartSleepChar": "待", "SettingStartSleepChar": "待",
"SettingStartSleepOffChar": "室", "SettingStartSleepOffChar": "室",
@@ -303,7 +304,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -37,6 +37,7 @@
"SettingAutoChar": "自", "SettingAutoChar": "自",
"SettingFastChar": "快", "SettingFastChar": "快",
"SettingSlowChar": "慢", "SettingSlowChar": "慢",
"SettingMediumChar": "M",
"SettingStartSolderingChar": "焊", "SettingStartSolderingChar": "焊",
"SettingStartSleepChar": "待", "SettingStartSleepChar": "待",
"SettingStartSleepOffChar": "室", "SettingStartSleepOffChar": "室",
@@ -303,7 +304,7 @@
"Anim.", "Anim.",
"speed" "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>"
} }
} }
} }

View File

@@ -142,6 +142,10 @@ var def =
"id": "SettingSlowChar", "id": "SettingSlowChar",
"len": 1 "len": 1
}, },
{
"id": "SettingMediumChar",
"len": 1
},
{ {
"id": "SettingStartSolderingChar", "id": "SettingStartSolderingChar",
"len": 1 "len": 1

View File

@@ -195,7 +195,7 @@ void OLED::transitionSecondaryFramebuffer(bool forwardNavigation) {
memmove(&secondStripPtr[newStart], &secondBackStripPtr[newEnd], progress); memmove(&secondStripPtr[newStart], &secondBackStripPtr[newEnd], progress);
refresh(); refresh();
osDelay(40); osDelay(TICKS_100MS/5);
} }
} }

View File

@@ -30,7 +30,7 @@ typedef struct {
uint8_t OrientationMode : 2; // Selects between Auto,Right and left handed layouts uint8_t OrientationMode : 2; // Selects between Auto,Right and left handed layouts
uint8_t sensitivity : 4; // Sensitivity of accelerometer (5 bits) uint8_t sensitivity : 4; // Sensitivity of accelerometer (5 bits)
uint8_t animationLoop : 1; // Animation loop switch 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 uint8_t autoStartMode : 2; // Should the unit automatically jump straight
// into soldering mode when power is applied // into soldering mode when power is applied
uint8_t ShutdownTime; // Time until unit shuts down if left alone uint8_t ShutdownTime; // Time until unit shuts down if left alone
@@ -63,7 +63,13 @@ typedef struct {
// MUST BE LAST // MUST BE LAST
} systemSettingsType; } systemSettingsType;
typedef enum {
OFF = 0, // Off (disabled)
SLOW = 1, //
MEDIUM = 2, //
FAST = 3, //
MAX_VALUE = 4 //
} settingOffSpeed_t;
extern volatile systemSettingsType systemSettings; extern volatile systemSettingsType systemSettings;
void saveSettings(); void saveSettings();

View File

@@ -44,8 +44,6 @@ extern const char *LockingKeysString;
extern const char *UnlockingKeysString; extern const char *UnlockingKeysString;
extern const char *WarningKeysLockedString; extern const char *WarningKeysLockedString;
extern const char *SettingTrueChar;
extern const char *SettingFalseChar;
extern const char *SettingRightChar; extern const char *SettingRightChar;
extern const char *SettingLeftChar; extern const char *SettingLeftChar;
extern const char *SettingAutoChar; extern const char *SettingAutoChar;
@@ -63,6 +61,7 @@ extern const char *SettingLockFullChar;
extern const char *SettingNAChar; extern const char *SettingNAChar;
extern const char *SettingFastChar; extern const char *SettingFastChar;
extern const char *SettingMediumChar;
extern const char *SettingSlowChar; extern const char *SettingSlowChar;
extern const char *TipModelStrings[]; extern const char *TipModelStrings[];
extern const char *DebugMenu[]; extern const char *DebugMenu[];

View File

@@ -914,37 +914,25 @@ static void settings_displayAnimationLoop(void) {
} }
static bool settings_setAnimationSpeed(void) { static bool settings_setAnimationSpeed(void) {
switch (systemSettings.animationSpeed) { systemSettings.animationSpeed++;
case 0: systemSettings.animationSpeed %= settingOffSpeed_t::MAX_VALUE;
systemSettings.animationSpeed = TICKS_100MS * 5; return systemSettings.animationSpeed == (uint8_t)settingOffSpeed_t::FAST;
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;
} }
static void settings_displayAnimationSpeed(void) { static void settings_displayAnimationSpeed(void) {
printShortDescription(30, 7); printShortDescription(30, 5);
switch (systemSettings.animationSpeed) { switch (systemSettings.animationSpeed) {
case TICKS_100MS * 5: case settingOffSpeed_t::SLOW:
OLED::print(SettingSensitivityLow); OLED::print(SettingSlowChar);
break; break;
case TICKS_100MS * 4: case settingOffSpeed_t::MEDIUM:
OLED::print(SettingSensitivityMedium); OLED::print(SettingMediumChar);
break; break;
case TICKS_100MS * 3: case settingOffSpeed_t::FAST:
OLED::print(SettingSensitivityHigh); OLED::print(SettingFastChar);
break; break;
default: default:
OLED::print(SettingSensitivityOff); OLED::print(OffString);
break; break;
} }
} }
@@ -997,14 +985,26 @@ static void displayMenu(size_t index) {
static TickType_t menuSwitchLoopTick = 0; static TickType_t menuSwitchLoopTick = 0;
static size_t menuCurrentIndex = sizeof(rootSettingsMenu) + 1; static size_t menuCurrentIndex = sizeof(rootSettingsMenu) + 1;
static size_t currentFrame = 0; 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 (!animOpenState) {
if (menuCurrentIndex != index) { if (menuCurrentIndex != index) {
menuCurrentIndex = index; menuCurrentIndex = index;
currentFrame = systemSettings.animationSpeed ? 0 : 2; currentFrame = systemSettings.animationSpeed == settingOffSpeed_t::OFF ? 2 : 0;
menuSwitchLoopTick = xTaskGetTickCount(); menuSwitchLoopTick = xTaskGetTickCount();
} }
if (systemSettings.animationSpeed && (systemSettings.animationLoop || currentFrame != 2)) if (systemSettings.animationSpeed && (systemSettings.animationLoop || currentFrame != 2)) {
currentFrame = ((xTaskGetTickCount() - menuSwitchLoopTick) / systemSettings.animationSpeed) % 3; currentFrame = ((xTaskGetTickCount() - menuSwitchLoopTick) / step) % 3;
}
OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[index][(16 * 2) * currentFrame])); OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[index][(16 * 2) * currentFrame]));
} }
} }

View File

@@ -1,5 +1,6 @@
#pragma once #pragma once
#include "Model_Config.h" #include "Model_Config.h"
#include "Settings.h"
#include <stdint.h> #include <stdint.h>
/** /**
* Configuration.h * Configuration.h
@@ -92,8 +93,8 @@
#define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33)) #define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33))
#define TEMPERATURE_INF 0 // default to 0 #define TEMPERATURE_INF 0 // default to 0
#define DESCRIPTION_SCROLL_SPEED 0 // 0: Slow 1: Fast - default to slow #define DESCRIPTION_SCROLL_SPEED 0 // 0: Slow 1: Fast - default to slow
#define ANIMATION_LOOP 0 // 0: off 1: on #define ANIMATION_LOOP 1 // 0: off 1: on
#define ANIMATION_SPEED 400 // 0: off, 300: High, 400: Medium, 500: Low #define ANIMATION_SPEED settingOffSpeed_t::MEDIUM
#define OP_AMP_Rf_TS100 750 * 1000 // 750 Kilo-ohms -> From schematic, R1 #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 #define OP_AMP_Rin_TS100 2370 // 2.37 Kilo-ohms -> From schematic, R2