From 4a26abd2c143c4db6d50c0e66da89446f95844fe Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Jan 2025 06:21:00 +0200 Subject: [PATCH 01/45] Update translation_UK.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unified statement to one type of translation ("Sleep mode" instead of "Waiting mode") Corrected "blink" translation Shortened phrases for statements ("t° у сек"/"градусів на секунду"; "сек"/"секунд","секунди"; "Хв"/"Хвилин","Хвилини") Traslated soldering tip type selection menu --- Translations/translation_UK.json | 76 ++++++++++++++++---------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 02fa7df9..704fb4ad 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -52,7 +52,7 @@ "message": "Жив.(B): \n" }, "SleepingAdvancedString": { - "message": "Очікування...\n" + "message": "Сон...\n" }, "SleepingTipAdvancedString": { "message": "Жало: \n" @@ -78,7 +78,7 @@ "SettingMediumChar": "С", "SettingFastChar": "М", "SettingStartSolderingChar": "П", - "SettingStartSleepChar": "О", + "SettingStartSleepChar": "С", "SettingStartSleepOffChar": "К", "SettingLockBoostChar": "Т", "SettingLockFullChar": "П" @@ -116,13 +116,13 @@ "displayText": "Безпечний\nРежим" }, "TipTypeAuto": { - "displayText": "Auto\nSense" + "displayText": "Авто\nВизначення" }, "TipTypeT12Long": { - "displayText": "TS100\nLong" + "displayText": "TS100\nДовге" }, "TipTypeT12Short": { - "displayText": "Pine\nShort" + "displayText": "Pine\nКоротке" }, "TipTypeT12PTS": { "displayText": "PTS\n200" @@ -145,31 +145,31 @@ }, "QCMaxVoltage": { "displayText": "Потужність\nдж. живлення", - "description": "Потужність джерела живлення в Ватах" + "description": "Потужність ДЖ в Ватах" }, "PDNegTimeout": { - "displayText": "PD\nзатримка", - "description": "Затримка у 100мс інкрементах для PD для сумісності з деякими QC зарядними пристроями (0: вимкнено)" + "displayText": "PD\nЗатримка", + "description": "Затримка у 100мс інкрементах для PD для сумісності з деякими версіями QC (0: вимкнена)" }, "USBPDMode": { - "displayText": "PD\nMode", + "displayText": "PD\nРежим", "description": "Вмикає режими PPS & EPR." }, "BoostTemperature": { "displayText": "Темпер.\nТурбо", - "description": "Температура в \"Турбо\" режимі" + "description": "Температура \"Турбо\" режиму" }, "AutoStart": { "displayText": "Гарячий\nстарт", - "description": "Режим в якому запускається паяльник при ввімкненні (П=Пайка | О=Очікування | К=Очікування при кімн. темп.)" + "description": "Режим запуску паяльника (П=Пайка | С=Сон | К=Сон при кімн. темп.)" }, "TempChangeShortStep": { "displayText": "Зміна темп.\nкоротко?", - "description": "Змінювати температуру при короткому натисканні!" + "description": "Зміна температуру при короткому натисканні!" }, "TempChangeLongStep": { "displayText": "Зміна темп.\nдовго?", - "description": "Змінювати температуру при довгому натисканні!" + "description": "Зміна температуру при довгому натисканні!" }, "LockingMode": { "displayText": "Дозволити\nблок. кнопок", @@ -185,15 +185,15 @@ }, "ProfilePreheatSpeed": { "displayText": "Швидкість\nПоп.Розігріву", - "description": "Розігрівати з такою швидкістю (градусів в секунду)" + "description": "Розігрівати з швидкістю (t° у сек)" }, "ProfilePhase1Temp": { "displayText": "Етап 1\nТемпература", - "description": "Температура в кінці цього етапу" + "description": "Температура на кінці цього етапу" }, "ProfilePhase1Duration": { "displayText": "Етап 1\nТривалість", - "description": "Тривалість цього етапу (секунд)" + "description": "Тривалість цього етапу (сек)" }, "ProfilePhase2Temp": { "displayText": "Етап 2\nТемпература", @@ -229,43 +229,43 @@ }, "ProfileCooldownSpeed": { "displayText": "Швидкість\nОхолодження", - "description": "Швидкість охолодження в кінці режиму профілів (градусів в секунду)" + "description": "Швидкість охолодження на кінці режиму профілів (t° у сек)" }, "MotionSensitivity": { - "displayText": "Чутливість\nсенсору руху", - "description": "Акселерометр (1=мін. чутливості | ... | 9=макс. чутливості)" + "displayText": "Чутливість\nдатчику руху", + "description": "Акселерометр (1=мін. чутливості | ... | 9=макс. чутливість)" }, "SleepTemperature": { "displayText": "Темпер.\nсну", - "description": "Температура режиму очікування (C° | F°)" + "description": "Температура режиму сну (C° | F°)" }, "SleepTimeout": { "displayText": "Тайм-аут\nсну", - "description": "Час до переходу в режим очікування (Хвилини | Секунди)" + "description": "Час до переходу до сну (Хв | Сек)" }, "ShutdownTimeout": { "displayText": "Часу до\nвимкнення", - "description": "Час до вимкнення (Хвилини)" + "description": "Час до вимкнення (Хв)" }, "HallEffSensitivity": { - "displayText": "Чутливість\nЕфекту Холла", - "description": "Чутливість датчика ефекту Холла при виявленні сну (1=мін. чутливості | ... | 9=макс. чутливості)" + "displayText": "Чутливість\nДатчику Холла", + "description": "Чутливість датчика Холла при виявленні сну (1=мін. чутливість | ... | 9=макс. чутливість)" }, "HallEffSleepTimeout": { - "displayText": "Сенсор Холла\nЧас очікування", - "description": "Проміжок часу до \"часу очікування\" за умови спрацювання датчику ефекту Холла" + "displayText": "Датчик Холла\nЧас сну", + "description": "Проміжок часу до \"часу сну\" за умови спрацювання датчику Холла" }, "TemperatureUnit": { "displayText": "Формат темпе-\nратури(C°/F°)", "description": "Одиниця виміру температури (C=Цельсій | F=Фаренгейт)" }, "DisplayRotation": { - "displayText": "Автоповорот\nекрану", - "description": "Орієнтація дисплея (П=Правша | Л=Лівша | A=Автоповорот)" + "displayText": "Обертання\nекрану", + "description": "Орієнтація екрану (П=Правша | Л=Лівша | A=Автооберт.)" }, "CooldownBlink": { "displayText": "Показ t° при\nохолодженні", - "description": "Показувати температуру на екрані охолодження, поки жало залишається гарячим, при цьому екран моргає" + "description": "Показувати температуру на екрані охолодження, поки жало залишається гарячим, при цьому екран мерехтить" }, "ScrollingSpeed": { "displayText": "Швидкість\nтексту", @@ -277,11 +277,11 @@ }, "AnimSpeed": { "displayText": "Швидкість\nанімації", - "description": "Швидкість анімації іконок у головному меню (Н=Низькa | С=Середня | М=Максимальна)" + "description": "Швидкість анімації іконок у меню (Н=Низькa | С=Середня | М=Максимальна)" }, "AnimLoop": { "displayText": "Циклічна\nанімація", - "description": "Циклічна анімація іконок в головному меню" + "description": "Циклічна анімація іконок у меню" }, "Brightness": { "displayText": "Яскравість\nекрану", @@ -292,8 +292,8 @@ "description": "Інвертувати кольори на OLED екрані" }, "LOGOTime": { - "displayText": "Тривалість\nлоготипу завантаження", - "description": "Встановити тривалість показу лого при завантаженні (с=секунд)" + "displayText": "Тривалість\nлоготипу при запуску", + "description": "Поточна тривалість показу лого при запуску (сек)" }, "AdvancedIdle": { "displayText": "Детальний ре-\nжим очікуван.", @@ -309,11 +309,11 @@ }, "PowerLimit": { "displayText": "Макс.\nпотуж.", - "description": "Макс. потужність, яку може використовувати паяльник (Ват)" + "description": "Макс. потужність, яку може використовувати паяльник (Ватт)" }, "CalibrateCJC": { - "displayText": "Калібрувати КХС\nпри наступному завантаженні", - "description": "При наступному завантаження буде відкалібровано Компенсацію Холодного Спаю жала (непотрібне при різниці температур < 5°C)" + "displayText": "Калібрувати КХС\nпри наступному запуску", + "description": "При наступному запуску буде відкалібровано Компенсацію Холодного Спаю жала (непотрібне при різниці температур < 5°C)" }, "VoltageCalibration": { "displayText": "Калібрування\nнапруги", @@ -340,8 +340,8 @@ "description": "" }, "SolderingTipType": { - "displayText": "Soldering\nTip Type", - "description": "Select the tip type fitted" + "displayText": "Тип Жала", + "description": "Оберіть відповідний тип жала" } } } From 3fc762ce3bb3fad98c8295d5f93f985edd0ddb37 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Jan 2025 14:34:29 +0200 Subject: [PATCH 02/45] Update translation_UK.json Fixed padding --- Translations/translation_UK.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 704fb4ad..82b6d4b8 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -93,7 +93,7 @@ "description": "" }, "PowerSavingMenu": { - "displayText": "Режим\nсну", + "displayText": "Режим сну\n", "description": "" }, "UIMenu": { @@ -164,11 +164,11 @@ "description": "Режим запуску паяльника (П=Пайка | С=Сон | К=Сон при кімн. темп.)" }, "TempChangeShortStep": { - "displayText": "Зміна темп.\nкоротко?", + "displayText": "Зміна темп.\nкоротким", "description": "Зміна температуру при короткому натисканні!" }, "TempChangeLongStep": { - "displayText": "Зміна темп.\nдовго?", + "displayText": "Зміна темп.\nдовгим", "description": "Зміна температуру при довгому натисканні!" }, "LockingMode": { From 8f37b4cb80866d7688ee0759056fb1157a995ba6 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Jan 2025 14:59:12 +0200 Subject: [PATCH 03/45] Update translation_UK.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spelling corrected + replaced "temperature" with "t°" in few places --- Translations/translation_UK.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 82b6d4b8..0c2a1cb4 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -164,12 +164,12 @@ "description": "Режим запуску паяльника (П=Пайка | С=Сон | К=Сон при кімн. темп.)" }, "TempChangeShortStep": { - "displayText": "Зміна темп.\nкоротким", - "description": "Зміна температуру при короткому натисканні!" + "displayText": "Зміна t°\nкоротким", + "description": "Крок t° при короткому натисканні:" }, "TempChangeLongStep": { - "displayText": "Зміна темп.\nдовгим", - "description": "Зміна температуру при довгому натисканні!" + "displayText": "Зміна t°\nдовгим", + "description": "Крок t° при довгому натисканні:" }, "LockingMode": { "displayText": "Дозволити\nблок. кнопок", @@ -181,7 +181,7 @@ }, "ProfilePreheatTemp": { "displayText": "Температура\nПоп.Розігріву", - "description": "Попередньо розігріти до цієї температури на початку режимку профілів" + "description": "Попередньо розігріти до цієї t° на початку режимку профілів" }, "ProfilePreheatSpeed": { "displayText": "Швидкість\nПоп.Розігріву", @@ -189,7 +189,7 @@ }, "ProfilePhase1Temp": { "displayText": "Етап 1\nТемпература", - "description": "Температура на кінці цього етапу" + "description": "t° на кінці цього етапу" }, "ProfilePhase1Duration": { "displayText": "Етап 1\nТривалість", @@ -233,7 +233,7 @@ }, "MotionSensitivity": { "displayText": "Чутливість\nдатчику руху", - "description": "Акселерометр (1=мін. чутливості | ... | 9=макс. чутливість)" + "description": "Акселерометр (1=мін. чутливість | ... | 9=макс. чутливість)" }, "SleepTemperature": { "displayText": "Темпер.\nсну", @@ -253,7 +253,7 @@ }, "HallEffSleepTimeout": { "displayText": "Датчик Холла\nЧас сну", - "description": "Проміжок часу до \"часу сну\" за умови спрацювання датчику Холла" + "description": "Проміжок до \"тайм-ауту сну\" за умови спрацювання датчику Холла" }, "TemperatureUnit": { "displayText": "Формат темпе-\nратури(C°/F°)", @@ -265,7 +265,7 @@ }, "CooldownBlink": { "displayText": "Показ t° при\nохолодженні", - "description": "Показувати температуру на екрані охолодження, поки жало залишається гарячим, при цьому екран мерехтить" + "description": "Показувати температуру на екрані охолодження, доки жало залишається гарячим, при цьому екран мерехтить" }, "ScrollingSpeed": { "displayText": "Швидкість\nтексту", From c229cec87f1d3f081dc4bcec5f4b36c4c307e7ca Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 26 Jan 2025 02:35:40 +0200 Subject: [PATCH 04/45] Update translation_UK.json Unified a few more sentences to be suitable for a context Fixed text size to better fit TS101/TS100 --- Translations/translation_UK.json | 52 +++++++++++++++++--------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 0c2a1cb4..0c44e861 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -34,7 +34,7 @@ "message": "!Жало закорочено!" }, "SettingsCalibrationWarning": { - "message": "Під час наступного завантаження переконайтеся, що жало і ручка мають кімнатну температуру!" + "message": "Під час наступного завантаження переконайтеся, що жало і ручка мають кімнатну t°!" }, "CJCCalibrating": { "message": "калібрування\n" @@ -153,11 +153,11 @@ }, "USBPDMode": { "displayText": "PD\nРежим", - "description": "Вмикає режими PPS & EPR." + "description": "Вмикає режими PPS & EPR" }, "BoostTemperature": { "displayText": "Темпер.\nТурбо", - "description": "Температура \"Турбо\" режиму" + "description": "t° у \"Турбо\" режимі" }, "AutoStart": { "displayText": "Гарячий\nстарт", @@ -180,7 +180,7 @@ "description": "Кількість етапів в режимі профілів" }, "ProfilePreheatTemp": { - "displayText": "Температура\nПоп.Розігріву", + "displayText": "t° Поперед.\nРозігріву", "description": "Попередньо розігріти до цієї t° на початку режимку профілів" }, "ProfilePreheatSpeed": { @@ -237,7 +237,7 @@ }, "SleepTemperature": { "displayText": "Темпер.\nсну", - "description": "Температура режиму сну (C° | F°)" + "description": "t° у режимі сну (C° | F°)" }, "SleepTimeout": { "displayText": "Тайм-аут\nсну", @@ -256,8 +256,8 @@ "description": "Проміжок до \"тайм-ауту сну\" за умови спрацювання датчику Холла" }, "TemperatureUnit": { - "displayText": "Формат темпе-\nратури(C°/F°)", - "description": "Одиниця виміру температури (C=Цельсій | F=Фаренгейт)" + "displayText": "Формат темпе-\nратури(°C/°F)", + "description": "Одиниця виміру t° (C=Цельсій | F=Фаренгейт)" }, "DisplayRotation": { "displayText": "Обертання\nекрану", @@ -265,15 +265,19 @@ }, "CooldownBlink": { "displayText": "Показ t° при\nохолодженні", - "description": "Показувати температуру на екрані охолодження, доки жало залишається гарячим, при цьому екран мерехтить" + "description": "Показувати t° на екрані охолодження, доки жало залишається гарячим, при цьому екран мерехтить" }, "ScrollingSpeed": { "displayText": "Швидкість\nтексту", "description": "Швидкість прокрутки тексту (Н=Низькa | М=Максимальна)" }, "ReverseButtonTempChange": { - "displayText": "Інвертувати\nкнопки +-?", - "description": "Інвертувати кнопки зміни температури." + "displayText": "Обернути\nкнопки +-?", + "description": "Обернути кнопки зміни t°" + }, + "ReverseButtonNav": { + "displayText": "Обернути\nкнопки AB?", + "description": "Обернути кнопки навігації" }, "AnimSpeed": { "displayText": "Швидкість\nанімації", @@ -288,20 +292,20 @@ "description": "Налаштування контрасту/яскравості OLED екрану" }, "ColourInversion": { - "displayText": "Інверт\nекрану", - "description": "Інвертувати кольори на OLED екрані" + "displayText": "Обернути\nкольори", + "description": "Обернути кольори на OLED екрані" }, "LOGOTime": { - "displayText": "Тривалість\nлоготипу при запуску", - "description": "Поточна тривалість показу лого при запуску (сек)" + "displayText": "Тривалість\nекр лого", + "description": "Поточна тривалість лого при запуску (сек)" }, "AdvancedIdle": { - "displayText": "Детальний ре-\nжим очікуван.", - "description": "Показувати детальну інформацію маленьким шрифтом на домашньому екрані" + "displayText": "Детальний\nрежим сну", + "description": "Показувати детальну інформацію дрібним шрифтом на домашньому екрані" }, "AdvancedSoldering": { "displayText": "Детальний\nрежим пайки", - "description": "Показувати детальну інформацію при пайці." + "description": "Показувати детальну інформацію при пайці" }, "BluetoothLE": { "displayText": "Bluetooth\n", @@ -309,19 +313,19 @@ }, "PowerLimit": { "displayText": "Макс.\nпотуж.", - "description": "Макс. потужність, яку може використовувати паяльник (Ватт)" + "description": "Макс. потужність живлення паяльника (Ватт)" }, "CalibrateCJC": { - "displayText": "Калібрувати КХС\nпри наступному запуску", - "description": "При наступному запуску буде відкалібровано Компенсацію Холодного Спаю жала (непотрібне при різниці температур < 5°C)" + "displayText": "Калібрація КХС\n", + "description": "При наступному запуску буде відкалібровано Компенсацію Холодного Спаю жала (непотрібне при Δt° < 5°C)" }, "VoltageCalibration": { "displayText": "Калібрування\nнапруги", - "description": "Калібрування напруги входу. Налаштувати кнопками, натиснути і утримати щоб завершити." + "description": "Калібрування напруги входу. Налаштувати кнопками, натиснути і утримати щоб завершити" }, "PowerPulsePower": { "displayText": "Пульс.\nНавантаж.", - "description": "Деякі PowerBank-и з часом вимк. живлення, якщо пристрій споживає дуже мало енергії)" + "description": "Деякі PowerBank-и з часом вимк. живлення, якщо пристрій споживає замало енергії)" }, "PowerPulseWait": { "displayText": "Час між імп.\nнапруги", @@ -333,14 +337,14 @@ }, "SettingsReset": { "displayText": "Скинути всі\nналаштування?", - "description": "Скидання всіх параметрів до стандартних значень." + "description": "Скидання всіх параметрів до стандартних значень" }, "LanguageSwitch": { "displayText": "Мова:\n UK Українська", "description": "" }, "SolderingTipType": { - "displayText": "Тип Жала", + "displayText": "Тип\nЖала", "description": "Оберіть відповідний тип жала" } } From 1fb84d5f50553b70df3586acee9f13caf8fca629 Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 26 Jan 2025 05:03:46 +0200 Subject: [PATCH 05/45] Implemented switching A and B buttons, closing #2034 getButtonState() now have an option int/bool argument to swap the result via XOR --- Translations/translation_BE.json | 6 +- Translations/translation_BG.json | 4 ++ Translations/translation_CS.json | 4 ++ Translations/translation_DA.json | 4 ++ Translations/translation_DE.json | 4 ++ Translations/translation_EL.json | 4 ++ Translations/translation_EN.json | 6 +- Translations/translation_ES.json | 4 ++ Translations/translation_ET.json | 4 ++ Translations/translation_FI.json | 4 ++ Translations/translation_FR.json | 6 +- Translations/translation_HR.json | 4 ++ Translations/translation_HU.json | 4 ++ Translations/translation_IT.json | 6 +- Translations/translation_JA_JP.json | 4 ++ Translations/translation_LT.json | 4 ++ Translations/translation_NB.json | 4 ++ Translations/translation_NL.json | 4 ++ Translations/translation_NL_BE.json | 4 ++ Translations/translation_PL.json | 6 +- Translations/translation_PT.json | 6 +- Translations/translation_RO.json | 6 +- Translations/translation_RU.json | 4 ++ Translations/translation_SK.json | 4 ++ Translations/translation_SL.json | 4 ++ Translations/translation_SR_CYRL.json | 4 ++ Translations/translation_SR_LATN.json | 4 ++ Translations/translation_SV.json | 4 ++ Translations/translation_TR.json | 4 ++ Translations/translation_UK.json | 8 ++- Translations/translation_UZ.json | 4 ++ Translations/translation_VI.json | 4 ++ Translations/translation_YUE_HK.json | 4 ++ Translations/translation_ZH_CN.json | 4 ++ Translations/translation_ZH_TW.json | 4 ++ Translations/translations_definitions.json | 6 ++ source/Core/BSP/MHP30/configuration.h | 3 +- source/Core/BSP/Miniware/configuration.h | 3 +- source/Core/BSP/Pinecil/configuration.h | 3 +- source/Core/BSP/Pinecilv2/configuration.h | 3 +- source/Core/BSP/Sequre/configuration.h | 3 +- source/Core/Drivers/Buttons.cpp | 6 +- source/Core/Drivers/Buttons.hpp | 2 +- source/Core/Inc/Settings.h | 61 ++++++++++--------- source/Core/Inc/Translation.h | 1 + source/Core/Src/Settings.cpp | 2 + source/Core/Src/settingsGUI.cpp | 8 ++- source/Core/Threads/GUIThread.cpp | 2 +- .../Threads/UI/logic/TemperatureAdjust.cpp | 2 +- .../UI/logic/utils/shouldDeviceShutdown.cpp | 2 +- 50 files changed, 212 insertions(+), 53 deletions(-) diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index 42b16c02..c71bdff0 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -272,8 +272,12 @@ "description": "Хуткасць гартання тэксту (М=марудна | Х=хутка)" }, "ReverseButtonTempChange": { - "displayText": "Інвертаваць\nкнопкі", + "displayText": "Інвертаваць\nкнопкі +/-", "description": "Інвертаваць кнопкі вымярэння тэмпературы" + }, + "ReverseButtonNav": { + "displayText": "Інвертаваць\nкнопкі A/B", + "description": "Інвертаваць кнопкі навігацыі ў меню" }, "AnimSpeed": { "displayText": "Хуткасць\nанімацыі", diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json index bfe61bc6..6ceac453 100644 --- a/Translations/translation_BG.json +++ b/Translations/translation_BG.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Размяна\nбутони +/-", "description": "Обръщане на бутоните + и - за промяна на температурата на човка на поялника" + }, + "ReverseButtonNav": { + "displayText": "Размяна\nбутони А/В", + "description": "Обръщане бутоните А и В за навигация в менютата" }, "AnimSpeed": { "displayText": "Скорост на\nанимацията", diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index a6ea50e5..ea9975ed 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Prohodit\ntl. +-?", "description": "Prohodit tlačítka pro změnu teploty" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nrychlost", diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json index c80e7c6f..2ac79681 100644 --- a/Translations/translation_DA.json +++ b/Translations/translation_DA.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Skift\n+ - tasterne", "description": "Skift tildeling af knapper til temperaturjustering" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nHastighed", diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index 0208a848..78974c23 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "+- Tasten\numkehren", "description": "Tastenbelegung zur Temperaturänderung umkehren" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nGeschw.", diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json index 8a8a99ea..5406de61 100644 --- a/Translations/translation_EL.json +++ b/Translations/translation_EL.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Αντιστροφή\nπλήκτρων + -", "description": "Αντιστροφή διάταξης πλήκτρων στη ρύθμιση θερμοκρασίας" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Ταχύτητα\nκιν. εικονιδ.", diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index 9ef29e1e..0bbf00be 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -272,8 +272,12 @@ "description": "Scrolling speed of info text (S=slow | F=fast)" }, "ReverseButtonTempChange": { - "displayText": "Swap\n+ - keys", + "displayText": "Swap\n+/- keys", "description": "Reverse assignment of buttons for temperature adjustment" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json index 76d8fd4d..1ec5c8c1 100644 --- a/Translations/translation_ES.json +++ b/Translations/translation_ES.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Invertir\nbotones +/-", "description": "Invertir botones de ajuste de temperatura" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nvelocidad", diff --git a/Translations/translation_ET.json b/Translations/translation_ET.json index 75dcccf3..49ca8520 100644 --- a/Translations/translation_ET.json +++ b/Translations/translation_ET.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Vaheta\n+ - nupud", "description": "Temperatuurinuppude asukohtade vahetus" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nkiirus", diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json index b9c04ead..b1b59b31 100644 --- a/Translations/translation_FI.json +++ b/Translations/translation_FI.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Suunnanvaihto\n+ - näppäimille", "description": "Lämpötilapainikkeiden suunnan vaihtaminen" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Animaation\nnopeus", diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json index 07f404f8..da91c46c 100644 --- a/Translations/translation_FR.json +++ b/Translations/translation_FR.json @@ -272,8 +272,12 @@ "description": "Vitesse de défilement du texte (R=rapide | L=lent)" }, "ReverseButtonTempChange": { - "displayText": "Inverser les\ntouches + -", + "displayText": "Inverser les\ntouches +/-", "description": "Inverser les boutons d'ajustement de température" + }, + "ReverseButtonNav": { + "displayText": "Inverser les\ntouches A/B", + "description": "Inverser les boutons de navigation du menu" }, "AnimSpeed": { "displayText": "Vitesse\nanim. icônes", diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json index 53455e5f..3de59a75 100644 --- a/Translations/translation_HR.json +++ b/Translations/translation_HR.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Zamjena\n+ - tipki", "description": "Zamjenjuje funkciju gornje i donje tipke za podešavanje temperature" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Brzina\nanimacije", diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json index db817202..5202a316 100644 --- a/Translations/translation_HU.json +++ b/Translations/translation_HU.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "+/- gomb\nmegfordítása", "description": "Forrasztó hegy hőmérsékletállító gombok felcserélése" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Animáció\nsebessége", diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index 643a9f53..74b2cf5b 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -272,8 +272,12 @@ "description": "Imposta la velocità di scorrimento del testo [L: lenta; V: veloce]" }, "ReverseButtonTempChange": { - "displayText": "Inversione\ntasti", + "displayText": "Inversione\ntasti +/-", "description": "Inverti i tasti per aumentare o diminuire la temperatura della punta" + }, + "ReverseButtonNav": { + "displayText": "Inversione\ntasti A/B", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Velocità\nanimazioni", diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json index 58fe176b..31f71254 100644 --- a/Translations/translation_JA_JP.json +++ b/Translations/translation_JA_JP.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "キー入れ替え", "description": "温度設定時に+ボタンと-ボタンを入れ替える" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "動画の速度", diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json index 2d77dec8..0a0d941f 100644 --- a/Translations/translation_LT.json +++ b/Translations/translation_LT.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Sukeisti + -\nmygtukus?", "description": "Sukeisti + - temperatūros keitimo mygtukus vietomis" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Animacijų\ngreitis", diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json index cac1f307..92bd70b2 100644 --- a/Translations/translation_NB.json +++ b/Translations/translation_NB.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Bytt\n+ - kn.", "description": "Bytt om på knappene for å stille temperatur" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nhastighet", diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json index 7b3a68d8..814c9e6e 100644 --- a/Translations/translation_NL.json +++ b/Translations/translation_NL.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Wissel\n+ - knoppen", "description": "Wissel de knoppen voor temperatuur controle om" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nsnelheid", diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json index 989359df..22825e10 100644 --- a/Translations/translation_NL_BE.json +++ b/Translations/translation_NL_BE.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Wissel\n+ - knoppen", "description": "Wissel de knoppen voor temperatuur controle" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nsnelheid", diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json index 8e516076..a7e20a4d 100644 --- a/Translations/translation_PL.json +++ b/Translations/translation_PL.json @@ -272,8 +272,12 @@ "description": "Szybkość przewijania tekstu" }, "ReverseButtonTempChange": { - "displayText": "Zamień przyc.\n+ -", + "displayText": "Zamień przyc.\n+/-", "description": "Zamienia działanie przycisków zmiany temperatury grotu" + }, + "ReverseButtonNav": { + "displayText": "Zamień przyc.\nA/B", + "description": "Zamienia działanie przycisków nawigacyjne menu" }, "AnimSpeed": { "displayText": "Prędkosć\nanimacji", diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json index 5f4ab999..5eab3bf2 100644 --- a/Translations/translation_PT.json +++ b/Translations/translation_PT.json @@ -272,8 +272,12 @@ "description": "Velocidade a que o texto de ajuda é apresentado" }, "ReverseButtonTempChange": { - "displayText": "Trocar\nbotões + -", + "displayText": "Trocar\nbotões +/-", "description": "Inverte o funcionamento dos botões de ajuste da temperatura" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Velocidade\nde animação", diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json index 2e5105fa..ead244d5 100644 --- a/Translations/translation_RO.json +++ b/Translations/translation_RO.json @@ -272,8 +272,12 @@ "description": "Viteză derulare text cu informatii la (S=lent | F=rapid)" }, "ReverseButtonTempChange": { - "displayText": "Inversare\n+ - butoane", + "displayText": "Inversare\n+/- butoane", "description": "Inversarea butoanelor de reglare a temperaturii" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Animaţii\nviteză", diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index 81dac2ef..1a56c649 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Поменять\nкнопки +/-", "description": "Поменять кнопки изменения температуры" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Скорость\nанимации", diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json index 476b8288..9f8cbb30 100644 --- a/Translations/translation_SK.json +++ b/Translations/translation_SK.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Otočenie\ntlačidiel +/-", "description": "Prehodenie tlačidiel na nastavovanie teploty" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Rýchlosť\nanimácií", diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json index 358f9117..d2b6886c 100644 --- a/Translations/translation_SL.json +++ b/Translations/translation_SL.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Obrni\ntipki + -?", "description": "Zamenjaj funkciji gumbov." + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json index 70ddae54..caf5dc59 100644 --- a/Translations/translation_SR_CYRL.json +++ b/Translations/translation_SR_CYRL.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Swap\n+ - keys", "description": "Reverse assignment of buttons for temperature adjustment" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json index eaa70d80..41759008 100644 --- a/Translations/translation_SR_LATN.json +++ b/Translations/translation_SR_LATN.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Swap\n+ - keys", "description": "Reverse assignment of buttons for temperature adjustment" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json index 3cdaf691..0ee5dc31 100644 --- a/Translations/translation_SV.json +++ b/Translations/translation_SV.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Omvända\n+- knappar", "description": "Omvänd ordning för temperaturjustering via plus/minus knapparna" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.-\nhastighet", diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json index 539ffa44..5e5a62fe 100644 --- a/Translations/translation_TR.json +++ b/Translations/translation_TR.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Düğme Yerleri\nRotasyonu", "description": "\"Düğme Yerleri Rotasyonu\" Sıcaklık ayar düğmelerinin yerini değiştirin" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Animasyon\nHızı", diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 0c44e861..819b76d1 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -97,7 +97,7 @@ "description": "" }, "UIMenu": { - "displayText": "Параметри\nінтерфейсу", + "displayText": "Параметри\nвзаємодії", "description": "" }, "AdvancedMenu": { @@ -276,7 +276,11 @@ "description": "Обернути кнопки зміни t°" }, "ReverseButtonNav": { - "displayText": "Обернути\nкнопки AB?", + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" + }, + "ReverseButtonNav": { + "displayText": "Обернути\nкнопки A B?", "description": "Обернути кнопки навігації" }, "AnimSpeed": { diff --git a/Translations/translation_UZ.json b/Translations/translation_UZ.json index 97f8b9d6..f921c550 100644 --- a/Translations/translation_UZ.json +++ b/Translations/translation_UZ.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "(+) va (-) tugmalarni\nalmashtirish", "description": "Harorat o'zgarishi uchun tugmachalarni vazifasini almashish" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Anim.\ntezligi", diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json index dae1a653..471bf4c7 100644 --- a/Translations/translation_VI.json +++ b/Translations/translation_VI.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "Đao nguoc\nnút + -", "description": "Đao nguoc chuc năng các nút đieu chinh nhiet đo" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "Toc đo\nhoat anh", diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json index e7737b2b..86d96a05 100644 --- a/Translations/translation_YUE_HK.json +++ b/Translations/translation_YUE_HK.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "反轉加減掣", "description": "反轉調校温度時加減掣嘅方向" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "動畫速度", diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 68561281..0638dfab 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "调换加减键", "description": "调校温度时更换加减键的方向" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "动画速度", diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json index 22218051..bc91711a 100644 --- a/Translations/translation_ZH_TW.json +++ b/Translations/translation_ZH_TW.json @@ -274,6 +274,10 @@ "ReverseButtonTempChange": { "displayText": "調換加減鍵", "description": "調校溫度時調換加減鍵的方向" + }, + "ReverseButtonNav": { + "displayText": "Swap\nA/B keys", + "description": "Reverse assignment of buttons for menu navigation" }, "AnimSpeed": { "displayText": "動畫速度", diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index e473ca34..ebf4f6c3 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -472,6 +472,12 @@ "maxLen": 6, "maxLen2": 15, "description": "Swaps which button increments and decrements on temperature change screens." + }, + { + "id": "ReverseButtonNav", + "maxLen": 6, + "maxLen2": 15, + "description": "Swaps which button are used as Select and which as Scroll/Go-back on menu screens." }, { "id": "AnimSpeed", diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h index 8698a857..0d7369ff 100644 --- a/source/Core/BSP/MHP30/configuration.h +++ b/source/Core/BSP/MHP30/configuration.h @@ -57,7 +57,8 @@ */ #define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right #define MAX_ORIENTATION_MODE 1 // Unlikely to ever change -#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change +#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index 6aebed15..4015a48b 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -57,7 +57,8 @@ */ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto -#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change +#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Pinecil/configuration.h b/source/Core/BSP/Pinecil/configuration.h index bef59a93..f0cca67a 100644 --- a/source/Core/BSP/Pinecil/configuration.h +++ b/source/Core/BSP/Pinecil/configuration.h @@ -57,7 +57,8 @@ */ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto -#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change +#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 0f21f138..e789e1e9 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -57,7 +57,8 @@ */ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto -#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change +#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Sequre/configuration.h b/source/Core/BSP/Sequre/configuration.h index df06f68e..a6de0847 100644 --- a/source/Core/BSP/Sequre/configuration.h +++ b/source/Core/BSP/Sequre/configuration.h @@ -66,7 +66,8 @@ */ #define ORIENTATION_MODE 0 // 0: Right 1:Left (2:Automatic N/A) #define MAX_ORIENTATION_MODE 1 // Disable auto mode -#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change +#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * Temp change settings diff --git a/source/Core/Drivers/Buttons.cpp b/source/Core/Drivers/Buttons.cpp index 82637427..8e08d47f 100644 --- a/source/Core/Drivers/Buttons.cpp +++ b/source/Core/Drivers/Buttons.cpp @@ -11,7 +11,7 @@ #include TickType_t lastButtonTime = 0; -ButtonState getButtonState() { +ButtonState getButtonState(bool revert) { /* * Read in the buttons and then determine if a state change needs to occur */ @@ -28,8 +28,8 @@ ButtonState getButtonState() { static TickType_t previousStateChange = 0; const TickType_t timeout = TICKS_100MS * 4; uint8_t currentState; - currentState = (getButtonA()) << 0; - currentState |= (getButtonB()) << 1; + currentState = (getButtonA()) << (0 xor revert); + currentState |= (getButtonB()) << (1 xor revert); if (currentState) { lastButtonTime = xTaskGetTickCount(); diff --git a/source/Core/Drivers/Buttons.hpp b/source/Core/Drivers/Buttons.hpp index 2e421118..e85d7112 100644 --- a/source/Core/Drivers/Buttons.hpp +++ b/source/Core/Drivers/Buttons.hpp @@ -27,7 +27,7 @@ enum ButtonState { }; // Returns what buttons are pressed (if any) -ButtonState getButtonState(); +ButtonState getButtonState(bool revert=0); // Helpers void waitForButtonPressOrTimeout(TickType_t timeout); void waitForButtonPress(); diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index fd41e271..2366b772 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -47,37 +47,38 @@ enum SettingsOptions { CalibrationOffset = 23, // This stores the temperature offset for this tip in the iron. PowerLimit = 24, // Maximum power iron allowed to output ReverseButtonTempChangeEnabled = 25, // Change the plus and minus button assigment - TempChangeLongStep = 26, // Temperature-change-increment on long button press - TempChangeShortStep = 27, // Temperature-change-increment on short button press - HallEffectSensitivity = 28, // Operating mode of the hall effect sensor - AccelMissingWarningCounter = 29, // Counter of how many times we have warned we cannot detect the accelerometer - PDMissingWarningCounter = 30, // Counter of how many times we have warned we cannot detect the pd interface - UILanguage = 31, // Selected UI Language code, null-terminated *only if* the length is less than 8 chars - PDNegTimeout = 32, // PD timeout in 100ms steps - OLEDInversion = 33, // Invert the colours on the display - OLEDBrightness = 34, // Brightness for the OLED display - LOGOTime = 35, // Duration the logo will be displayed for - CalibrateCJC = 36, // Toggle calibrate CJC at next boot - BluetoothLE = 37, // Toggle BLE if present - USBPDMode = 38, // Toggle PPS & EPR - ProfilePhases = 39, // Number of profile mode phases - ProfilePreheatTemp = 40, // Temperature to preheat to before the first phase - ProfilePreheatSpeed = 41, // Maximum allowed preheat speed in degrees per second - ProfilePhase1Temp = 42, // Temperature to target for the end of phase 1 - ProfilePhase1Duration = 43, // Target duration for phase 1 - ProfilePhase2Temp = 44, // Temperature to target for the end of phase 2 - ProfilePhase2Duration = 45, // Target duration for phase 2 - ProfilePhase3Temp = 46, // Temperature to target for the end of phase 3 - ProfilePhase3Duration = 47, // Target duration for phase 3 - ProfilePhase4Temp = 48, // Temperature to target for the end of phase 4 - ProfilePhase4Duration = 49, // Target duration for phase 4 - ProfilePhase5Temp = 50, // Temperature to target for the end of phase 5 - ProfilePhase5Duration = 51, // Target duration for phase 5 - ProfileCooldownSpeed = 52, // Maximum allowed cooldown speed in degrees per second - HallEffectSleepTime = 53, // Seconds (/5) timeout to sleep when hall effect over threshold - SolderingTipType = 54, // Selecting the type of soldering tip fitted + ReverseButtonNavEnabled = 26, // Change the A and B button assigment in menus + TempChangeLongStep = 27, // Temperature-change-increment on long button press + TempChangeShortStep = 28, // Temperature-change-increment on short button press + HallEffectSensitivity = 29, // Operating mode of the hall effect sensor + AccelMissingWarningCounter = 30, // Counter of how many times we have warned we cannot detect the accelerometer + PDMissingWarningCounter = 31, // Counter of how many times we have warned we cannot detect the pd interface + UILanguage = 32, // Selected UI Language code, null-terminated *only if* the length is less than 8 chars + PDNegTimeout = 33, // PD timeout in 100ms steps + OLEDInversion = 34, // Invert the colours on the display + OLEDBrightness = 35, // Brightness for the OLED display + LOGOTime = 36, // Duration the logo will be displayed for + CalibrateCJC = 37, // Toggle calibrate CJC at next boot + BluetoothLE = 38, // Toggle BLE if present + USBPDMode = 39, // Toggle PPS & EPR + ProfilePhases = 40, // Number of profile mode phases + ProfilePreheatTemp = 41, // Temperature to preheat to before the first phase + ProfilePreheatSpeed = 42, // Maximum allowed preheat speed in degrees per second + ProfilePhase1Temp = 43, // Temperature to target for the end of phase 1 + ProfilePhase1Duration = 44, // Target duration for phase 1 + ProfilePhase2Temp = 45, // Temperature to target for the end of phase 2 + ProfilePhase2Duration = 46, // Target duration for phase 2 + ProfilePhase3Temp = 47, // Temperature to target for the end of phase 3 + ProfilePhase3Duration = 48, // Target duration for phase 3 + ProfilePhase4Temp = 49, // Temperature to target for the end of phase 4 + ProfilePhase4Duration = 50, // Target duration for phase 4 + ProfilePhase5Temp = 51, // Temperature to target for the end of phase 5 + ProfilePhase5Duration = 52, // Target duration for phase 5 + ProfileCooldownSpeed = 53, // Maximum allowed cooldown speed in degrees per second + HallEffectSleepTime = 54, // Seconds (/5) timeout to sleep when hall effect over threshold + SolderingTipType = 55, // Selecting the type of soldering tip fitted // - SettingsOptionsLength = 55, // End marker + SettingsOptionsLength = 56, // End marker }; typedef enum { diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index c8ad9019..bc95bbed 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -90,6 +90,7 @@ enum class SettingsItemIndex : uint8_t { CooldownBlink, ScrollingSpeed, ReverseButtonTempChange, + ReverseButtonNav, AnimSpeed, AnimLoop, Brightness, diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 28198f78..3fb62022 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -81,6 +81,8 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp {MIN_CALIBRATION_OFFSET, 2500, 1, CALIBRATION_OFFSET}, // CalibrationOffset { 0, MAX_POWER_LIMIT, POWER_LIMIT_STEPS, POWER_LIMIT}, // PowerLimit { 0, 1, 1, REVERSE_BUTTON_TEMP_CHANGE}, // ReverseButtonTempChangeEnabled + { 0, 1, 1, + REVERSE_BUTTON_NAV}, // ReverseButtonNavEnabled { 5, TEMP_CHANGE_LONG_STEP_MAX, 5, TEMP_CHANGE_LONG_STEP}, // TempChangeLongStep { 1, TEMP_CHANGE_SHORT_STEP_MAX, 1, TEMP_CHANGE_SHORT_STEP}, // TempChangeShortStep { 0, 9, 1, 7}, // HallEffectSensitivity diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index d26b26bb..0a30f9b6 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -47,6 +47,7 @@ static void displayAdvancedSolderingScreens(void); static void displayAdvancedIDLEScreens(void); static void displayScrollSpeed(void); static void displayReverseButtonTempChangeEnabled(void); +static void displayReverseButtonNavEnabled(void); static void displayPowerLimit(void); #ifdef BLE_ENABLED @@ -395,6 +396,8 @@ const menuitem UIMenu[] = { {SETTINGS_DESC(SettingsItemIndex::ScrollingSpeed), nullptr, displayScrollSpeed, nullptr, SettingsOptions::DescriptionScrollSpeed, SettingsItemIndex::ScrollingSpeed, 7}, /* Reverse Temp change buttons +/- */ {SETTINGS_DESC(SettingsItemIndex::ReverseButtonTempChange), nullptr, displayReverseButtonTempChangeEnabled, nullptr, SettingsOptions::ReverseButtonTempChangeEnabled, SettingsItemIndex::ReverseButtonTempChange, 7}, + /* Reverse menu nav buttons A/B */ + {SETTINGS_DESC(SettingsItemIndex::ReverseButtonNav), nullptr, displayReverseButtonNavEnabled, nullptr, SettingsOptions::ReverseButtonNavEnabled, SettingsItemIndex::ReverseButtonNav, 7}, /* Animation Speed adjustment */ {SETTINGS_DESC(SettingsItemIndex::AnimSpeed), nullptr, displayAnimationSpeed, nullptr, SettingsOptions::AnimationSpeed, SettingsItemIndex::AnimSpeed, 7}, /* Animation Loop switch */ @@ -480,7 +483,7 @@ static int userConfirmation(const char *message) { for (;;) { drawScrollingText(message, xTaskGetTickCount() - tickStart); - ButtonState buttons = getButtonState(); + ButtonState buttons = getButtonState(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)); switch (buttons) { case BUTTON_F_SHORT: // User confirmed @@ -856,6 +859,7 @@ static void displayCoolingBlinkEnabled(void) { OLED::drawCheckbox(getSettingValu static void displayScrollSpeed(void) { OLED::print(translatedString((getSettingValue(SettingsOptions::DescriptionScrollSpeed)) ? Tr->SettingFastChar : Tr->SettingSlowChar), FontStyle::LARGE); } static void displayReverseButtonTempChangeEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)); } +static void displayReverseButtonNavEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)); } static void displayAnimationSpeed(void) { switch (getSettingValue(SettingsOptions::AnimationSpeed)) { @@ -952,7 +956,7 @@ static void setCalibrateVIN(void) { OLED::setCursor(0, 8); OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::SMALL); - switch (getButtonState()) { + switch (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled))) { case BUTTON_F_SHORT: prevSettingValue(SettingsOptions::VoltageDiv); break; diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index e60a50ef..a6bcac80 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -44,7 +44,7 @@ OperatingMode handle_post_init_state(); OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass // Read button state - ButtonState buttons = getButtonState(); + ButtonState buttons = getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)); // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); diff --git a/source/Core/Threads/UI/logic/TemperatureAdjust.cpp b/source/Core/Threads/UI/logic/TemperatureAdjust.cpp index 34a896c3..4a8b76e3 100644 --- a/source/Core/Threads/UI/logic/TemperatureAdjust.cpp +++ b/source/Core/Threads/UI/logic/TemperatureAdjust.cpp @@ -55,7 +55,7 @@ OperatingMode gui_solderingTempAdjust(const ButtonState buttonIn, guiContext *cx (*autoRepeatAcceleration) = PRESS_ACCEL_INTERVAL_MAX - PRESS_ACCEL_INTERVAL_MIN; } // If buttons are flipped; flip the delta - if (getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)) { + if (getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) xor getSettingValue(SettingsOptions::ReverseButtonNavEnabled)) { delta = -delta; } if (delta != 0) { diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index 541a2669..d050a3ce 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -17,7 +17,7 @@ bool shouldShutdown(void) { } } } - if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long + if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)) == BUTTON_B_LONG) { // allow also if back button is pressed long return true; } return false; From c6cd6983fb01b5c6e0953f984a455bd2ccca47c9 Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 26 Jan 2025 16:38:13 +0200 Subject: [PATCH 06/45] Update code format in Settings.cpp --- source/Core/Src/Settings.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 3fb62022..64b2137b 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -81,8 +81,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp {MIN_CALIBRATION_OFFSET, 2500, 1, CALIBRATION_OFFSET}, // CalibrationOffset { 0, MAX_POWER_LIMIT, POWER_LIMIT_STEPS, POWER_LIMIT}, // PowerLimit { 0, 1, 1, REVERSE_BUTTON_TEMP_CHANGE}, // ReverseButtonTempChangeEnabled - { 0, 1, 1, - REVERSE_BUTTON_NAV}, // ReverseButtonNavEnabled + { 0, 1, 1, REVERSE_BUTTON_NAV}, // ReverseButtonNavEnabled { 5, TEMP_CHANGE_LONG_STEP_MAX, 5, TEMP_CHANGE_LONG_STEP}, // TempChangeLongStep { 1, TEMP_CHANGE_SHORT_STEP_MAX, 1, TEMP_CHANGE_SHORT_STEP}, // TempChangeShortStep { 0, 9, 1, 7}, // HallEffectSensitivity From dfce09413fee30ca2866b4ee3f19e217d2445287 Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 26 Jan 2025 16:51:44 +0200 Subject: [PATCH 07/45] Removed edits from TemperatureAdjust.cpp, so less code will have changes --- source/Core/Threads/GUIThread.cpp | 2 +- source/Core/Threads/UI/logic/TemperatureAdjust.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index a6bcac80..b83e53c1 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -44,7 +44,7 @@ OperatingMode handle_post_init_state(); OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass // Read button state - ButtonState buttons = getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)); + ButtonState buttons = getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) and !(currentOperatingMode == OperatingMode::TemperatureAdjust)); // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); diff --git a/source/Core/Threads/UI/logic/TemperatureAdjust.cpp b/source/Core/Threads/UI/logic/TemperatureAdjust.cpp index 4a8b76e3..34a896c3 100644 --- a/source/Core/Threads/UI/logic/TemperatureAdjust.cpp +++ b/source/Core/Threads/UI/logic/TemperatureAdjust.cpp @@ -55,7 +55,7 @@ OperatingMode gui_solderingTempAdjust(const ButtonState buttonIn, guiContext *cx (*autoRepeatAcceleration) = PRESS_ACCEL_INTERVAL_MAX - PRESS_ACCEL_INTERVAL_MIN; } // If buttons are flipped; flip the delta - if (getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) xor getSettingValue(SettingsOptions::ReverseButtonNavEnabled)) { + if (getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)) { delta = -delta; } if (delta != 0) { From 659fa48a05a4ca8ddb763b3c0ec6f9e1b50d4e13 Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 26 Jan 2025 18:55:55 +0200 Subject: [PATCH 08/45] Entirely moved button flipping to GUIIThread.cpp I don't know is it better or worse, functions the same --- source/Core/Threads/GUIThread.cpp | 5 ++++- source/Core/Threads/UI/logic/TemperatureAdjust.cpp | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index b83e53c1..4d343f91 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -43,8 +43,11 @@ guiContext context; // Conte OperatingMode handle_post_init_state(); OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass + bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); + bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state - ButtonState buttons = getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) and !(currentOperatingMode == OperatingMode::TemperatureAdjust)); + ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); diff --git a/source/Core/Threads/UI/logic/TemperatureAdjust.cpp b/source/Core/Threads/UI/logic/TemperatureAdjust.cpp index 34a896c3..4e179328 100644 --- a/source/Core/Threads/UI/logic/TemperatureAdjust.cpp +++ b/source/Core/Threads/UI/logic/TemperatureAdjust.cpp @@ -54,10 +54,6 @@ OperatingMode gui_solderingTempAdjust(const ButtonState buttonIn, guiContext *cx if ((PRESS_ACCEL_INTERVAL_MAX - (*autoRepeatAcceleration)) < PRESS_ACCEL_INTERVAL_MIN) { (*autoRepeatAcceleration) = PRESS_ACCEL_INTERVAL_MAX - PRESS_ACCEL_INTERVAL_MIN; } - // If buttons are flipped; flip the delta - if (getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)) { - delta = -delta; - } if (delta != 0) { // constrain between the set temp limits, i.e. 10-450 C int16_t newTemp = getSettingValue(SettingsOptions::SolderingTemp); From 031a47c36f967edefb58d88394554d49cb3679db Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 12:41:11 +0200 Subject: [PATCH 09/45] Update translation_UK.json Removed falsefully duplicated entry --- Translations/translation_UK.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 319b95aa..636c9706 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -272,15 +272,11 @@ "description": "Швидкість прокрутки тексту (Н=Низькa | М=Максимальна)" }, "ReverseButtonTempChange": { - "displayText": "Обернути\nкнопки +-?", + "displayText": "Обернути\nкнопки +/-?", "description": "Обернути кнопки зміни t°" }, "ReverseButtonNav": { - "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" - }, - "ReverseButtonNav": { - "displayText": "Обернути\nкнопки A B?", + "displayText": "Обернути\nкнопки A/B?", "description": "Обернути кнопки навігації" }, "AnimSpeed": { From 71551e6db516f2c6da1597e49a5b0590cdf883e2 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 14:32:34 +0200 Subject: [PATCH 10/45] Update draw_homescreen_simplified.cpp Rework of 96x12 drawer, in order to support swapping of setting/heating hints --- .../mono_96x16/draw_homescreen_simplified.cpp | 81 +++++++------------ 1 file changed, 31 insertions(+), 50 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 0376c131..9af9aed7 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -6,57 +6,38 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tempOnDisplay = false; - bool tipDisconnectedDisplay = false; - if (OLED::getRotation()) { - OLED::drawArea(54, 0, 42, 16, buttonAF); - OLED::drawArea(12, 0, 42, 16, buttonBF); - OLED::setCursor(0, 0); - ui_draw_power_source_icon(); - } else { - OLED::drawArea(0, 0, 42, 16, buttonA); // Needs to be flipped so button ends up - OLED::drawArea(42, 0, 42, 16, buttonB); // on right side of screen - OLED::setCursor(84, 0); - ui_draw_power_source_icon(); - } - tipDisconnectedDisplay = false; - if (tipTemp > 55) { - tempOnDisplay = true; - } else if (tipTemp < 45) { - tempOnDisplay = false; - } - if (isTipDisconnected()) { - tempOnDisplay = false; - tipDisconnectedDisplay = true; - } - if (tempOnDisplay || tipDisconnectedDisplay) { - // draw temp over the start soldering button - // Location changes on screen rotation - if (OLED::getRotation()) { - // in right handed mode we want to draw over the first part - OLED::fillArea(55, 0, 41, 16, 0); // clear the area for the temp - OLED::setCursor(56, 0); - } else { - OLED::fillArea(0, 0, 41, 16, 0); // clear the area - OLED::setCursor(0, 0); - } - // If we have a tip connected draw the temp, if not we leave it blank - if (!tipDisconnectedDisplay) { - // draw in the temp - if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp - } - } else { - // Draw in missing tip symbol + bool tipDisconnected = isTipDisconnected(); + bool displayTemp = (tipTemp > 55) && !tipDisconnected; + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - if (OLED::getRotation()) { - // in right handed mode we want to draw over the first part - OLED::drawArea(54, 0, 42, 16, disconnectedTipF); - } else { - OLED::drawArea(0, 0, 42, 16, disconnectedTip); - } - } - } + // Flip and switch buttons accordingly + OLED::drawArea(isFlipped ? 54: 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF:buttonAF) : (isReverse ? buttonB:buttonA) ); + OLED::drawArea(isFlipped ? 12:42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF:buttonBF) : (isReverse ? buttonA:buttonB) ); + + if (displayTemp || tipDisconnected) { + // draw temp over the start soldering button + // Location changes on screen rotation + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse? (isFlipped?14:42):(isFlipped?55:0), 0, 41, 16, 0); // clear the area + OLED::setCursor(isReverse? (isFlipped?15:43):(isFlipped?56:0), 0); + // If tip is connected draw the temp, otherwise - the notification + if (!tipDisconnected) { + // Draw-in the temp + if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp + } + } else { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped?12:42, 0, 42, 16, isFlipped?disconnectedTipF:disconnectedTip); + } else { + OLED::drawArea(isFlipped? 54:0, 0, 42, 16, isFlipped?disconnectedTipF:disconnectedTip); + } + } + } + OLED::setCursor(isFlipped ? 0:84, 0); + ui_draw_power_source_icon(); } #endif \ No newline at end of file From 1ed2299ce0cd74fcca321ca831418011cc6c6c0d Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 14:42:24 +0200 Subject: [PATCH 11/45] Update draw_homescreen_simplified.cpp Style corrected --- .../mono_96x16/draw_homescreen_simplified.cpp | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 9af9aed7..3ca9851c 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -12,32 +12,33 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly - OLED::drawArea(isFlipped ? 54: 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF:buttonAF) : (isReverse ? buttonB:buttonA) ); - OLED::drawArea(isFlipped ? 12:42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF:buttonBF) : (isReverse ? buttonA:buttonB) ); - - if (displayTemp || tipDisconnected) { - // draw temp over the start soldering button - // Location changes on screen rotation - // in right handed mode we want to draw over the first part - OLED::fillArea(isReverse? (isFlipped?14:42):(isFlipped?55:0), 0, 41, 16, 0); // clear the area - OLED::setCursor(isReverse? (isFlipped?15:43):(isFlipped?56:0), 0); - // If tip is connected draw the temp, otherwise - the notification - if (!tipDisconnected) { - // Draw-in the temp - if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp - } - } else { - // Draw-in the missing tip symbol - if (isReverse) { - OLED::drawArea(isFlipped?12:42, 0, 42, 16, isFlipped?disconnectedTipF:disconnectedTip); - } else { - OLED::drawArea(isFlipped? 54:0, 0, 42, 16, isFlipped?disconnectedTipF:disconnectedTip); - } - } - } - OLED::setCursor(isFlipped ? 0:84, 0); - ui_draw_power_source_icon(); + // Flip and switch buttons accordingly + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + + if (displayTemp || tipDisconnected) { + // draw temp over the start soldering button + // Location changes on screen rotation + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); + // If tip is connected draw the temp, otherwise - the notification + if (!tipDisconnected) { + // Draw-in the temp + if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp + } + } else { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } + } + } + OLED::setCursor(isFlipped ? 0 : 84, 0); + ui_draw_power_source_icon(); } #endif \ No newline at end of file From 0f60d737fc44fd0b7ca666090bff75bb4e47c4c2 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 14:44:21 +0200 Subject: [PATCH 12/45] Update draw_homescreen_simplified.cpp meh --- .../Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 3ca9851c..f1478e47 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -11,7 +11,6 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - // Flip and switch buttons accordingly // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); From 719dc6b14dd9fc72602df06dce2a4f10091ab42d Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 15:08:06 +0200 Subject: [PATCH 13/45] Update draw_homescreen_simplified.cpp meh(2) --- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index f1478e47..25c8b5ea 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -6,11 +6,10 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool displayTemp = (tipTemp > 55) && !tipDisconnected; - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - + bool tipDisconnected = isTipDisconnected(); + bool displayTemp = (tipTemp > 55) && !tipDisconnected; + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); From 5e5f8581ea47237ae73884ed0d15e1d684c9baa2 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 15:47:46 +0200 Subject: [PATCH 14/45] Update draw_homescreen_simplified.cpp Is It fOrMaTtEd EnOuGh?? --- .../mono_96x16/draw_homescreen_simplified.cpp | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 25c8b5ea..ff991863 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,33 +7,33 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool tipDisconnected = isTipDisconnected(); - bool displayTemp = (tipTemp > 55) && !tipDisconnected; bool isFlipped = OLED::getRotation(); bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - if (displayTemp || tipDisconnected) { - // draw temp over the start soldering button - // Location changes on screen rotation - // in right handed mode we want to draw over the first part - OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - // If tip is connected draw the temp, otherwise - the notification - if (!tipDisconnected) { - // Draw-in the temp - if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp - } - } else { - // Draw-in the missing tip symbol - if (isReverse) { - OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - } else { - OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - } - } + if (((tipTemp > 55) && !tipDisconnected) || tipDisconnected) { + // draw temp over the start soldering button + // Location changes on screen rotation + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); + // If tip is connected draw the temp, otherwise - the notification + if (!tipDisconnected) { + // Draw-in the temp + if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp + } + + } else { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } + } } OLED::setCursor(isFlipped ? 0 : 84, 0); ui_draw_power_source_icon(); From 24cb2214435836a5b422d7d59f737195a912fc8c Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 15:50:27 +0200 Subject: [PATCH 15/45] Update draw_homescreen_simplified.cpp Sorry --- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index ff991863..d2306c06 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -13,7 +13,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - if (((tipTemp > 55) && !tipDisconnected) || tipDisconnected) { + if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation // in right handed mode we want to draw over the first part From b4691790585882037761580e2a867a9e4841ec3c Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 16:31:45 +0200 Subject: [PATCH 16/45] Update draw_homescreen_simplified.cpp Code cleanup --- .../drawing/mono_96x16/draw_homescreen_simplified.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index d2306c06..24f0b2b4 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -20,19 +20,15 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); // If tip is connected draw the temp, otherwise - the notification - if (!tipDisconnected) { - // Draw-in the temp - if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp - } - - } else { + if (tipDisconnected) { // Draw-in the missing tip symbol if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } + } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } } OLED::setCursor(isFlipped ? 0 : 84, 0); From ce86d6594da0bdf096157303618b66e376ea372b Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2025 16:32:20 +0200 Subject: [PATCH 17/45] Update draw_homescreen_simplified (128x32) Drawer rework, should look ok but testing is required --- .../draw_homescreen_simplified.cpp | 79 +++++++------------ 1 file changed, 29 insertions(+), 50 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 3c8c1816..795f8a3b 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -7,56 +7,35 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tempOnDisplay = false; - bool tipDisconnectedDisplay = false; - if (OLED::getRotation()) { - OLED::drawArea(68, 0, 56, 32, buttonAF); - OLED::drawArea(12, 0, 56, 32, buttonBF); - OLED::setCursor(0, 0); - ui_draw_power_source_icon(); - } else { - OLED::drawArea(0, 0, 56, 32, buttonA); // Needs to be flipped so button ends up - OLED::drawArea(58, 0, 56, 32, buttonB); // on right side of screen - OLED::setCursor(116, 0); - ui_draw_power_source_icon(); - } - tipDisconnectedDisplay = false; - if (tipTemp > 55) { - tempOnDisplay = true; - } else if (tipTemp < 45) { - tempOnDisplay = false; - } - if (isTipDisconnected()) { - tempOnDisplay = false; - tipDisconnectedDisplay = true; - } - if (tempOnDisplay || tipDisconnectedDisplay) { - // draw temp over the start soldering button - // Location changes on screen rotation - if (OLED::getRotation()) { - // in right handed mode we want to draw over the first part - OLED::fillArea(68, 0, 56, 32, 0); // clear the area for the temp - OLED::setCursor(56, 0); - } else { - OLED::fillArea(0, 0, 56, 32, 0); // clear the area - OLED::setCursor(0, 0); - } - // If we have a tip connected draw the temp, if not we leave it blank - if (!tipDisconnectedDisplay) { - // draw in the temp - if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp - } - } else { - // Draw in missing tip symbol - if (OLED::getRotation()) { - // in right handed mode we want to draw over the first part - OLED::drawArea(54, 0, 56, 32, disconnectedTipF); - } else { - OLED::drawArea(0, 0, 56, 32, disconnectedTip); - } - } - } + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + // Flip and switch buttons accordingly + OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); + OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + + if ((tipTemp > 55) || tipDisconnected) { + // draw temp over the start soldering button + // Location changes on screen rotation + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); + // If tip is connected draw the temp, otherwise - the notification + if (tipDisconnected) { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + }// Draw-in the temp + + + } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + } + } + OLED::setCursor(isFlipped ? 0 : 116, 0); + ui_draw_power_source_icon(); } #endif \ No newline at end of file From 80479cc0f5a07156dee86f25c327ebffb308bb0f Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Wed, 29 Jan 2025 04:22:08 +0300 Subject: [PATCH 18/45] Translations/: replace tab by spaces for ReverseButtonNav according to code style --- Translations/translation_BE.json | 2 +- Translations/translation_BG.json | 2 +- Translations/translation_CS.json | 2 +- Translations/translation_DA.json | 2 +- Translations/translation_DE.json | 2 +- Translations/translation_EL.json | 2 +- Translations/translation_EN.json | 2 +- Translations/translation_ES.json | 2 +- Translations/translation_ET.json | 2 +- Translations/translation_FI.json | 2 +- Translations/translation_FR.json | 2 +- Translations/translation_HR.json | 2 +- Translations/translation_HU.json | 2 +- Translations/translation_IT.json | 2 +- Translations/translation_JA_JP.json | 2 +- Translations/translation_LT.json | 2 +- Translations/translation_NB.json | 2 +- Translations/translation_NL.json | 2 +- Translations/translation_NL_BE.json | 2 +- Translations/translation_PL.json | 2 +- Translations/translation_PT.json | 2 +- Translations/translation_RO.json | 2 +- Translations/translation_RU.json | 2 +- Translations/translation_SK.json | 2 +- Translations/translation_SL.json | 2 +- Translations/translation_SR_CYRL.json | 2 +- Translations/translation_SR_LATN.json | 2 +- Translations/translation_SV.json | 2 +- Translations/translation_TR.json | 2 +- Translations/translation_UK.json | 2 +- Translations/translation_UZ.json | 2 +- Translations/translation_VI.json | 2 +- Translations/translation_YUE_HK.json | 2 +- Translations/translation_ZH_CN.json | 2 +- Translations/translation_ZH_TW.json | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index c71bdff0..aae28b9f 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -275,7 +275,7 @@ "displayText": "Інвертаваць\nкнопкі +/-", "description": "Інвертаваць кнопкі вымярэння тэмпературы" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Інвертаваць\nкнопкі A/B", "description": "Інвертаваць кнопкі навігацыі ў меню" }, diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json index 6ceac453..94f86265 100644 --- a/Translations/translation_BG.json +++ b/Translations/translation_BG.json @@ -275,7 +275,7 @@ "displayText": "Размяна\nбутони +/-", "description": "Обръщане на бутоните + и - за промяна на температурата на човка на поялника" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Размяна\nбутони А/В", "description": "Обръщане бутоните А и В за навигация в менютата" }, diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index ea9975ed..8b92f8a3 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -275,7 +275,7 @@ "displayText": "Prohodit\ntl. +-?", "description": "Prohodit tlačítka pro změnu teploty" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json index 2ac79681..f027b7b8 100644 --- a/Translations/translation_DA.json +++ b/Translations/translation_DA.json @@ -275,7 +275,7 @@ "displayText": "Skift\n+ - tasterne", "description": "Skift tildeling af knapper til temperaturjustering" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index 78974c23..cee478d4 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -275,7 +275,7 @@ "displayText": "+- Tasten\numkehren", "description": "Tastenbelegung zur Temperaturänderung umkehren" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json index 5406de61..9c19ec2c 100644 --- a/Translations/translation_EL.json +++ b/Translations/translation_EL.json @@ -275,7 +275,7 @@ "displayText": "Αντιστροφή\nπλήκτρων + -", "description": "Αντιστροφή διάταξης πλήκτρων στη ρύθμιση θερμοκρασίας" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index 0bbf00be..e6431400 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -275,7 +275,7 @@ "displayText": "Swap\n+/- keys", "description": "Reverse assignment of buttons for temperature adjustment" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json index 1ec5c8c1..52b10764 100644 --- a/Translations/translation_ES.json +++ b/Translations/translation_ES.json @@ -275,7 +275,7 @@ "displayText": "Invertir\nbotones +/-", "description": "Invertir botones de ajuste de temperatura" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ET.json b/Translations/translation_ET.json index 49ca8520..df2ca51e 100644 --- a/Translations/translation_ET.json +++ b/Translations/translation_ET.json @@ -275,7 +275,7 @@ "displayText": "Vaheta\n+ - nupud", "description": "Temperatuurinuppude asukohtade vahetus" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json index b1b59b31..826736bd 100644 --- a/Translations/translation_FI.json +++ b/Translations/translation_FI.json @@ -275,7 +275,7 @@ "displayText": "Suunnanvaihto\n+ - näppäimille", "description": "Lämpötilapainikkeiden suunnan vaihtaminen" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json index da91c46c..0c492888 100644 --- a/Translations/translation_FR.json +++ b/Translations/translation_FR.json @@ -275,7 +275,7 @@ "displayText": "Inverser les\ntouches +/-", "description": "Inverser les boutons d'ajustement de température" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Inverser les\ntouches A/B", "description": "Inverser les boutons de navigation du menu" }, diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json index 3de59a75..3f1803ec 100644 --- a/Translations/translation_HR.json +++ b/Translations/translation_HR.json @@ -275,7 +275,7 @@ "displayText": "Zamjena\n+ - tipki", "description": "Zamjenjuje funkciju gornje i donje tipke za podešavanje temperature" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json index 5202a316..9f8a59a7 100644 --- a/Translations/translation_HU.json +++ b/Translations/translation_HU.json @@ -275,7 +275,7 @@ "displayText": "+/- gomb\nmegfordítása", "description": "Forrasztó hegy hőmérsékletállító gombok felcserélése" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index 74b2cf5b..f5035ed1 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -275,7 +275,7 @@ "displayText": "Inversione\ntasti +/-", "description": "Inverti i tasti per aumentare o diminuire la temperatura della punta" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Inversione\ntasti A/B", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json index 31f71254..4ab34c7e 100644 --- a/Translations/translation_JA_JP.json +++ b/Translations/translation_JA_JP.json @@ -275,7 +275,7 @@ "displayText": "キー入れ替え", "description": "温度設定時に+ボタンと-ボタンを入れ替える" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json index 0a0d941f..a799e55d 100644 --- a/Translations/translation_LT.json +++ b/Translations/translation_LT.json @@ -275,7 +275,7 @@ "displayText": "Sukeisti + -\nmygtukus?", "description": "Sukeisti + - temperatūros keitimo mygtukus vietomis" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json index 92bd70b2..b20d70a8 100644 --- a/Translations/translation_NB.json +++ b/Translations/translation_NB.json @@ -275,7 +275,7 @@ "displayText": "Bytt\n+ - kn.", "description": "Bytt om på knappene for å stille temperatur" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json index 814c9e6e..be1b8fc3 100644 --- a/Translations/translation_NL.json +++ b/Translations/translation_NL.json @@ -275,7 +275,7 @@ "displayText": "Wissel\n+ - knoppen", "description": "Wissel de knoppen voor temperatuur controle om" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json index 22825e10..b86136a0 100644 --- a/Translations/translation_NL_BE.json +++ b/Translations/translation_NL_BE.json @@ -275,7 +275,7 @@ "displayText": "Wissel\n+ - knoppen", "description": "Wissel de knoppen voor temperatuur controle" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json index a7e20a4d..499b25df 100644 --- a/Translations/translation_PL.json +++ b/Translations/translation_PL.json @@ -275,7 +275,7 @@ "displayText": "Zamień przyc.\n+/-", "description": "Zamienia działanie przycisków zmiany temperatury grotu" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Zamień przyc.\nA/B", "description": "Zamienia działanie przycisków nawigacyjne menu" }, diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json index 5eab3bf2..43b7739a 100644 --- a/Translations/translation_PT.json +++ b/Translations/translation_PT.json @@ -275,7 +275,7 @@ "displayText": "Trocar\nbotões +/-", "description": "Inverte o funcionamento dos botões de ajuste da temperatura" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json index ead244d5..54d3473b 100644 --- a/Translations/translation_RO.json +++ b/Translations/translation_RO.json @@ -275,7 +275,7 @@ "displayText": "Inversare\n+/- butoane", "description": "Inversarea butoanelor de reglare a temperaturii" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index 1a56c649..2823819a 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -275,7 +275,7 @@ "displayText": "Поменять\nкнопки +/-", "description": "Поменять кнопки изменения температуры" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json index 9f8cbb30..5f76125a 100644 --- a/Translations/translation_SK.json +++ b/Translations/translation_SK.json @@ -275,7 +275,7 @@ "displayText": "Otočenie\ntlačidiel +/-", "description": "Prehodenie tlačidiel na nastavovanie teploty" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json index d2b6886c..332edc85 100644 --- a/Translations/translation_SL.json +++ b/Translations/translation_SL.json @@ -275,7 +275,7 @@ "displayText": "Obrni\ntipki + -?", "description": "Zamenjaj funkciji gumbov." }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json index caf5dc59..c100d253 100644 --- a/Translations/translation_SR_CYRL.json +++ b/Translations/translation_SR_CYRL.json @@ -275,7 +275,7 @@ "displayText": "Swap\n+ - keys", "description": "Reverse assignment of buttons for temperature adjustment" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json index 41759008..77252466 100644 --- a/Translations/translation_SR_LATN.json +++ b/Translations/translation_SR_LATN.json @@ -275,7 +275,7 @@ "displayText": "Swap\n+ - keys", "description": "Reverse assignment of buttons for temperature adjustment" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json index 0ee5dc31..875bd77f 100644 --- a/Translations/translation_SV.json +++ b/Translations/translation_SV.json @@ -275,7 +275,7 @@ "displayText": "Omvända\n+- knappar", "description": "Omvänd ordning för temperaturjustering via plus/minus knapparna" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json index 5e5a62fe..be8345fa 100644 --- a/Translations/translation_TR.json +++ b/Translations/translation_TR.json @@ -275,7 +275,7 @@ "displayText": "Düğme Yerleri\nRotasyonu", "description": "\"Düğme Yerleri Rotasyonu\" Sıcaklık ayar düğmelerinin yerini değiştirin" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 636c9706..7939de9e 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -275,7 +275,7 @@ "displayText": "Обернути\nкнопки +/-?", "description": "Обернути кнопки зміни t°" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Обернути\nкнопки A/B?", "description": "Обернути кнопки навігації" }, diff --git a/Translations/translation_UZ.json b/Translations/translation_UZ.json index f921c550..bf74b696 100644 --- a/Translations/translation_UZ.json +++ b/Translations/translation_UZ.json @@ -275,7 +275,7 @@ "displayText": "(+) va (-) tugmalarni\nalmashtirish", "description": "Harorat o'zgarishi uchun tugmachalarni vazifasini almashish" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json index 471bf4c7..45393e13 100644 --- a/Translations/translation_VI.json +++ b/Translations/translation_VI.json @@ -275,7 +275,7 @@ "displayText": "Đao nguoc\nnút + -", "description": "Đao nguoc chuc năng các nút đieu chinh nhiet đo" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json index 86d96a05..db42d3c5 100644 --- a/Translations/translation_YUE_HK.json +++ b/Translations/translation_YUE_HK.json @@ -275,7 +275,7 @@ "displayText": "反轉加減掣", "description": "反轉調校温度時加減掣嘅方向" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 0638dfab..3cd09a3e 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -275,7 +275,7 @@ "displayText": "调换加减键", "description": "调校温度时更换加减键的方向" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json index bc91711a..10c7c082 100644 --- a/Translations/translation_ZH_TW.json +++ b/Translations/translation_ZH_TW.json @@ -275,7 +275,7 @@ "displayText": "調換加減鍵", "description": "調校溫度時調換加減鍵的方向" }, - "ReverseButtonNav": { + "ReverseButtonNav": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, From c8ef8104506995fdf77b851e71601b2060604b08 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Wed, 29 Jan 2025 04:25:38 +0300 Subject: [PATCH 19/45] translations_definitions.json: expand the description for ReverseButtonNav --- Translations/translations_definitions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index ebf4f6c3..ed0095be 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -477,7 +477,7 @@ "id": "ReverseButtonNav", "maxLen": 6, "maxLen2": 15, - "description": "Swaps which button are used as Select and which as Scroll/Go-back on menu screens." + "description": "Swaps which buttons are used as Select and which as Scroll/Back in the settings menu." }, { "id": "AnimSpeed", From 54d14b421c75ff85f02d9907d699eaeade3ad718 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 29 Jan 2025 06:23:04 +0200 Subject: [PATCH 20/45] Style correction --- .../draw_homescreen_simplified.cpp | 53 +++++++++---------- .../mono_96x16/draw_homescreen_simplified.cpp | 53 +++++++++---------- 2 files changed, 51 insertions(+), 55 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 795f8a3b..3bbe8917 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -7,35 +7,32 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - // Flip and switch buttons accordingly - OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); - OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - - if ((tipTemp > 55) || tipDisconnected) { - // draw temp over the start soldering button - // Location changes on screen rotation - // in right handed mode we want to draw over the first part - OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); - // If tip is connected draw the temp, otherwise - the notification - if (tipDisconnected) { - // Draw-in the missing tip symbol - if (isReverse) { - OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - } else { - OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - }// Draw-in the temp - - - } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp - } - } + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + // Flip and switch buttons accordingly + OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); + OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + + if ((tipTemp > 55) || tipDisconnected) { + // draw temp over the start soldering button + // Location changes on screen rotation and due to button swapping + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); + // If tip is disconnected draw the notification, otherwise - the temp + if (tipDisconnected) { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + } + } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + } + } OLED::setCursor(isFlipped ? 0 : 116, 0); ui_draw_power_source_icon(); } - #endif \ No newline at end of file diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 24f0b2b4..3f9540d9 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -6,33 +6,32 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - // Flip and switch buttons accordingly - OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); - OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + // Flip and switch buttons accordingly + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - if ((tipTemp > 55) || tipDisconnected) { - // draw temp over the start soldering button - // Location changes on screen rotation - // in right handed mode we want to draw over the first part - OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - // If tip is connected draw the temp, otherwise - the notification - if (tipDisconnected) { - // Draw-in the missing tip symbol - if (isReverse) { - OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - } else { - OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - } - } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp - } - } - OLED::setCursor(isFlipped ? 0 : 84, 0); - ui_draw_power_source_icon(); + if ((tipTemp > 55) || tipDisconnected) { + // draw temp over the start soldering button + // Location changes on screen rotation and due to button swapping + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); + // If tip is disconnected draw the notification, otherwise - the temp + if (tipDisconnected) { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } + } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + } + } + OLED::setCursor(isFlipped ? 0 : 84, 0); + ui_draw_power_source_icon(); } - #endif \ No newline at end of file From 8908c9d6871f2d644ce93b85041b40046f4c7dca Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 29 Jan 2025 06:28:14 +0200 Subject: [PATCH 21/45] Style correction (8th TRY) --- .../draw_homescreen_simplified.cpp | 32 +++++++++---------- .../mono_96x16/draw_homescreen_simplified.cpp | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 3bbe8917..0097c9c7 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -15,22 +15,22 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); if ((tipTemp > 55) || tipDisconnected) { - // draw temp over the start soldering button - // Location changes on screen rotation and due to button swapping - // in right handed mode we want to draw over the first part - OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); - // If tip is disconnected draw the notification, otherwise - the temp - if (tipDisconnected) { - // Draw-in the missing tip symbol - if (isReverse) { - OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - } else { - OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - } - } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp - } + // draw temp over the start soldering button + // Location changes on screen rotation and due to button swapping + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); + // If tip is disconnected draw the notification, otherwise - the temp + if (tipDisconnected) { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + } + } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + } } OLED::setCursor(isFlipped ? 0 : 116, 0); ui_draw_power_source_icon(); diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 3f9540d9..8e128d88 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -14,22 +14,22 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); if ((tipTemp > 55) || tipDisconnected) { - // draw temp over the start soldering button - // Location changes on screen rotation and due to button swapping - // in right handed mode we want to draw over the first part - OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - // If tip is disconnected draw the notification, otherwise - the temp - if (tipDisconnected) { - // Draw-in the missing tip symbol - if (isReverse) { - OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - } else { - OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - } - } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp - } + // draw temp over the start soldering button + // Location changes on screen rotation and due to button swapping + // in right handed mode we want to draw over the first part + OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area + OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); + // If tip is disconnected draw the notification, otherwise - the temp + if (tipDisconnected) { + // Draw-in the missing tip symbol + if (isReverse) { + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } else { + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + } + } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + } } OLED::setCursor(isFlipped ? 0 : 84, 0); ui_draw_power_source_icon(); From f882f57b18ef672956b01e81572ef9fb034cc5a8 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 29 Jan 2025 06:35:14 +0200 Subject: [PATCH 22/45] Style cleanup (9th try!!!) --- .../drawing/mono_128x32/draw_homescreen_simplified.cpp | 8 ++++---- .../drawing/mono_96x16/draw_homescreen_simplified.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 0097c9c7..6528a40c 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -7,13 +7,13 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - + if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 8e128d88..3a720b41 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -6,13 +6,13 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - + if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping @@ -28,7 +28,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } } OLED::setCursor(isFlipped ? 0 : 84, 0); From 248a7b5525faeae565a29025b9a72a9b2e979324 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 29 Jan 2025 06:41:58 +0200 Subject: [PATCH 23/45] Code style (10th try) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 6 +++--- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 6528a40c..eabf1a62 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -7,9 +7,9 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 3a720b41..f721ca16 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -6,9 +6,9 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool tipDisconnected = isTipDisconnected(); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); @@ -28,7 +28,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { - ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp + ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } } OLED::setCursor(isFlipped ? 0 : 84, 0); From 0646c24b09adc9c780a8c0e72573abb148b84fdd Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 29 Jan 2025 06:48:46 +0200 Subject: [PATCH 24/45] Code style (11th try) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 7 ++++--- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index eabf1a62..c0e13e5e 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -7,9 +7,10 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool tipDisconnected = isTipDisconnected(); + // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index f721ca16..779e0085 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -6,9 +6,10 @@ extern uint8_t buttonBF[sizeof(buttonB)]; extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { - bool tipDisconnected = isTipDisconnected(); - bool isFlipped = OLED::getRotation(); - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isFlipped = OLED::getRotation(); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool tipDisconnected = isTipDisconnected(); + // Flip and switch buttons accordingly OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); From b7bfa3f4cf31b02fe9e4b452bb702c04336015ec Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 11:16:29 +0200 Subject: [PATCH 25/45] Reverse Settings.h --- source/Core/Inc/Settings.h | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index 2366b772..e1c00f9c 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -47,38 +47,38 @@ enum SettingsOptions { CalibrationOffset = 23, // This stores the temperature offset for this tip in the iron. PowerLimit = 24, // Maximum power iron allowed to output ReverseButtonTempChangeEnabled = 25, // Change the plus and minus button assigment - ReverseButtonNavEnabled = 26, // Change the A and B button assigment in menus - TempChangeLongStep = 27, // Temperature-change-increment on long button press - TempChangeShortStep = 28, // Temperature-change-increment on short button press - HallEffectSensitivity = 29, // Operating mode of the hall effect sensor - AccelMissingWarningCounter = 30, // Counter of how many times we have warned we cannot detect the accelerometer - PDMissingWarningCounter = 31, // Counter of how many times we have warned we cannot detect the pd interface - UILanguage = 32, // Selected UI Language code, null-terminated *only if* the length is less than 8 chars - PDNegTimeout = 33, // PD timeout in 100ms steps - OLEDInversion = 34, // Invert the colours on the display - OLEDBrightness = 35, // Brightness for the OLED display - LOGOTime = 36, // Duration the logo will be displayed for - CalibrateCJC = 37, // Toggle calibrate CJC at next boot - BluetoothLE = 38, // Toggle BLE if present - USBPDMode = 39, // Toggle PPS & EPR - ProfilePhases = 40, // Number of profile mode phases - ProfilePreheatTemp = 41, // Temperature to preheat to before the first phase - ProfilePreheatSpeed = 42, // Maximum allowed preheat speed in degrees per second - ProfilePhase1Temp = 43, // Temperature to target for the end of phase 1 - ProfilePhase1Duration = 44, // Target duration for phase 1 - ProfilePhase2Temp = 45, // Temperature to target for the end of phase 2 - ProfilePhase2Duration = 46, // Target duration for phase 2 - ProfilePhase3Temp = 47, // Temperature to target for the end of phase 3 - ProfilePhase3Duration = 48, // Target duration for phase 3 - ProfilePhase4Temp = 49, // Temperature to target for the end of phase 4 - ProfilePhase4Duration = 50, // Target duration for phase 4 - ProfilePhase5Temp = 51, // Temperature to target for the end of phase 5 - ProfilePhase5Duration = 52, // Target duration for phase 5 - ProfileCooldownSpeed = 53, // Maximum allowed cooldown speed in degrees per second - HallEffectSleepTime = 54, // Seconds (/5) timeout to sleep when hall effect over threshold - SolderingTipType = 55, // Selecting the type of soldering tip fitted + TempChangeLongStep = 26, // Temperature-change-increment on long button press + TempChangeShortStep = 27, // Temperature-change-increment on short button press + HallEffectSensitivity = 28, // Operating mode of the hall effect sensor + AccelMissingWarningCounter = 29, // Counter of how many times we have warned we cannot detect the accelerometer + PDMissingWarningCounter = 30, // Counter of how many times we have warned we cannot detect the pd interface + UILanguage = 31, // Selected UI Language code, null-terminated *only if* the length is less than 8 chars + PDNegTimeout = 32, // PD timeout in 100ms steps + OLEDInversion = 33, // Invert the colours on the display + OLEDBrightness = 34, // Brightness for the OLED display + LOGOTime = 35, // Duration the logo will be displayed for + CalibrateCJC = 36, // Toggle calibrate CJC at next boot + BluetoothLE = 37, // Toggle BLE if present + USBPDMode = 38, // Toggle PPS & EPR + ProfilePhases = 39, // Number of profile mode phases + ProfilePreheatTemp = 40, // Temperature to preheat to before the first phase + ProfilePreheatSpeed = 41, // Maximum allowed preheat speed in degrees per second + ProfilePhase1Temp = 42, // Temperature to target for the end of phase 1 + ProfilePhase1Duration = 43, // Target duration for phase 1 + ProfilePhase2Temp = 44, // Temperature to target for the end of phase 2 + ProfilePhase2Duration = 45, // Target duration for phase 2 + ProfilePhase3Temp = 46, // Temperature to target for the end of phase 3 + ProfilePhase3Duration = 47, // Target duration for phase 3 + ProfilePhase4Temp = 48, // Temperature to target for the end of phase 4 + ProfilePhase4Duration = 49, // Target duration for phase 4 + ProfilePhase5Temp = 50, // Temperature to target for the end of phase 5 + ProfilePhase5Duration = 51, // Target duration for phase 5 + ProfileCooldownSpeed = 52, // Maximum allowed cooldown speed in degrees per second + HallEffectSleepTime = 53, // Seconds (/5) timeout to sleep when hall effect over threshold + SolderingTipType = 54, // Selecting the type of soldering tip fitted + ReverseButtonNavEnabled = 55, // Change the A and B button assigment in menus // - SettingsOptionsLength = 56, // End marker + SettingsOptionsLength = 55, // End marker }; typedef enum { From 68116f7de2415e76954a785df958931f529964ac Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 11:38:52 +0200 Subject: [PATCH 26/45] Revert "Reverse Settings.h" --- source/Core/Inc/Settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index e1c00f9c..35fde7da 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -78,7 +78,7 @@ enum SettingsOptions { SolderingTipType = 54, // Selecting the type of soldering tip fitted ReverseButtonNavEnabled = 55, // Change the A and B button assigment in menus // - SettingsOptionsLength = 55, // End marker + SettingsOptionsLength = 56, // End marker }; typedef enum { From e346a7793ec16a534324a7b98f6e7ffd081c6a44 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:30:08 +0200 Subject: [PATCH 27/45] Requested change Now it flips buttons only in menu by default, however i need the other option, so i've added definition "REVERSE_NAV_EVERYWHERE" --- source/Core/Threads/GUIThread.cpp | 16 ++++++++++++++-- .../mono_128x32/draw_homescreen_simplified.cpp | 16 ++++++++++++++++ .../mono_96x16/draw_homescreen_simplified.cpp | 16 ++++++++++++++++ .../UI/logic/utils/shouldDeviceShutdown.cpp | 6 +++++- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 4d343f91..746bfd65 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -45,9 +45,13 @@ OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); + #ifdef REVERSE_NAV_EVERYWHERE bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); + #else + ButtonState buttons = getButtonState(); + #endif // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); @@ -113,7 +117,11 @@ OperatingMode guiHandleDraw(void) { newMode = gui_SolderingSleepingMode(buttons, &context); break; case OperatingMode::TemperatureAdjust: - newMode = gui_solderingTempAdjust(buttons, &context); + #ifdef REVERSE_NAV_EVERYWHERE + newMode = gui_solderingTempAdjust(getButtonState(), &context); + #else + newMode = gui_solderingTempAdjust(getButtonState(e), &context); + #endif break; case OperatingMode::DebugMenuReadout: newMode = showDebugMenu(buttons, &context); @@ -122,7 +130,11 @@ OperatingMode guiHandleDraw(void) { newMode = performCJCC(buttons, &context); break; case OperatingMode::SettingsMenu: - newMode = gui_SettingsMenu(buttons, &context); + #ifdef REVERSE_NAV_EVERYWHERE + newMode = gui_SettingsMenu(getButtonState(), &context); + #else + newMode = gui_SettingsMenu(getButtonState(d), &context); + #endif break; case OperatingMode::InitialisationDone: newMode = handle_post_init_state(); diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index c0e13e5e..2cb4e75c 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -8,27 +8,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + #endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly + #ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + #else + OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? buttonAF : buttonA); + OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? buttonBF : buttonB); + #endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); + #else + OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area + OLED::setCursor(isFlipped ? 56 : 0, 0); + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + #ifdef REVERSE_NAV_EVERYWHERE } + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 779e0085..41bf290f 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,27 +7,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + #endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly + #ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + #else + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? buttonAF : buttonA); + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? buttonBF : buttonB); + #endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); + #else + OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area + OLED::setCursor(isFlipped ? 56 : 0, 0); + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + #ifdef REVERSE_NAV_EVERYWHERE } + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index d050a3ce..bd16513f 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -17,7 +17,11 @@ bool shouldShutdown(void) { } } } - if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)) == BUTTON_B_LONG) { // allow also if back button is pressed long + #ifdef REVERSE_NAV_EVERYWHERE + if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) == BUTTON_B_LONG) { // allow also if back button is pressed long + #else + if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long + #endif return true; } return false; From 157769b09945f2d18911b3674f704ef9cd42a276 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:33:30 +0200 Subject: [PATCH 28/45] -style --- .../Miniware/Vendor/CMSIS/Include/arm_math.h | 2 +- .../Vendor/NMSIS/Core/Include/nmsis_version.h | 4 ++-- .../nmsis/core/inc/core_feature_eclic.h | 4 ++-- .../components/nmsis/core/inc/nmsis_version.h | 4 ++-- .../Sequre/Vendor/CMSIS/Include/arm_math.h | 2 +- source/Core/Drivers/Font.h | 10 ++++---- source/Core/Threads/GUIThread.cpp | 18 +++++++------- .../draw_homescreen_simplified.cpp | 24 +++++++++---------- .../mono_96x16/draw_homescreen_simplified.cpp | 24 +++++++++---------- .../UI/logic/utils/shouldDeviceShutdown.cpp | 6 ++--- 10 files changed, 49 insertions(+), 49 deletions(-) diff --git a/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h b/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h index e78a3b47..c59b9d19 100644 --- a/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h +++ b/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h @@ -495,7 +495,7 @@ static __INLINE q63_t mult32x64(q63_t x, q31_t y) { return ((((q63_t)(x & 0x0000 /* #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) #define __CLZ __clz - #endif +#endif */ /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ #if defined(ARM_MATH_CM0_FAMILY) && ((defined(__ICCARM__))) diff --git a/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h b/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h index 4b7a5c32..861d7204 100644 --- a/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h +++ b/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h @@ -36,9 +36,9 @@ * \code * #if defined(__NMSIS_VERSION) && (__NMSIS_VERSION >= 0x00010105) * #warning "Yes, we have NMSIS 1.1.5 or later" - * #else + * #else * #error "We need NMSIS 1.1.5 or later!" - * #endif + * #endif * \endcode * * @{ diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h index cac14ef0..7eb678e4 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h @@ -206,7 +206,7 @@ typedef enum IRQn { #ifdef NMSIS_ECLIC_VIRTUAL #ifndef NMSIS_ECLIC_VIRTUAL_HEADER_FILE #define NMSIS_ECLIC_VIRTUAL_HEADER_FILE "nmsis_eclic_virtual.h" - #endif + #endif #include NMSIS_ECLIC_VIRTUAL_HEADER_FILE #else #define ECLIC_SetCfgNlbits __ECLIC_SetCfgNlbits @@ -238,7 +238,7 @@ typedef enum IRQn { #ifdef NMSIS_VECTAB_VIRTUAL #ifndef NMSIS_VECTAB_VIRTUAL_HEADER_FILE #define NMSIS_VECTAB_VIRTUAL_HEADER_FILE "nmsis_vectab_virtual.h" - #endif + #endif #include NMSIS_VECTAB_VIRTUAL_HEADER_FILE #else #define ECLIC_SetVector __ECLIC_SetVector diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h index 16507998..82b7fcc8 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h @@ -36,9 +36,9 @@ * \code * #if defined(__NMSIS_VERSION) && (__NMSIS_VERSION >= 0x00010105) * #warning "Yes, we have NMSIS 1.1.5 or later" - * #else + * #else * #error "We need NMSIS 1.1.5 or later!" - * #endif + * #endif * \endcode * * @{ diff --git a/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h b/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h index e78a3b47..c59b9d19 100644 --- a/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h +++ b/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h @@ -495,7 +495,7 @@ static __INLINE q63_t mult32x64(q63_t x, q31_t y) { return ((((q63_t)(x & 0x0000 /* #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) #define __CLZ __clz - #endif +#endif */ /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ #if defined(ARM_MATH_CM0_FAMILY) && ((defined(__ICCARM__))) diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index 0d0943ff..1c17a561 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -168,7 +168,7 @@ 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - #endif + #endif const uint8_t buttonB[] = { // width = 56 @@ -356,7 +356,7 @@ 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x2b, 0x09, 0x07, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x02, 0x01, } }; - #else +#else #if defined(MODEL_TS100) || defined(MODEL_Pinecil) || defined(MODEL_Pinecilv2) const uint8_t buttonA[] = { // width = 42 @@ -401,7 +401,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xd0, 0xc8, 0x08, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - #endif + #endif const uint8_t buttonB[] = { // width = 42 @@ -578,8 +578,8 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE8, 0x70, 0x7A, 0x5E, 0x8E, 0x1C, 0x30, 0x00, // 0x00, 0x10, 0x38, 0x1C, 0x0E, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // - #endif - }; #endif + }; +#endif // clang-format on #endif /* FONT_H_ */ \ No newline at end of file diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 746bfd65..828936d3 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -45,13 +45,13 @@ OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); - #else +#else ButtonState buttons = getButtonState(); - #endif +#endif // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); @@ -117,11 +117,11 @@ OperatingMode guiHandleDraw(void) { newMode = gui_SolderingSleepingMode(buttons, &context); break; case OperatingMode::TemperatureAdjust: - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE newMode = gui_solderingTempAdjust(getButtonState(), &context); - #else +#else newMode = gui_solderingTempAdjust(getButtonState(e), &context); - #endif +#endif break; case OperatingMode::DebugMenuReadout: newMode = showDebugMenu(buttons, &context); @@ -130,11 +130,11 @@ OperatingMode guiHandleDraw(void) { newMode = performCJCC(buttons, &context); break; case OperatingMode::SettingsMenu: - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE newMode = gui_SettingsMenu(getButtonState(), &context); - #else +#else newMode = gui_SettingsMenu(getButtonState(d), &context); - #endif +#endif break; case OperatingMode::InitialisationDone: newMode = handle_post_init_state(); diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 2cb4e75c..3c4cca5a 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -8,43 +8,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - #endif +#endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - #else +#else OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? buttonAF : buttonA); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? buttonBF : buttonB); - #endif +#endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); - #else + #else OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE } - #endif + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 41bf290f..f10b373c 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,43 +7,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - #endif +#endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - #else +#else OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? buttonAF : buttonA); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? buttonBF : buttonB); - #endif +#endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - #else + #else OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE } - #endif + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index bd16513f..a71fa4ed 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -17,11 +17,11 @@ bool shouldShutdown(void) { } } } - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) == BUTTON_B_LONG) { // allow also if back button is pressed long - #else +#else if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long - #endif +#endif return true; } return false; From 5e78168c90c203b4e95704c6e2c7056b148b0e9f Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:38:17 +0200 Subject: [PATCH 29/45] -style --- .../mono_128x32/draw_homescreen_simplified.cpp | 14 +++++++------- .../mono_96x16/draw_homescreen_simplified.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 3c4cca5a..dd2c86b9 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -26,25 +26,25 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); - #else +#else OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif +#endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif +#endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE } - #endif +#endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index f10b373c..3b47e715 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -25,25 +25,25 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - #else +#else OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif +#endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif +#endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE } - #endif +#endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } From 79cb0b5d92b10086807aecc35793dbf3273615b7 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:40:34 +0200 Subject: [PATCH 30/45] style(3) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index dd2c86b9..8adf8594 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -8,10 +8,10 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif - bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly #ifdef REVERSE_NAV_EVERYWHERE diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 3b47e715..086fbc4c 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,10 +7,10 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif - bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly #ifdef REVERSE_NAV_EVERYWHERE From 9993fc1a1954070eb7df45c323a165ff7086a1a0 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:43:03 +0200 Subject: [PATCH 31/45] style(4) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 8adf8594..f7236fb7 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 086fbc4c..42f7cfd0 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly From b6642ac01b87cfa91d7af8ffd1d1a29127a7da8e Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:47:44 +0200 Subject: [PATCH 32/45] style (5) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index f7236fb7..9fee996c 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); +bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 42f7cfd0..c6d4f4a4 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); +bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly From ef8c9a6c20c5a6f6f1edea6aafc47ecc80f130f4 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:49:30 +0200 Subject: [PATCH 33/45] style (6) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 9fee996c..d6146711 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE -bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index c6d4f4a4..645be122 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE -bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly From 8b60290c7d4217ee8f8fdc4028fd5751eecbc4c8 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Sat, 8 Feb 2025 04:41:41 +0200 Subject: [PATCH 34/45] Summary --- Translations/translations_definitions.json | 2 +- .../Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h | 2 +- .../Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h | 4 ++-- .../components/nmsis/core/inc/core_feature_eclic.h | 4 ++-- .../components/nmsis/core/inc/nmsis_version.h | 4 ++-- source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h | 2 +- source/Core/Drivers/Font.h | 10 +++++----- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index ed0095be..85b00b26 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -473,7 +473,7 @@ "maxLen2": 15, "description": "Swaps which button increments and decrements on temperature change screens." }, - { + { "id": "ReverseButtonNav", "maxLen": 6, "maxLen2": 15, diff --git a/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h b/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h index c59b9d19..e78a3b47 100644 --- a/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h +++ b/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h @@ -495,7 +495,7 @@ static __INLINE q63_t mult32x64(q63_t x, q31_t y) { return ((((q63_t)(x & 0x0000 /* #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) #define __CLZ __clz -#endif + #endif */ /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ #if defined(ARM_MATH_CM0_FAMILY) && ((defined(__ICCARM__))) diff --git a/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h b/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h index 861d7204..4b7a5c32 100644 --- a/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h +++ b/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h @@ -36,9 +36,9 @@ * \code * #if defined(__NMSIS_VERSION) && (__NMSIS_VERSION >= 0x00010105) * #warning "Yes, we have NMSIS 1.1.5 or later" - * #else + * #else * #error "We need NMSIS 1.1.5 or later!" - * #endif + * #endif * \endcode * * @{ diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h index 7eb678e4..cac14ef0 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h @@ -206,7 +206,7 @@ typedef enum IRQn { #ifdef NMSIS_ECLIC_VIRTUAL #ifndef NMSIS_ECLIC_VIRTUAL_HEADER_FILE #define NMSIS_ECLIC_VIRTUAL_HEADER_FILE "nmsis_eclic_virtual.h" - #endif + #endif #include NMSIS_ECLIC_VIRTUAL_HEADER_FILE #else #define ECLIC_SetCfgNlbits __ECLIC_SetCfgNlbits @@ -238,7 +238,7 @@ typedef enum IRQn { #ifdef NMSIS_VECTAB_VIRTUAL #ifndef NMSIS_VECTAB_VIRTUAL_HEADER_FILE #define NMSIS_VECTAB_VIRTUAL_HEADER_FILE "nmsis_vectab_virtual.h" - #endif + #endif #include NMSIS_VECTAB_VIRTUAL_HEADER_FILE #else #define ECLIC_SetVector __ECLIC_SetVector diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h index 82b7fcc8..16507998 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h @@ -36,9 +36,9 @@ * \code * #if defined(__NMSIS_VERSION) && (__NMSIS_VERSION >= 0x00010105) * #warning "Yes, we have NMSIS 1.1.5 or later" - * #else + * #else * #error "We need NMSIS 1.1.5 or later!" - * #endif + * #endif * \endcode * * @{ diff --git a/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h b/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h index c59b9d19..e78a3b47 100644 --- a/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h +++ b/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h @@ -495,7 +495,7 @@ static __INLINE q63_t mult32x64(q63_t x, q31_t y) { return ((((q63_t)(x & 0x0000 /* #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) #define __CLZ __clz -#endif + #endif */ /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ #if defined(ARM_MATH_CM0_FAMILY) && ((defined(__ICCARM__))) diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index 1c17a561..0d0943ff 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -168,7 +168,7 @@ 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - #endif + #endif const uint8_t buttonB[] = { // width = 56 @@ -356,7 +356,7 @@ 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x2b, 0x09, 0x07, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x02, 0x01, } }; -#else + #else #if defined(MODEL_TS100) || defined(MODEL_Pinecil) || defined(MODEL_Pinecilv2) const uint8_t buttonA[] = { // width = 42 @@ -401,7 +401,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xd0, 0xc8, 0x08, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - #endif + #endif const uint8_t buttonB[] = { // width = 42 @@ -578,8 +578,8 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE8, 0x70, 0x7A, 0x5E, 0x8E, 0x1C, 0x30, 0x00, // 0x00, 0x10, 0x38, 0x1C, 0x0E, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // - #endif + #endif }; -#endif + #endif // clang-format on #endif /* FONT_H_ */ \ No newline at end of file From 883ef609355a0ae8e7b3117e13c898bdf025650b Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 17:57:06 +0300 Subject: [PATCH 35/45] Remove macro from configuration.h files --- source/Core/BSP/MHP30/configuration.h | 1 - source/Core/BSP/Miniware/configuration.h | 1 - source/Core/BSP/Pinecil/configuration.h | 1 - source/Core/BSP/Pinecilv2/configuration.h | 1 - source/Core/BSP/Sequre/configuration.h | 1 - 5 files changed, 5 deletions(-) diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h index 0d7369ff..855fdf22 100644 --- a/source/Core/BSP/MHP30/configuration.h +++ b/source/Core/BSP/MHP30/configuration.h @@ -58,7 +58,6 @@ #define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right #define MAX_ORIENTATION_MODE 1 // Unlikely to ever change #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change -#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index 4015a48b..17301efa 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -58,7 +58,6 @@ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change -#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Pinecil/configuration.h b/source/Core/BSP/Pinecil/configuration.h index f0cca67a..4ac4b689 100644 --- a/source/Core/BSP/Pinecil/configuration.h +++ b/source/Core/BSP/Pinecil/configuration.h @@ -58,7 +58,6 @@ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change -#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index e789e1e9..d5307d9f 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -58,7 +58,6 @@ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change -#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * OLED Brightness diff --git a/source/Core/BSP/Sequre/configuration.h b/source/Core/BSP/Sequre/configuration.h index a6de0847..2e021f35 100644 --- a/source/Core/BSP/Sequre/configuration.h +++ b/source/Core/BSP/Sequre/configuration.h @@ -67,7 +67,6 @@ #define ORIENTATION_MODE 0 // 0: Right 1:Left (2:Automatic N/A) #define MAX_ORIENTATION_MODE 1 // Disable auto mode #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change -#define REVERSE_BUTTON_NAV 0 // 0:Default 1:Reverse - Reverse the A and B button assignment in the menus /** * Temp change settings From 726140d06f328780139b227d5e1627be5956f961 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 18:04:59 +0300 Subject: [PATCH 36/45] Translations/: rename ReverseButtonNav to ReverseButtonMenu --- Translations/translation_BE.json | 2 +- Translations/translation_BG.json | 2 +- Translations/translation_CS.json | 2 +- Translations/translation_DA.json | 2 +- Translations/translation_DE.json | 2 +- Translations/translation_EL.json | 2 +- Translations/translation_EN.json | 2 +- Translations/translation_ES.json | 2 +- Translations/translation_ET.json | 2 +- Translations/translation_FI.json | 2 +- Translations/translation_FR.json | 2 +- Translations/translation_HR.json | 2 +- Translations/translation_HU.json | 2 +- Translations/translation_IT.json | 2 +- Translations/translation_JA_JP.json | 2 +- Translations/translation_LT.json | 2 +- Translations/translation_NB.json | 2 +- Translations/translation_NL.json | 2 +- Translations/translation_NL_BE.json | 2 +- Translations/translation_PL.json | 2 +- Translations/translation_PT.json | 2 +- Translations/translation_RO.json | 2 +- Translations/translation_RU.json | 2 +- Translations/translation_SK.json | 2 +- Translations/translation_SL.json | 2 +- Translations/translation_SR_CYRL.json | 2 +- Translations/translation_SR_LATN.json | 2 +- Translations/translation_SV.json | 2 +- Translations/translation_TR.json | 2 +- Translations/translation_UK.json | 2 +- Translations/translation_UZ.json | 2 +- Translations/translation_VI.json | 2 +- Translations/translation_YUE_HK.json | 2 +- Translations/translation_ZH_CN.json | 2 +- Translations/translation_ZH_TW.json | 2 +- Translations/translations_definitions.json | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index aae28b9f..51233b65 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -275,7 +275,7 @@ "displayText": "Інвертаваць\nкнопкі +/-", "description": "Інвертаваць кнопкі вымярэння тэмпературы" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Інвертаваць\nкнопкі A/B", "description": "Інвертаваць кнопкі навігацыі ў меню" }, diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json index 94f86265..8140d574 100644 --- a/Translations/translation_BG.json +++ b/Translations/translation_BG.json @@ -275,7 +275,7 @@ "displayText": "Размяна\nбутони +/-", "description": "Обръщане на бутоните + и - за промяна на температурата на човка на поялника" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Размяна\nбутони А/В", "description": "Обръщане бутоните А и В за навигация в менютата" }, diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index 8b92f8a3..4f9deacb 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -275,7 +275,7 @@ "displayText": "Prohodit\ntl. +-?", "description": "Prohodit tlačítka pro změnu teploty" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json index f027b7b8..869719b5 100644 --- a/Translations/translation_DA.json +++ b/Translations/translation_DA.json @@ -275,7 +275,7 @@ "displayText": "Skift\n+ - tasterne", "description": "Skift tildeling af knapper til temperaturjustering" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index cee478d4..fd34112e 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -275,7 +275,7 @@ "displayText": "+- Tasten\numkehren", "description": "Tastenbelegung zur Temperaturänderung umkehren" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json index 9c19ec2c..dc6fec99 100644 --- a/Translations/translation_EL.json +++ b/Translations/translation_EL.json @@ -275,7 +275,7 @@ "displayText": "Αντιστροφή\nπλήκτρων + -", "description": "Αντιστροφή διάταξης πλήκτρων στη ρύθμιση θερμοκρασίας" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index e6431400..2f88e76c 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -275,7 +275,7 @@ "displayText": "Swap\n+/- keys", "description": "Reverse assignment of buttons for temperature adjustment" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json index 52b10764..65e50bdb 100644 --- a/Translations/translation_ES.json +++ b/Translations/translation_ES.json @@ -275,7 +275,7 @@ "displayText": "Invertir\nbotones +/-", "description": "Invertir botones de ajuste de temperatura" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ET.json b/Translations/translation_ET.json index df2ca51e..3ad04086 100644 --- a/Translations/translation_ET.json +++ b/Translations/translation_ET.json @@ -275,7 +275,7 @@ "displayText": "Vaheta\n+ - nupud", "description": "Temperatuurinuppude asukohtade vahetus" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json index 826736bd..eab48847 100644 --- a/Translations/translation_FI.json +++ b/Translations/translation_FI.json @@ -275,7 +275,7 @@ "displayText": "Suunnanvaihto\n+ - näppäimille", "description": "Lämpötilapainikkeiden suunnan vaihtaminen" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json index 0c492888..ecb5c54d 100644 --- a/Translations/translation_FR.json +++ b/Translations/translation_FR.json @@ -275,7 +275,7 @@ "displayText": "Inverser les\ntouches +/-", "description": "Inverser les boutons d'ajustement de température" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Inverser les\ntouches A/B", "description": "Inverser les boutons de navigation du menu" }, diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json index 3f1803ec..9b6ecaa5 100644 --- a/Translations/translation_HR.json +++ b/Translations/translation_HR.json @@ -275,7 +275,7 @@ "displayText": "Zamjena\n+ - tipki", "description": "Zamjenjuje funkciju gornje i donje tipke za podešavanje temperature" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json index 9f8a59a7..d8e6105e 100644 --- a/Translations/translation_HU.json +++ b/Translations/translation_HU.json @@ -275,7 +275,7 @@ "displayText": "+/- gomb\nmegfordítása", "description": "Forrasztó hegy hőmérsékletállító gombok felcserélése" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index f5035ed1..8f19a621 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -275,7 +275,7 @@ "displayText": "Inversione\ntasti +/-", "description": "Inverti i tasti per aumentare o diminuire la temperatura della punta" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Inversione\ntasti A/B", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json index 4ab34c7e..4d59bd0e 100644 --- a/Translations/translation_JA_JP.json +++ b/Translations/translation_JA_JP.json @@ -275,7 +275,7 @@ "displayText": "キー入れ替え", "description": "温度設定時に+ボタンと-ボタンを入れ替える" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json index a799e55d..c7b541e8 100644 --- a/Translations/translation_LT.json +++ b/Translations/translation_LT.json @@ -275,7 +275,7 @@ "displayText": "Sukeisti + -\nmygtukus?", "description": "Sukeisti + - temperatūros keitimo mygtukus vietomis" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json index b20d70a8..e84ffc4d 100644 --- a/Translations/translation_NB.json +++ b/Translations/translation_NB.json @@ -275,7 +275,7 @@ "displayText": "Bytt\n+ - kn.", "description": "Bytt om på knappene for å stille temperatur" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json index be1b8fc3..e5f148e6 100644 --- a/Translations/translation_NL.json +++ b/Translations/translation_NL.json @@ -275,7 +275,7 @@ "displayText": "Wissel\n+ - knoppen", "description": "Wissel de knoppen voor temperatuur controle om" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json index b86136a0..82795fc9 100644 --- a/Translations/translation_NL_BE.json +++ b/Translations/translation_NL_BE.json @@ -275,7 +275,7 @@ "displayText": "Wissel\n+ - knoppen", "description": "Wissel de knoppen voor temperatuur controle" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json index 499b25df..f905c0ae 100644 --- a/Translations/translation_PL.json +++ b/Translations/translation_PL.json @@ -275,7 +275,7 @@ "displayText": "Zamień przyc.\n+/-", "description": "Zamienia działanie przycisków zmiany temperatury grotu" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Zamień przyc.\nA/B", "description": "Zamienia działanie przycisków nawigacyjne menu" }, diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json index 43b7739a..c9184420 100644 --- a/Translations/translation_PT.json +++ b/Translations/translation_PT.json @@ -275,7 +275,7 @@ "displayText": "Trocar\nbotões +/-", "description": "Inverte o funcionamento dos botões de ajuste da temperatura" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json index 54d3473b..033355c6 100644 --- a/Translations/translation_RO.json +++ b/Translations/translation_RO.json @@ -275,7 +275,7 @@ "displayText": "Inversare\n+/- butoane", "description": "Inversarea butoanelor de reglare a temperaturii" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index 2823819a..80b5e3d9 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -275,7 +275,7 @@ "displayText": "Поменять\nкнопки +/-", "description": "Поменять кнопки изменения температуры" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json index 5f76125a..4def651d 100644 --- a/Translations/translation_SK.json +++ b/Translations/translation_SK.json @@ -275,7 +275,7 @@ "displayText": "Otočenie\ntlačidiel +/-", "description": "Prehodenie tlačidiel na nastavovanie teploty" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json index 332edc85..94ad220c 100644 --- a/Translations/translation_SL.json +++ b/Translations/translation_SL.json @@ -275,7 +275,7 @@ "displayText": "Obrni\ntipki + -?", "description": "Zamenjaj funkciji gumbov." }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json index c100d253..790943ce 100644 --- a/Translations/translation_SR_CYRL.json +++ b/Translations/translation_SR_CYRL.json @@ -275,7 +275,7 @@ "displayText": "Swap\n+ - keys", "description": "Reverse assignment of buttons for temperature adjustment" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json index 77252466..f0d4ba7d 100644 --- a/Translations/translation_SR_LATN.json +++ b/Translations/translation_SR_LATN.json @@ -275,7 +275,7 @@ "displayText": "Swap\n+ - keys", "description": "Reverse assignment of buttons for temperature adjustment" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json index 875bd77f..55f18da7 100644 --- a/Translations/translation_SV.json +++ b/Translations/translation_SV.json @@ -275,7 +275,7 @@ "displayText": "Omvända\n+- knappar", "description": "Omvänd ordning för temperaturjustering via plus/minus knapparna" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json index be8345fa..a9b526a1 100644 --- a/Translations/translation_TR.json +++ b/Translations/translation_TR.json @@ -275,7 +275,7 @@ "displayText": "Düğme Yerleri\nRotasyonu", "description": "\"Düğme Yerleri Rotasyonu\" Sıcaklık ayar düğmelerinin yerini değiştirin" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 7939de9e..b9a59683 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -275,7 +275,7 @@ "displayText": "Обернути\nкнопки +/-?", "description": "Обернути кнопки зміни t°" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Обернути\nкнопки A/B?", "description": "Обернути кнопки навігації" }, diff --git a/Translations/translation_UZ.json b/Translations/translation_UZ.json index ca25f81b..ea42b5a7 100644 --- a/Translations/translation_UZ.json +++ b/Translations/translation_UZ.json @@ -275,7 +275,7 @@ "displayText": "(+) va (-) tugmalarni\nalmashtirish", "description": "Harorat o'zgarishi uchun tugmachalarni vazifasini almashish" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json index 45393e13..27f05eb1 100644 --- a/Translations/translation_VI.json +++ b/Translations/translation_VI.json @@ -275,7 +275,7 @@ "displayText": "Đao nguoc\nnút + -", "description": "Đao nguoc chuc năng các nút đieu chinh nhiet đo" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json index db42d3c5..4e84a87b 100644 --- a/Translations/translation_YUE_HK.json +++ b/Translations/translation_YUE_HK.json @@ -275,7 +275,7 @@ "displayText": "反轉加減掣", "description": "反轉調校温度時加減掣嘅方向" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 3cd09a3e..42188079 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -275,7 +275,7 @@ "displayText": "调换加减键", "description": "调校温度时更换加减键的方向" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json index 10c7c082..2d36c9a6 100644 --- a/Translations/translation_ZH_TW.json +++ b/Translations/translation_ZH_TW.json @@ -275,7 +275,7 @@ "displayText": "調換加減鍵", "description": "調校溫度時調換加減鍵的方向" }, - "ReverseButtonNav": { + "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", "description": "Reverse assignment of buttons for menu navigation" }, diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index 85b00b26..93d47752 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -474,7 +474,7 @@ "description": "Swaps which button increments and decrements on temperature change screens." }, { - "id": "ReverseButtonNav", + "id": "ReverseButtonMenu", "maxLen": 6, "maxLen2": 15, "description": "Swaps which buttons are used as Select and which as Scroll/Back in the settings menu." From 7e57184b652732ba1bff00f9a6496d156c085fb1 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 18:20:55 +0300 Subject: [PATCH 37/45] Refactoring: unify the names of the variables related to ReverseButtonMenu handling and add the option to the end of the settings struct to avoid the collisions on factory resets --- source/Core/Inc/Settings.h | 2 +- source/Core/Inc/Translation.h | 2 +- source/Core/Src/Settings.cpp | 2 +- source/Core/Src/settingsGUI.cpp | 9 +++++---- source/Core/Threads/GUIThread.cpp | 2 +- .../drawing/mono_128x32/draw_homescreen_simplified.cpp | 4 ++-- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 4 ++-- .../Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index 35fde7da..79efa078 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -76,7 +76,7 @@ enum SettingsOptions { ProfileCooldownSpeed = 52, // Maximum allowed cooldown speed in degrees per second HallEffectSleepTime = 53, // Seconds (/5) timeout to sleep when hall effect over threshold SolderingTipType = 54, // Selecting the type of soldering tip fitted - ReverseButtonNavEnabled = 55, // Change the A and B button assigment in menus + ReverseButtonMenu = 55, // Change the A and B button assigment in menus // SettingsOptionsLength = 56, // End marker }; diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index bc95bbed..d412e48c 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -90,7 +90,6 @@ enum class SettingsItemIndex : uint8_t { CooldownBlink, ScrollingSpeed, ReverseButtonTempChange, - ReverseButtonNav, AnimSpeed, AnimLoop, Brightness, @@ -108,6 +107,7 @@ enum class SettingsItemIndex : uint8_t { SettingsReset, LanguageSwitch, SolderingTipType, + ReverseButtonMenu, NUM_ITEMS, }; diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index c0b3411b..5b0e17b9 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -81,7 +81,6 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp {MIN_CALIBRATION_OFFSET, 2500, 1, CALIBRATION_OFFSET}, // CalibrationOffset { 0, MAX_POWER_LIMIT, POWER_LIMIT_STEPS, POWER_LIMIT}, // PowerLimit { 0, 1, 1, REVERSE_BUTTON_TEMP_CHANGE}, // ReverseButtonTempChangeEnabled - { 0, 1, 1, REVERSE_BUTTON_NAV}, // ReverseButtonNavEnabled { 5, TEMP_CHANGE_LONG_STEP_MAX, 5, TEMP_CHANGE_LONG_STEP}, // TempChangeLongStep { 1, TEMP_CHANGE_SHORT_STEP_MAX, 1, TEMP_CHANGE_SHORT_STEP}, // TempChangeShortStep { 0, 9, 1, 7}, // HallEffectSensitivity @@ -111,6 +110,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp { 1, 10, 1, 2}, // ProfileCooldownSpeed { 0, 12, 1, 0}, // HallEffectSleepTime { 0, (tipType_t::TIP_TYPE_MAX - 1) > 0 ? (tipType_t::TIP_TYPE_MAX - 1) : 0, 1, 0}, // SolderingTipType + { 0, 1, 1, REVERSE_BUTTON_MENU}, // ReverseButtonMenu }; static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength)); diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index 728e1e21..0d3efa0e 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -47,7 +47,7 @@ static void displayAdvancedSolderingScreens(void); static void displayAdvancedIDLEScreens(void); static void displayScrollSpeed(void); static void displayReverseButtonTempChangeEnabled(void); -static void displayReverseButtonNavEnabled(void); +static void displayReverseButtonMenu(void); static void displayPowerLimit(void); #ifdef BLE_ENABLED @@ -397,7 +397,7 @@ const menuitem UIMenu[] = { /* Reverse Temp change buttons +/- */ {SETTINGS_DESC(SettingsItemIndex::ReverseButtonTempChange), nullptr, displayReverseButtonTempChangeEnabled, nullptr, SettingsOptions::ReverseButtonTempChangeEnabled, SettingsItemIndex::ReverseButtonTempChange, 7}, /* Reverse menu nav buttons A/B */ - {SETTINGS_DESC(SettingsItemIndex::ReverseButtonNav), nullptr, displayReverseButtonNavEnabled, nullptr, SettingsOptions::ReverseButtonNavEnabled, SettingsItemIndex::ReverseButtonNav, 7}, + {SETTINGS_DESC(SettingsItemIndex::ReverseButtonMenu), nullptr, displayReverseButtonMenu, nullptr, SettingsOptions::ReverseButtonMenu, SettingsItemIndex::ReverseButtonMenu, 7}, /* Animation Speed adjustment */ {SETTINGS_DESC(SettingsItemIndex::AnimSpeed), nullptr, displayAnimationSpeed, nullptr, SettingsOptions::AnimationSpeed, SettingsItemIndex::AnimSpeed, 7}, /* Animation Loop switch */ @@ -855,7 +855,8 @@ static void displayCoolingBlinkEnabled(void) { OLED::drawCheckbox(getSettingValu static void displayScrollSpeed(void) { OLED::print(translatedString((getSettingValue(SettingsOptions::DescriptionScrollSpeed)) ? Tr->SettingFastChar : Tr->SettingSlowChar), FontStyle::LARGE); } static void displayReverseButtonTempChangeEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)); } -static void displayReverseButtonNavEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)); } + +static void displayReverseButtonMenu(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::ReverseButtonMenu)); } static void displayAnimationSpeed(void) { switch (getSettingValue(SettingsOptions::AnimationSpeed)) { @@ -952,7 +953,7 @@ static void setCalibrateVIN(void) { OLED::setCursor(0, 8); OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::SMALL); - switch (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled))) { + switch (getButtonState(getSettingValue(SettingsOptions::ReverseButtonMenu))) { case BUTTON_F_SHORT: prevSettingValue(SettingsOptions::VoltageDiv); break; diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 828936d3..4180b5c1 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -43,7 +43,7 @@ guiContext context; // Conte OperatingMode handle_post_init_state(); OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass - bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool d = getSettingValue(SettingsOptions::ReverseButtonMenu); bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); #ifdef REVERSE_NAV_EVERYWHERE bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index d6146711..4337de9f 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonMenu); #endif // Flip and switch buttons accordingly @@ -52,4 +52,4 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::setCursor(isFlipped ? 0 : 116, 0); ui_draw_power_source_icon(); } -#endif \ No newline at end of file +#endif diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 645be122..e740dabe 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonMenu); #endif // Flip and switch buttons accordingly @@ -51,4 +51,4 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { OLED::setCursor(isFlipped ? 0 : 84, 0); ui_draw_power_source_icon(); } -#endif \ No newline at end of file +#endif diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index a71fa4ed..bf9112d8 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -18,7 +18,7 @@ bool shouldShutdown(void) { } } #ifdef REVERSE_NAV_EVERYWHERE - if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) == BUTTON_B_LONG) { // allow also if back button is pressed long + if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonMenu) == BUTTON_B_LONG) { // allow also if back button is pressed long #else if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long #endif From 0bd84d9d5700738523ecc84756e522c4f249cfdb Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 18:37:28 +0300 Subject: [PATCH 38/45] Refactoring: REVERSE_BUTTON_MENU handling and unify comment/section style in configuration.h files for related changes --- source/Core/BSP/MHP30/configuration.h | 7 +++++-- source/Core/BSP/Miniware/configuration.h | 7 +++++-- source/Core/BSP/Pinecil/configuration.h | 7 +++++-- source/Core/BSP/Pinecilv2/configuration.h | 7 +++++-- source/Core/BSP/Sequre/configuration.h | 8 +++++--- source/Core/Src/Settings.cpp | 5 +++-- 6 files changed, 28 insertions(+), 13 deletions(-) diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h index 855fdf22..35269f8a 100644 --- a/source/Core/BSP/MHP30/configuration.h +++ b/source/Core/BSP/MHP30/configuration.h @@ -53,15 +53,18 @@ /** * OLED Orientation - * */ #define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right #define MAX_ORIENTATION_MODE 1 // Unlikely to ever change + +/** + * Buttons handling + */ #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only /** * OLED Brightness - * */ #define MIN_BRIGHTNESS 0 // Min OLED brightness selectable #define MAX_BRIGHTNESS 100 // Max OLED brightness selectable diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index 17301efa..ab8ae203 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -53,15 +53,18 @@ /** * OLED Orientation - * */ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto + +/** + * Buttons handling + */ #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only /** * OLED Brightness - * */ #if defined(MODEL_TS101) #define MIN_BRIGHTNESS 1 // Min OLED brightness selectable diff --git a/source/Core/BSP/Pinecil/configuration.h b/source/Core/BSP/Pinecil/configuration.h index 4ac4b689..1ae37944 100644 --- a/source/Core/BSP/Pinecil/configuration.h +++ b/source/Core/BSP/Pinecil/configuration.h @@ -53,15 +53,18 @@ /** * OLED Orientation - * */ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto + +/** + * Buttons handling + */ #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only /** * OLED Brightness - * */ #define MIN_BRIGHTNESS 0 // Min OLED brightness selectable #define MAX_BRIGHTNESS 100 // Max OLED brightness selectable diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index d5307d9f..59703d83 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -53,15 +53,18 @@ /** * OLED Orientation - * */ #define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic #define MAX_ORIENTATION_MODE 2 // Up to auto + +/** + * Buttons handling + */ #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only /** * OLED Brightness - * */ #define MIN_BRIGHTNESS 1 // Min OLED brightness selectable #define MAX_BRIGHTNESS 101 // Max OLED brightness selectable diff --git a/source/Core/BSP/Sequre/configuration.h b/source/Core/BSP/Sequre/configuration.h index 2e021f35..0addfc8f 100644 --- a/source/Core/BSP/Sequre/configuration.h +++ b/source/Core/BSP/Sequre/configuration.h @@ -4,7 +4,6 @@ /** * Configuration.h * Define here your default pre settings for S60 - * */ //=========================================================================== @@ -21,7 +20,6 @@ /** * OLED Brightness - * */ #define MIN_BRIGHTNESS 1 // Min OLED brightness selectable #define MAX_BRIGHTNESS 101 // Max OLED brightness selectable @@ -62,11 +60,15 @@ /** * OLED Orientation - * */ #define ORIENTATION_MODE 0 // 0: Right 1:Left (2:Automatic N/A) #define MAX_ORIENTATION_MODE 1 // Disable auto mode + +/** + * Buttons handling + */ #define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change +#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only /** * Temp change settings diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 5b0e17b9..0e44f4f6 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -54,7 +54,7 @@ typedef struct { } SettingConstants; static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = { - //{ min, max, increment, default} +// MIN, MAX, INCREMENT, DEFAULT { MIN_TEMP_C, MAX_TEMP_F, 5, SOLDERING_TEMP}, // SolderingTemp { MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp { 0, 15, 1, SLEEP_TIME}, // SleepTime @@ -110,7 +110,8 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp { 1, 10, 1, 2}, // ProfileCooldownSpeed { 0, 12, 1, 0}, // HallEffectSleepTime { 0, (tipType_t::TIP_TYPE_MAX - 1) > 0 ? (tipType_t::TIP_TYPE_MAX - 1) : 0, 1, 0}, // SolderingTipType - { 0, 1, 1, REVERSE_BUTTON_MENU}, // ReverseButtonMenu + { 0, 1, 1, REVERSE_BUTTON_MENU}, // ReverseButtonMenu +// MIN, MAX, INCREMENT, DEFAULT }; static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength)); From 432b583d899e4208cfe4347af5412ef7f85e33ec Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 18:39:00 +0300 Subject: [PATCH 39/45] translations_definitions.json: ReverseButtonMenu - extend description a bit --- Translations/translations_definitions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index 93d47752..4c1943ed 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -477,7 +477,7 @@ "id": "ReverseButtonMenu", "maxLen": 6, "maxLen2": 15, - "description": "Swaps which buttons are used as Select and which as Scroll/Back in the settings menu." + "description": "Swaps which buttons are used as Enter/Change and which as Scroll/Back in the settings menu." }, { "id": "AnimSpeed", From 035f3dd20554123ca15682d946d9e8509d332d1d Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 19:13:48 +0300 Subject: [PATCH 40/45] Refactoring: trying to find a more suitable variable name to check status if swap buttons in menu is enabled --- source/Core/Threads/GUIThread.cpp | 6 ++--- .../draw_homescreen_simplified.cpp | 22 +++++++++---------- .../mono_96x16/draw_homescreen_simplified.cpp | 22 +++++++++---------- .../UI/logic/utils/shouldDeviceShutdown.cpp | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 4180b5c1..a8b9b903 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -45,7 +45,7 @@ OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass bool d = getSettingValue(SettingsOptions::ReverseButtonMenu); bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); -#ifdef REVERSE_NAV_EVERYWHERE +#ifdef OPT_FULL_BUTTON_REVERSE bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); @@ -117,7 +117,7 @@ OperatingMode guiHandleDraw(void) { newMode = gui_SolderingSleepingMode(buttons, &context); break; case OperatingMode::TemperatureAdjust: -#ifdef REVERSE_NAV_EVERYWHERE +#ifdef OPT_FULL_BUTTON_REVERSE newMode = gui_solderingTempAdjust(getButtonState(), &context); #else newMode = gui_solderingTempAdjust(getButtonState(e), &context); @@ -130,7 +130,7 @@ OperatingMode guiHandleDraw(void) { newMode = performCJCC(buttons, &context); break; case OperatingMode::SettingsMenu: -#ifdef REVERSE_NAV_EVERYWHERE +#ifdef OPT_FULL_BUTTON_REVERSE newMode = gui_SettingsMenu(getButtonState(), &context); #else newMode = gui_SettingsMenu(getButtonState(d), &context); diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 4337de9f..cf69795e 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -9,14 +9,14 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); -#ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonMenu); +#ifdef OPT_FULL_BUTTON_REVERSE + bool swapButtonMenu = getSettingValue(SettingsOptions::ReverseButtonMenu); #endif // Flip and switch buttons accordingly -#ifdef REVERSE_NAV_EVERYWHERE - OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); - OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); +#ifdef OPT_FULL_BUTTON_REVERSE + OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (swapButtonMenu ? buttonBF : buttonAF) : (swapButtonMenu ? buttonB : buttonA)); + OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (swapButtonMenu ? buttonAF : buttonBF) : (swapButtonMenu ? buttonA : buttonB)); #else OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? buttonAF : buttonA); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? buttonBF : buttonB); @@ -26,9 +26,9 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part -#ifdef REVERSE_NAV_EVERYWHERE - OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); +#ifdef OPT_FULL_BUTTON_REVERSE + OLED::fillArea(swapButtonMenu ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area + OLED::setCursor(swapButtonMenu ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); #else OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); @@ -36,13 +36,13 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol -#ifdef REVERSE_NAV_EVERYWHERE - if (isReverse) { +#ifdef OPT_FULL_BUTTON_REVERSE + if (swapButtonMenu) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); -#ifdef REVERSE_NAV_EVERYWHERE +#ifdef OPT_FULL_BUTTON_REVERSE } #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index e740dabe..870ef639 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -8,14 +8,14 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); -#ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonMenu); +#ifdef OPT_FULL_BUTTON_REVERSE + bool swapButtonMenu = getSettingValue(SettingsOptions::ReverseButtonMenu); #endif // Flip and switch buttons accordingly -#ifdef REVERSE_NAV_EVERYWHERE - OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); - OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); +#ifdef OPT_FULL_BUTTON_REVERSE + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (swapButtonMenu ? buttonBF : buttonAF) : (swapButtonMenu ? buttonB : buttonA)); + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (swapButtonMenu ? buttonAF : buttonBF) : (swapButtonMenu ? buttonA : buttonB)); #else OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? buttonAF : buttonA); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? buttonBF : buttonB); @@ -25,9 +25,9 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part -#ifdef REVERSE_NAV_EVERYWHERE - OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area - OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); +#ifdef OPT_FULL_BUTTON_REVERSE + OLED::fillArea(swapButtonMenu ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area + OLED::setCursor(swapButtonMenu ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); #else OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); @@ -35,13 +35,13 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol -#ifdef REVERSE_NAV_EVERYWHERE - if (isReverse) { +#ifdef OPT_FULL_BUTTON_REVERSE + if (swapButtonMenu) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); -#ifdef REVERSE_NAV_EVERYWHERE +#ifdef OPT_FULL_BUTTON_REVERSE } #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index bf9112d8..271285cf 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -17,7 +17,7 @@ bool shouldShutdown(void) { } } } -#ifdef REVERSE_NAV_EVERYWHERE +#ifdef OPT_FULL_BUTTON_REVERSE if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonMenu) == BUTTON_B_LONG) { // allow also if back button is pressed long #else if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long From a7985095ffbb61a2474907f24313ff551c4049cf Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 19:21:34 +0300 Subject: [PATCH 41/45] Refactoring: replace variables with one-letter names --- source/Core/Threads/GUIThread.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index a8b9b903..58cdaf9c 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -41,14 +41,15 @@ OperatingMode currentOperatingMode = OperatingMode::InitialisationDone; // Curre guiContext context; // Context passed to functions to aid in state during render passes OperatingMode handle_post_init_state(); + OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass - bool d = getSettingValue(SettingsOptions::ReverseButtonMenu); - bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); + bool swapButtonMenu = getSettingValue(SettingsOptions::ReverseButtonMenu); + bool swapButtonTemp = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); #ifdef OPT_FULL_BUTTON_REVERSE - bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; + bool isTempAdjust = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state - ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); + ButtonState buttons = getButtonState((swapButtonTemp && isTempAdjust) || (swapButtonMenu && !swapButtonTemp && !isTempAdjust) || (swapButtonMenu && swapButtonTemp && !isTempAdjust)); #else ButtonState buttons = getButtonState(); #endif @@ -120,7 +121,7 @@ OperatingMode guiHandleDraw(void) { #ifdef OPT_FULL_BUTTON_REVERSE newMode = gui_solderingTempAdjust(getButtonState(), &context); #else - newMode = gui_solderingTempAdjust(getButtonState(e), &context); + newMode = gui_solderingTempAdjust(getButtonState(swapButtonTemp), &context); #endif break; case OperatingMode::DebugMenuReadout: @@ -133,7 +134,7 @@ OperatingMode guiHandleDraw(void) { #ifdef OPT_FULL_BUTTON_REVERSE newMode = gui_SettingsMenu(getButtonState(), &context); #else - newMode = gui_SettingsMenu(getButtonState(d), &context); + newMode = gui_SettingsMenu(getButtonState(swapButtonMenu), &context); #endif break; case OperatingMode::InitialisationDone: @@ -153,6 +154,7 @@ OperatingMode guiHandleDraw(void) { }; return newMode; } + void guiRenderLoop(void) { OperatingMode newMode = guiHandleDraw(); // This does the screen drawing From d78dcb471df878f6419b238e9f963430754355d3 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 19:33:46 +0300 Subject: [PATCH 42/45] Refactoring: clang-format for comments in settings struct --- source/Core/Src/Settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 0e44f4f6..d7adf782 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -54,7 +54,7 @@ typedef struct { } SettingConstants; static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = { -// MIN, MAX, INCREMENT, DEFAULT + // MIN, MAX, INCREMENT, DEFAULT { MIN_TEMP_C, MAX_TEMP_F, 5, SOLDERING_TEMP}, // SolderingTemp { MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp { 0, 15, 1, SLEEP_TIME}, // SleepTime @@ -111,7 +111,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp { 0, 12, 1, 0}, // HallEffectSleepTime { 0, (tipType_t::TIP_TYPE_MAX - 1) > 0 ? (tipType_t::TIP_TYPE_MAX - 1) : 0, 1, 0}, // SolderingTipType { 0, 1, 1, REVERSE_BUTTON_MENU}, // ReverseButtonMenu -// MIN, MAX, INCREMENT, DEFAULT + // MIN, MAX, INCREMENT, DEFAULT }; static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength)); From 768668d78b8d92fe78f99bd142d5c9cb361c0d14 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 19:50:03 +0300 Subject: [PATCH 43/45] Refactoring: Buttons - rename revert to swapButtonMenu --- source/Core/Drivers/Buttons.cpp | 6 +++--- source/Core/Drivers/Buttons.hpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/Core/Drivers/Buttons.cpp b/source/Core/Drivers/Buttons.cpp index 8e08d47f..1fcc9a25 100644 --- a/source/Core/Drivers/Buttons.cpp +++ b/source/Core/Drivers/Buttons.cpp @@ -11,7 +11,7 @@ #include TickType_t lastButtonTime = 0; -ButtonState getButtonState(bool revert) { +ButtonState getButtonState(bool swapButtonMenu) { /* * Read in the buttons and then determine if a state change needs to occur */ @@ -28,8 +28,8 @@ ButtonState getButtonState(bool revert) { static TickType_t previousStateChange = 0; const TickType_t timeout = TICKS_100MS * 4; uint8_t currentState; - currentState = (getButtonA()) << (0 xor revert); - currentState |= (getButtonB()) << (1 xor revert); + currentState = (getButtonA()) << (0 xor swapButtonMenu); + currentState |= (getButtonB()) << (1 xor swapButtonMenu); if (currentState) { lastButtonTime = xTaskGetTickCount(); diff --git a/source/Core/Drivers/Buttons.hpp b/source/Core/Drivers/Buttons.hpp index e85d7112..2b82ecf5 100644 --- a/source/Core/Drivers/Buttons.hpp +++ b/source/Core/Drivers/Buttons.hpp @@ -27,7 +27,8 @@ enum ButtonState { }; // Returns what buttons are pressed (if any) -ButtonState getButtonState(bool revert=0); +ButtonState getButtonState(bool swapButtonMenu = 0); + // Helpers void waitForButtonPressOrTimeout(TickType_t timeout); void waitForButtonPress(); From 362713ae568cfe899dcd01c1aa0bd3a0cbe35353 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 20:00:07 +0300 Subject: [PATCH 44/45] Translations: clarify the description of the option --- Translations/translation_CS.json | 2 +- Translations/translation_DA.json | 2 +- Translations/translation_DE.json | 2 +- Translations/translation_EL.json | 2 +- Translations/translation_EN.json | 2 +- Translations/translation_ES.json | 2 +- Translations/translation_ET.json | 2 +- Translations/translation_FI.json | 2 +- Translations/translation_HR.json | 2 +- Translations/translation_HU.json | 2 +- Translations/translation_IT.json | 2 +- Translations/translation_JA_JP.json | 2 +- Translations/translation_LT.json | 2 +- Translations/translation_NB.json | 2 +- Translations/translation_NL.json | 2 +- Translations/translation_NL_BE.json | 2 +- Translations/translation_PT.json | 2 +- Translations/translation_RO.json | 2 +- Translations/translation_RU.json | 2 +- Translations/translation_SK.json | 2 +- Translations/translation_SL.json | 2 +- Translations/translation_SR_CYRL.json | 2 +- Translations/translation_SR_LATN.json | 2 +- Translations/translation_SV.json | 2 +- Translations/translation_TR.json | 2 +- Translations/translation_UZ.json | 2 +- Translations/translation_VI.json | 2 +- Translations/translation_YUE_HK.json | 2 +- Translations/translation_ZH_CN.json | 2 +- Translations/translation_ZH_TW.json | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index 4f9deacb..1d1f424f 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nrychlost", diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json index 869719b5..16c0fe5f 100644 --- a/Translations/translation_DA.json +++ b/Translations/translation_DA.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nHastighed", diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index fd34112e..2c94c0cd 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nGeschw.", diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json index dc6fec99..ab4a7420 100644 --- a/Translations/translation_EL.json +++ b/Translations/translation_EL.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Ταχύτητα\nκιν. εικονιδ.", diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index 2f88e76c..784bad06 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json index 65e50bdb..7010b782 100644 --- a/Translations/translation_ES.json +++ b/Translations/translation_ES.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nvelocidad", diff --git a/Translations/translation_ET.json b/Translations/translation_ET.json index 3ad04086..70af9e55 100644 --- a/Translations/translation_ET.json +++ b/Translations/translation_ET.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nkiirus", diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json index eab48847..7c40a6ca 100644 --- a/Translations/translation_FI.json +++ b/Translations/translation_FI.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Animaation\nnopeus", diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json index 9b6ecaa5..b511c12e 100644 --- a/Translations/translation_HR.json +++ b/Translations/translation_HR.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Brzina\nanimacije", diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json index d8e6105e..f691dc2d 100644 --- a/Translations/translation_HU.json +++ b/Translations/translation_HU.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Animáció\nsebessége", diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index 8f19a621..c1b39bf1 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Inversione\ntasti A/B", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Velocità\nanimazioni", diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json index 4d59bd0e..a708e1c9 100644 --- a/Translations/translation_JA_JP.json +++ b/Translations/translation_JA_JP.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "動画の速度", diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json index c7b541e8..51f061a9 100644 --- a/Translations/translation_LT.json +++ b/Translations/translation_LT.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Animacijų\ngreitis", diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json index e84ffc4d..1a54d86c 100644 --- a/Translations/translation_NB.json +++ b/Translations/translation_NB.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nhastighet", diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json index e5f148e6..f3252b16 100644 --- a/Translations/translation_NL.json +++ b/Translations/translation_NL.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nsnelheid", diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json index 82795fc9..34e517a1 100644 --- a/Translations/translation_NL_BE.json +++ b/Translations/translation_NL_BE.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nsnelheid", diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json index c9184420..58ea7759 100644 --- a/Translations/translation_PT.json +++ b/Translations/translation_PT.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Velocidade\nde animação", diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json index 033355c6..9f5c92e5 100644 --- a/Translations/translation_RO.json +++ b/Translations/translation_RO.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Animaţii\nviteză", diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index 80b5e3d9..c4a12c3f 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Скорость\nанимации", diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json index 4def651d..9c1d6729 100644 --- a/Translations/translation_SK.json +++ b/Translations/translation_SK.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Rýchlosť\nanimácií", diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json index 94ad220c..754381d3 100644 --- a/Translations/translation_SL.json +++ b/Translations/translation_SL.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json index 790943ce..d1f59f89 100644 --- a/Translations/translation_SR_CYRL.json +++ b/Translations/translation_SR_CYRL.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json index f0d4ba7d..ff969ce0 100644 --- a/Translations/translation_SR_LATN.json +++ b/Translations/translation_SR_LATN.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\nspeed", diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json index 55f18da7..301033fe 100644 --- a/Translations/translation_SV.json +++ b/Translations/translation_SV.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.-\nhastighet", diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json index a9b526a1..27cb6de8 100644 --- a/Translations/translation_TR.json +++ b/Translations/translation_TR.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Animasyon\nHızı", diff --git a/Translations/translation_UZ.json b/Translations/translation_UZ.json index ea42b5a7..67c640cd 100644 --- a/Translations/translation_UZ.json +++ b/Translations/translation_UZ.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Anim.\ntezligi", diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json index 27f05eb1..2e0dc5ae 100644 --- a/Translations/translation_VI.json +++ b/Translations/translation_VI.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "Toc đo\nhoat anh", diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json index 4e84a87b..3c3ff60f 100644 --- a/Translations/translation_YUE_HK.json +++ b/Translations/translation_YUE_HK.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "動畫速度", diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 42188079..5996ffb0 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "动画速度", diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json index 2d36c9a6..d45b2a3d 100644 --- a/Translations/translation_ZH_TW.json +++ b/Translations/translation_ZH_TW.json @@ -277,7 +277,7 @@ }, "ReverseButtonMenu": { "displayText": "Swap\nA/B keys", - "description": "Reverse assignment of buttons for menu navigation" + "description": "Reverse assignment of buttons for Settings menu" }, "AnimSpeed": { "displayText": "動畫速度", From 0ede3ec68738516f948147839e93de67397c80e3 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 17 Feb 2025 20:46:29 +0300 Subject: [PATCH 45/45] Translation.h: reorder items in SettingsItemIndex properly and add the comment --- source/Core/Inc/Translation.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index d412e48c..9aa51a84 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -54,6 +54,11 @@ extern const char *DebugMenu[]; extern const char *AccelTypeNames[]; extern const char *PowerSourceNames[]; +/* ! + * The order of the items inside this enum class SettingsItemIndex + * must be the same as the order of the related items + * in the "menuOptions" section of translations_definitions.json file. + */ enum class SettingsItemIndex : uint8_t { DCInCutoff, MinVolCell, @@ -90,6 +95,7 @@ enum class SettingsItemIndex : uint8_t { CooldownBlink, ScrollingSpeed, ReverseButtonTempChange, + ReverseButtonMenu, AnimSpeed, AnimLoop, Brightness, @@ -107,7 +113,6 @@ enum class SettingsItemIndex : uint8_t { SettingsReset, LanguageSwitch, SolderingTipType, - ReverseButtonMenu, NUM_ITEMS, };