aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordiscip <[email protected]>2023-07-24 10:23:04 +0200
committerGitHub <[email protected]>2023-07-24 18:23:04 +1000
commit118fa09ce776711865716478b55544cb0461d7bc (patch)
tree0298d451eb3589ac7c1654232194c38abaa7f678
parent6ba2a5c259a7abd0eb42c0dba50c167ac538792c (diff)
downloadIronOS-118fa09ce776711865716478b55544cb0461d7bc.tar.gz
IronOS-118fa09ce776711865716478b55544cb0461d7bc.zip
Enhanced V calibration (#1758)
-rw-r--r--Translations/translation_BE.json2
-rw-r--r--Translations/translation_BG.json2
-rw-r--r--Translations/translation_CS.json2
-rw-r--r--Translations/translation_DA.json2
-rw-r--r--Translations/translation_DE.json2
-rw-r--r--Translations/translation_EL.json2
-rw-r--r--Translations/translation_EN.json2
-rw-r--r--Translations/translation_ES.json2
-rw-r--r--Translations/translation_FI.json2
-rw-r--r--Translations/translation_FR.json2
-rw-r--r--Translations/translation_HR.json2
-rw-r--r--Translations/translation_HU.json2
-rw-r--r--Translations/translation_IT.json2
-rwxr-xr-xTranslations/translation_JA_JP.json2
-rw-r--r--Translations/translation_LT.json2
-rw-r--r--Translations/translation_NB.json2
-rw-r--r--Translations/translation_NL.json2
-rw-r--r--Translations/translation_NL_BE.json2
-rw-r--r--Translations/translation_PL.json2
-rw-r--r--Translations/translation_PT.json2
-rw-r--r--Translations/translation_RO.json2
-rw-r--r--Translations/translation_RU.json2
-rw-r--r--Translations/translation_SK.json2
-rw-r--r--Translations/translation_SL.json2
-rw-r--r--Translations/translation_SR_CYRL.json2
-rw-r--r--Translations/translation_SR_LATN.json2
-rw-r--r--Translations/translation_SV.json2
-rw-r--r--Translations/translation_TR.json2
-rw-r--r--Translations/translation_UK.json2
-rw-r--r--Translations/translation_VI.json2
-rw-r--r--Translations/translation_YUE_HK.json2
-rw-r--r--Translations/translation_ZH_CN.json2
-rw-r--r--Translations/translation_ZH_TW.json2
-rw-r--r--Translations/translations_definitions.json4
-rw-r--r--source/Core/Inc/Translation.h2
-rw-r--r--source/Core/Src/settingsGUI.cpp12
-rw-r--r--source/Core/Threads/OperatingModes/CJC.cpp2
37 files changed, 44 insertions, 42 deletions
diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json
index 72ddf0f5..327f760d 100644
--- a/Translations/translation_BE.json
+++ b/Translations/translation_BE.json
@@ -3,7 +3,7 @@
"languageLocalName": "Беларуская",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Каліброўка\nзроблена!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json
index 72b4f49f..afc756ba 100644
--- a/Translations/translation_BG.json
+++ b/Translations/translation_BG.json
@@ -3,7 +3,7 @@
"languageLocalName": "Български",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json
index fb4c4d1f..05279d46 100644
--- a/Translations/translation_CS.json
+++ b/Translations/translation_CS.json
@@ -3,7 +3,7 @@
"languageLocalName": "Český",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibrace\ndokončena!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json
index 12625a67..5b42beb5 100644
--- a/Translations/translation_DA.json
+++ b/Translations/translation_DA.json
@@ -3,7 +3,7 @@
"languageLocalName": "Dansk",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json
index 8ba129a3..c93cc0e4 100644
--- a/Translations/translation_DE.json
+++ b/Translations/translation_DE.json
@@ -3,7 +3,7 @@
"languageLocalName": "Deutsch",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Erfolgreich\nkalibriert!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json
index ae81203d..83600bbc 100644
--- a/Translations/translation_EL.json
+++ b/Translations/translation_EL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Greek",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Βαθμονόμηση\nολοκληρώθηκε!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json
index 87409562..e33e8b6a 100644
--- a/Translations/translation_EN.json
+++ b/Translations/translation_EN.json
@@ -3,7 +3,7 @@
"languageLocalName": "English",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json
index ad352fd3..803db9f1 100644
--- a/Translations/translation_ES.json
+++ b/Translations/translation_ES.json
@@ -3,7 +3,7 @@
"languageLocalName": "Castellano",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "¡Calibracion\nlista!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json
index 9bb4e90c..bc2ccc17 100644
--- a/Translations/translation_FI.json
+++ b/Translations/translation_FI.json
@@ -3,7 +3,7 @@
"languageLocalName": "Suomi",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json
index 1078b29a..04b15e64 100644
--- a/Translations/translation_FR.json
+++ b/Translations/translation_FR.json
@@ -3,7 +3,7 @@
"languageLocalName": "Français",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Étalonnage\nterminé!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json
index 093e66f7..cf0aa447 100644
--- a/Translations/translation_HR.json
+++ b/Translations/translation_HR.json
@@ -3,7 +3,7 @@
"languageLocalName": "Hrvatski",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibracija\ndovršena!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json
index 449a28c3..cc55dd72 100644
--- a/Translations/translation_HU.json
+++ b/Translations/translation_HU.json
@@ -3,7 +3,7 @@
"languageLocalName": "Magyar",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibráció\nkész!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json
index e1b7d32b..52a631c0 100644
--- a/Translations/translation_IT.json
+++ b/Translations/translation_IT.json
@@ -3,7 +3,7 @@
"languageLocalName": "Italiano",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibrazione\ncompletata!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json
index 74a3cd0c..df58ce79 100755
--- a/Translations/translation_JA_JP.json
+++ b/Translations/translation_JA_JP.json
@@ -3,7 +3,7 @@
"languageLocalName": "日本語",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json
index 96387be6..b4c2b53f 100644
--- a/Translations/translation_LT.json
+++ b/Translations/translation_LT.json
@@ -3,7 +3,7 @@
"languageLocalName": "Lietuvių",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json
index f716171f..f8b4b9a7 100644
--- a/Translations/translation_NB.json
+++ b/Translations/translation_NB.json
@@ -3,7 +3,7 @@
"languageLocalName": "Norsk bokmål",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json
index 4a1d2d56..e775541e 100644
--- a/Translations/translation_NL.json
+++ b/Translations/translation_NL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Nederlands",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json
index 29767d8e..8cfd64ef 100644
--- a/Translations/translation_NL_BE.json
+++ b/Translations/translation_NL_BE.json
@@ -3,7 +3,7 @@
"languageLocalName": "Vlaams",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json
index 604e8e29..0ca28f20 100644
--- a/Translations/translation_PL.json
+++ b/Translations/translation_PL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Polski",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibracja\nwykonana!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json
index 13078f7f..feac8a17 100644
--- a/Translations/translation_PT.json
+++ b/Translations/translation_PT.json
@@ -3,7 +3,7 @@
"languageLocalName": "Português",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibração\nefetuada!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json
index b40e8d16..857e9420 100644
--- a/Translations/translation_RO.json
+++ b/Translations/translation_RO.json
@@ -3,7 +3,7 @@
"languageLocalName": "Română",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json
index 62650819..225afa6f 100644
--- a/Translations/translation_RU.json
+++ b/Translations/translation_RU.json
@@ -3,7 +3,7 @@
"languageLocalName": "Русский",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Калибровка\nзавершена!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json
index b0b550ad..b8c50c94 100644
--- a/Translations/translation_SK.json
+++ b/Translations/translation_SK.json
@@ -3,7 +3,7 @@
"languageLocalName": "Slovenčina",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json
index 5e7d2d6d..6063abec 100644
--- a/Translations/translation_SL.json
+++ b/Translations/translation_SL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Slovenščina",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json
index 6d8ab8a3..473fb3d2 100644
--- a/Translations/translation_SR_CYRL.json
+++ b/Translations/translation_SR_CYRL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Српски",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json
index c3eedfcb..50f1b46b 100644
--- a/Translations/translation_SR_LATN.json
+++ b/Translations/translation_SR_LATN.json
@@ -3,7 +3,7 @@
"languageLocalName": "Srpski",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json
index 58d6f6d8..4d70fe90 100644
--- a/Translations/translation_SV.json
+++ b/Translations/translation_SV.json
@@ -3,7 +3,7 @@
"languageLocalName": "Svenska",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json
index 3a22cd19..e63b49bd 100644
--- a/Translations/translation_TR.json
+++ b/Translations/translation_TR.json
@@ -3,7 +3,7 @@
"languageLocalName": "Türkçe",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json
index 03a47057..48ea65e4 100644
--- a/Translations/translation_UK.json
+++ b/Translations/translation_UK.json
@@ -3,7 +3,7 @@
"languageLocalName": "Українська",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "КХС\nвідкалібровано!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json
index 10c36e0b..9b5c8fa5 100644
--- a/Translations/translation_VI.json
+++ b/Translations/translation_VI.json
@@ -3,7 +3,7 @@
"languageLocalName": "Tieng Viet",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json
index 745e6801..b02c9177 100644
--- a/Translations/translation_YUE_HK.json
+++ b/Translations/translation_YUE_HK.json
@@ -3,7 +3,7 @@
"languageLocalName": "廣東話 (香港)",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json
index de08f696..b5180add 100644
--- a/Translations/translation_ZH_CN.json
+++ b/Translations/translation_ZH_CN.json
@@ -3,7 +3,7 @@
"languageLocalName": "简体中文",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json
index 1094e3aa..9151fea8 100644
--- a/Translations/translation_ZH_TW.json
+++ b/Translations/translation_ZH_TW.json
@@ -3,7 +3,7 @@
"languageLocalName": "正體中文",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json
index 96d237b7..2a9a567e 100644
--- a/Translations/translations_definitions.json
+++ b/Translations/translations_definitions.json
@@ -1,7 +1,7 @@
{
"messagesWarn": [{
- "id": "CJCCalibrationDone",
- "description": "Confirmation message indicating CJC calibration is complete."
+ "id": "CalibrationDone",
+ "description": "Confirmation message indicating calibration is complete."
},
{
"id": "ResetOKMessage",
diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h
index 1f1f3964..45632eda 100644
--- a/source/Core/Inc/Translation.h
+++ b/source/Core/Inc/Translation.h
@@ -107,7 +107,7 @@ enum class SettingsItemIndex : uint8_t {
};
struct TranslationIndexTable {
- uint16_t CJCCalibrationDone;
+ uint16_t CalibrationDone;
uint16_t ResetOKMessage;
uint16_t SettingsResetMessage;
uint16_t NoAccelerometerMessage;
diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp
index 87a17b6a..9542b08c 100644
--- a/source/Core/Src/settingsGUI.cpp
+++ b/source/Core/Src/settingsGUI.cpp
@@ -884,19 +884,21 @@ static bool setCalibrateVIN(void) {
OLED::clearScreen();
for (;;) {
- OLED::setCursor(0, 0);
+ OLED::setCursor(25, 0);
uint16_t voltage = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
OLED::printNumber(voltage / 10, 2, FontStyle::LARGE);
OLED::print(LargeSymbolDot, FontStyle::LARGE);
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE, false);
OLED::print(LargeSymbolVolts, FontStyle::LARGE);
+ OLED::setCursor(0, 8);
+ OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::SMALL);
switch (getButtonState()) {
case BUTTON_F_SHORT:
- nextSettingValue(SettingsOptions::VoltageDiv);
+ prevSettingValue(SettingsOptions::VoltageDiv);
break;
case BUTTON_B_SHORT:
- prevSettingValue(SettingsOptions::VoltageDiv);
+ nextSettingValue(SettingsOptions::VoltageDiv);
break;
case BUTTON_BOTH:
case BUTTON_F_LONG:
@@ -904,9 +906,9 @@ static bool setCalibrateVIN(void) {
saveSettings();
OLED::clearScreen();
OLED::setCursor(0, 0);
- OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::LARGE);
+ warnUser(translatedString(Tr->CalibrationDone), 3 * TICKS_SECOND);
OLED::refresh();
- waitForButtonPressOrTimeout(1 * TICKS_SECOND);
+ waitForButtonPressOrTimeout(0.5 * TICKS_SECOND);
return false;
case BUTTON_NONE:
default:
diff --git a/source/Core/Threads/OperatingModes/CJC.cpp b/source/Core/Threads/OperatingModes/CJC.cpp
index 25fef8d8..4da688f9 100644
--- a/source/Core/Threads/OperatingModes/CJC.cpp
+++ b/source/Core/Threads/OperatingModes/CJC.cpp
@@ -30,7 +30,7 @@ void performCJCC(void) {
}
setSettingValue(SettingsOptions::CalibrationOffset, setoffset);
OLED::clearScreen();
- warnUser(translatedString(Tr->CJCCalibrationDone), 3 * TICKS_SECOND);
+ warnUser(translatedString(Tr->CalibrationDone), 3 * TICKS_SECOND);
OLED::refresh();
// Preventing to repeat calibration at boot automatically (only one shot).
setSettingValue(SettingsOptions::CalibrateCJC, 0);