From e8cac79923ae025a3e419960a71191a5274cd69d Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Thu, 8 Dec 2022 00:47:31 +0100 Subject: [PATCH 01/16] removed some redundant lines --- source/Core/Drivers/Font.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index d098f6f828..6ec3b0ca4d 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -93,23 +93,7 @@ const uint8_t WarningBlock24[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x30, 0x0C, 0x02, 0xF1, 0xF1, 0xF1, 0x02, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xB0, 0x8C, 0x83, 0x80, 0x80, 0x80, 0x80, 0xB3, 0xB3, 0xB3, 0x80, 0x80, 0x80, 0x80, 0x83, 0x8C, 0xB0, 0xC0, 0x00, 0x00}; -#if defined(MODEL_TS100) + defined(MODEL_Pinecil) > 0 -const uint8_t buttonA[] = { - // width = 42 - // height = 16 - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x04, 0x02, 0x02, 0x01, 0x81, 0x49, 0x31, 0x01, 0xc1, 0x25, 0x19, 0x01, 0xc1, 0x25, 0x19, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x89, 0x8a, 0x88, 0x94, - 0x8c, 0x94, 0xae, 0x80, 0xbe, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0x46, 0x4a, 0x22, 0x18, 0x07, 0x00, 0x00, 0x00}; - -const uint8_t disconnectedTip[] = { - // width = 42 - // height = 16 - 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0x9c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x20, 0x70, 0x38, 0x1c, 0xcc, 0x40, - 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0x60, 0xe0, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02, 0x05, 0x00, 0x07, 0x01, 0x04, 0x01, 0x04, 0x01, - 0x04, 0x31, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x39, 0x30, 0x01, 0x03, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x09, 0x0f, 0x00}; -#endif - -#if defined(MODEL_Pinecilv2) >= 1 +#if defined(MODEL_TS100) + defined(MODEL_Pinecil) + defined(MODEL_Pinecilv2) > 0 const uint8_t buttonA[] = { // width = 42 // height = 16 From 9966274a3dd1286ff690f7dbba15ef7904d310be Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 11:34:37 +0100 Subject: [PATCH 02/16] show correct message after factory reset_I --- source/Core/Src/settingsGUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index 74d93481af..a5b796568d 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -719,7 +719,7 @@ static void displayPowerPulseDuration(void) { OLED::printNumber(getSettingValue( static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); - warnUser(translatedString(Tr->SettingsResetMessage), 10 * TICKS_SECOND); + warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); } return false; } From b26cfa3946288d9e8a454fdc8ba4c6d9df001f38 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 11:42:48 +0100 Subject: [PATCH 03/16] show correct message after factory reset_II --- Translations/translation_EN.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index bd38d1b408..fec140a491 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -20,10 +20,13 @@ "Calibration", "done!" ], - "ResetOKMessage": "Reset OK", + "ResetOKMessage": [ + "Default setting", + "restored!" + ], "SettingsResetMessage": [ "Certain settings", - "were changed!" + "changed!" ], "NoAccelerometerMessage": [ "No accelerometer", @@ -338,4 +341,4 @@ "desc": "Toggle active language" } } -} \ No newline at end of file +} From ec3e89fc755cb0eed050d9216356bb740416fbd8 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 11:49:37 +0100 Subject: [PATCH 04/16] show correct message after factory reset_III --- source/Core/Inc/Translation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index 3235237cb0..8b448d55ae 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -75,6 +75,7 @@ enum class SettingsItemIndex : uint8_t { struct TranslationIndexTable { uint16_t SettingsCalibrationWarning; uint16_t CJCCalibrating; + uint16_t ResetOKMessage; uint16_t SettingsResetWarning; uint16_t UVLOWarningString; uint16_t UndervoltageString; From 0a9b70dc03124ab5b38aad99c5e639217bf1fa09 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 11:59:27 +0100 Subject: [PATCH 05/16] show correct message after factory reset_IV --- Translations/translations_def.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Translations/translations_def.js b/Translations/translations_def.js index e465c2a8d5..b9d8cb43fa 100644 --- a/Translations/translations_def.js +++ b/Translations/translations_def.js @@ -8,9 +8,13 @@ var def = /// "id": "CJCCalibrating", "description": "Message indicating CJC is being calibrated." }, + { + "id": "ResetOKMessage", + "description": "Confirmation message shown after a successful settings-reset." + }, { "id": "SettingsResetWarning", - "description": "Confirmation message shown before confirming a settings reset." + "description": "Messasge shown after a firmware update if certain settings have been changed." }, { "id": "UVLOWarningString", From e2b1b149af2a83d111c5b28e024c00d8ce383237 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 12:16:23 +0100 Subject: [PATCH 06/16] show correct message after factory reset_V --- Translations/translations_def.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Translations/translations_def.js b/Translations/translations_def.js index b9d8cb43fa..c9f89af1e6 100644 --- a/Translations/translations_def.js +++ b/Translations/translations_def.js @@ -8,13 +8,9 @@ var def = /// "id": "CJCCalibrating", "description": "Message indicating CJC is being calibrated." }, - { - "id": "ResetOKMessage", - "description": "Confirmation message shown after a successful settings-reset." - }, { "id": "SettingsResetWarning", - "description": "Messasge shown after a firmware update if certain settings have been changed." + "description": "Warning shown before confirming a settings reset." }, { "id": "UVLOWarningString", @@ -62,9 +58,13 @@ var def = /// "id": "CJCCalibrationDone", "description": "Confirmation message indicating CJC calibration is complete." }, + { + "id": "ResetOKMessage", + "description": "Confirmation message shown after a successful settings-reset." + }, { "id": "SettingsResetMessage", - "description": "Shown when the settings are reset to factory defaults either by the user or by incompatible firmware changes." + "description": "Shown after a firmware update when certain settings have been reset to factory defaults due to incompatible firmware changes." }, { "id": "NoAccelerometerMessage", From 372dac4cf56ec86934725f6918d8b337adae9e16 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 12:25:53 +0100 Subject: [PATCH 07/16] show correct message after factory reset_VI --- source/Core/Inc/Translation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index 8b448d55ae..c658f63b1d 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -75,7 +75,6 @@ enum class SettingsItemIndex : uint8_t { struct TranslationIndexTable { uint16_t SettingsCalibrationWarning; uint16_t CJCCalibrating; - uint16_t ResetOKMessage; uint16_t SettingsResetWarning; uint16_t UVLOWarningString; uint16_t UndervoltageString; @@ -88,6 +87,7 @@ struct TranslationIndexTable { uint16_t DeviceFailedValidationWarning; uint16_t CJCCalibrationDone; + uint16_t ResetOKMessage; uint16_t SettingsResetMessage; uint16_t NoAccelerometerMessage; uint16_t NoPowerDeliveryMessage; From ff088965d621a0e639fa2a7ba9da2ce8e60d74ac Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:45:32 +0100 Subject: [PATCH 08/16] after reset go to home screen --- source/Core/Src/settingsGUI.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index a5b796568d..303a82b550 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -720,6 +720,7 @@ static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); + return; } return false; } From 110af42e3e79c81827822eec3e38a7eae8e435a7 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:47:49 +0100 Subject: [PATCH 09/16] after reset go to home screen_II --- source/Core/Src/settingsGUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index 303a82b550..5cfba6711a 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -720,7 +720,7 @@ static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); - return; + return 1; } return false; } From 863f091ffd0321cffb5537d348f17ad84b61c5aa Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:54:08 +0100 Subject: [PATCH 10/16] after reset go to home screen_III --- source/Core/Src/settingsGUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index 5cfba6711a..b41af0de0b 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -720,7 +720,7 @@ static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); - return 1; + return false; } return false; } From c08b06bb168bef328ce6051437e818e3529d71a7 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:07:09 +0100 Subject: [PATCH 11/16] after reset go to home screen_IV --- source/Core/Src/settingsGUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index b41af0de0b..fb15748eac 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -720,7 +720,7 @@ static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); - return false; + return 0; } return false; } From b934cacdfad7bc4acbbe78b9f7a5faff82046ef0 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:17:24 +0100 Subject: [PATCH 12/16] after reset go to home screen_V --- source/Core/Src/settingsGUI.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index fb15748eac..88d8b52c17 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -720,6 +720,7 @@ static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); + break; return 0; } return false; From 74339a997c958f6ee7c155dcb207cb264e4c76ef Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:24:10 +0100 Subject: [PATCH 13/16] after reset go to home screen_VI --- source/Core/Src/settingsGUI.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index 88d8b52c17..dbd08cb8a8 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -720,10 +720,8 @@ static bool setResetSettings(void) { if (userConfirmation(translatedString(Tr->SettingsResetWarning))) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); - break; - return 0; } - return false; + return 0; } static void displayResetSettings(void) {} From 8a6b00fa58836af30a7e1a66579a26e2cf7faa36 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:30:26 +0100 Subject: [PATCH 14/16] reverting (go to home screen did not work) --- source/Core/Src/settingsGUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index dbd08cb8a8..a5b796568d 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -721,7 +721,7 @@ static bool setResetSettings(void) { resetSettings(); warnUser(translatedString(Tr->ResetOKMessage), 10 * TICKS_SECOND); } - return 0; + return false; } static void displayResetSettings(void) {} From 2a7cacd7feb56ac3685069dc056facb15b8c2115 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:37:27 +0100 Subject: [PATCH 15/16] typo fix --- Translations/translation_EN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index fec140a491..ff0982e2e5 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -21,7 +21,7 @@ "done!" ], "ResetOKMessage": [ - "Default setting", + "Default settings", "restored!" ], "SettingsResetMessage": [ From b0b261f7854bbbe5f6ef7ed79e663fc99f8519d7 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:46:11 +0100 Subject: [PATCH 16/16] large reset confirmation_I --- Translations/translation_EN.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index ff0982e2e5..14405cc76f 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -20,10 +20,7 @@ "Calibration", "done!" ], - "ResetOKMessage": [ - "Default settings", - "restored!" - ], + "ResetOKMessage": "Reset OK", "SettingsResetMessage": [ "Certain settings", "changed!"