From 712c8f99da9445b200c34da9d2ecbd3cf61f1d59 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Tue, 3 Dec 2024 01:46:44 +0300 Subject: [PATCH 01/28] scripts/deploy.sh: add test for links to stable builds in README --- scripts/deploy.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index de5844f5..3f34e5b6 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -90,6 +90,20 @@ docs_history() return "${ret}" } +# Check for links to release builds in README.md +docs_links() +{ + ver_git="$(git tag -l | sort | grep -e "^v" | grep -v "rc" | tail -1)" + md="README.md" + ver_md="$(grep -c "${ver_git}" "${md}")" + ret=0 + if [ "${ver_md}" -ne 0 ]; then + ret=1 + echo "Please, update mention & links in ${md} inside Builds section for release builds with version ${ver_git}." + fi; + return "${ret}" +} + # source/Makefile:ALL_LANGUAGES & Translations/*.json automagical routine build_langs() { @@ -191,7 +205,9 @@ if [ "docs" = "${cmd}" ]; then hist="${?}" build_langs langs="${?}" - if [ "${readme}" -eq 0 ] && [ "${hist}" -eq 0 ] && [ "${langs}" -eq 0 ]; then + docs_links + links="${?}" + if [ "${readme}" -eq 0 ] && [ "${hist}" -eq 0 ] && [ "${langs}" -eq 0 ] && [ "${links}" -eq 0 ]; then ret=0 else ret=1 @@ -218,6 +234,11 @@ if [ "build_langs" = "${cmd}" ]; then exit "${?}" fi; +if [ "docs_links" = "${cmd}" ]; then + docs_links + exit "${?}" +fi; + if [ "check_style_file" = "${cmd}" ]; then check_style_file "${2}" exit "${?}" From af852c194cbb6fded33466aeaade55579ae3cbbe Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 7 Dec 2024 14:21:10 +1100 Subject: [PATCH 02/28] Update translation_ZH_CN.json --- Translations/translation_ZH_CN.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 2b93b87e..2c09b34c 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -46,10 +46,10 @@ "message": "电压过低" }, "UndervoltageString": { - "message": "Undervoltage" + "message": "Undervoltage\n" }, "InputVoltageString": { - "message": "VIN: " + "message": "VIN: \n" }, "SleepingAdvancedString": { "message": "Zzzz..." From 5f96309f9c5ace2814d07a82c0e69427fc1d331d Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" <5425387+Ralim@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:37:06 +1100 Subject: [PATCH 03/28] Update version for RC-1 --- source/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/version.h b/source/version.h index 74ffad74..c2320b9d 100644 --- a/source/version.h +++ b/source/version.h @@ -21,4 +21,4 @@ * * BUILD_VERSION = 'v2.22' -> from stable git release: 'v2.22R.5E6F7G8H' */ -#define BUILD_VERSION "v2.22" +#define BUILD_VERSION "v2.23" From d64acac4d6f93ca60c028ebba5774b5c6ecfcf5a Mon Sep 17 00:00:00 2001 From: fredericuslaurentii <157758058+fredericuslaurentii@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:06:45 +0100 Subject: [PATCH 04/28] Update translation_IT.json --- Translations/translation_IT.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index 29c08e6d..7c228e6c 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -116,13 +116,13 @@ "displayText": "Modalità\nsicura" }, "TipTypeAuto": { - "displayText": "Auto\nSense" + "displayText": "Rilevaz.\nauto" }, "TipTypeT12Long": { - "displayText": "TS100\nLong" + "displayText": "TS100\nlunga" }, "TipTypeT12Short": { - "displayText": "Pine\nShort" + "displayText": "Pine\ncorta" }, "TipTypeT12PTS": { "displayText": "PTS\n200" @@ -177,7 +177,7 @@ }, "ProfilePhases": { "displayText": "Fasi modalità\nprofilo", - "description": "Imposta il numero di fasi da attuare per un profilo di riscaldamento personalizzato" + "description": "Imposta il numero di fasi da implementare per un profilo di riscaldamento personalizzato" }, "ProfilePreheatTemp": { "displayText": "Temperatura\npreriscaldamento", @@ -340,8 +340,8 @@ "description": "" }, "SolderingTipType": { - "displayText": "Soldering\nTip Type", - "description": "Select the tip type fitted" + "displayText": "Tipo di\npunta", + "description": "Seleziona il modello della punta in uso" } } } From 6e968b7110c250235a0692dc42d36057c0ebf39e Mon Sep 17 00:00:00 2001 From: fredericuslaurentii <157758058+fredericuslaurentii@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:14:49 +0100 Subject: [PATCH 05/28] Update translation_IT.json --- Translations/translation_IT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index 7c228e6c..79906b83 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -149,7 +149,7 @@ }, "PDNegTimeout": { "displayText": "Abilitazione\nUSB PD", - "description": "Regola il massimo tempo utile per la negoziazione del protocollo USB Power Delivery con alimentatori compatibili [0: disattiva; multipli di 100 ms]" + "description": "Imposta il tempo di negoziazione del protocollo USB Power Delivery con alimentatori compatibili [0: disattiva; multipli di 100 ms]" }, "USBPDMode": { "displayText": "PD\nMode", From 38ebf2be69d2ca965b8aee5f760fdebbcc115a49 Mon Sep 17 00:00:00 2001 From: KT <79413138+KevinTong9@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:03:59 +0800 Subject: [PATCH 06/28] improve zh_cn translation (#2019) * improve zh_cn translation * remove \n * Update translation_ZH_CN.json * Update translation_ZH_CN.json --------- Co-authored-by: discip <53649486+discip@users.noreply.github.com> --- Translations/translation_ZH_CN.json | 84 ++++++++++++++--------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 2c09b34c..68561281 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -46,7 +46,7 @@ "message": "电压过低" }, "UndervoltageString": { - "message": "Undervoltage\n" + "message": "欠压" }, "InputVoltageString": { "message": "VIN: \n" @@ -58,16 +58,16 @@ "message": "<--- " }, "ProfilePreheatString": { - "message": "Preheat" + "message": "预热中" }, "ProfileCooldownString": { - "message": "Cooldown" + "message": "冷却" }, "DeviceFailedValidationWarning": { "message": "这支电烙铁很有可能是冒牌货!" }, "TooHotToStartProfileWarning": { - "message": "Too hot to start profile" + "message": "设备过热" } }, "characters": { @@ -107,16 +107,16 @@ }, "menuValues": { "USBPDModeDefault": { - "displayText": "Default\nMode" + "displayText": "默认模式" }, "USBPDModeNoDynamic": { "displayText": "No\nDynamic" }, "USBPDModeSafe": { - "displayText": "Safe\nMode" + "displayText": "安全模式" }, "TipTypeAuto": { - "displayText": "Auto\nSense" + "displayText": "自动检测" }, "TipTypeT12Long": { "displayText": "TS100\nLong" @@ -152,7 +152,7 @@ "description": "设定USB-PD协议交涉的超时时限;为兼容某些QC电源而设 " }, "USBPDMode": { - "displayText": "PD VPDO", + "displayText": "PD\nVPDO", "description": "启用PPS和EPR快充支持" }, "BoostTemperature": { @@ -176,60 +176,60 @@ "description": "焊接模式时,同时长按两个按键启用按键锁定 <增=只容许增热模式 | 全=完全锁定>" }, "ProfilePhases": { - "displayText": "Profile Phases", - "description": "Number of phases in profile mode" + "displayText": "配置阶数", + "description": "配置模式下的阶段数量" }, "ProfilePreheatTemp": { - "displayText": "Preheat Temp", - "description": "Preheat to this temperature at the start of profile mode" + "displayText": "预热温度", + "description": "配置开始时的目标温度" }, "ProfilePreheatSpeed": { - "displayText": "Preheat Speed", - "description": "Preheat at this rate (degrees per second)" + "displayText": "预热速度", + "description": "将以此速度进行预热 (度/秒)" }, "ProfilePhase1Temp": { - "displayText": "Phase 1 Temp", - "description": "Target temperature for the end of this phase" + "displayText": "阶段1温度", + "description": "此阶段结束时的目标温度" }, "ProfilePhase1Duration": { - "displayText": "Phase 1 Duration", - "description": "Target duration of this phase (seconds)" + "displayText": "阶段1时间", + "description": "此阶段的目标持续时间(秒)" }, "ProfilePhase2Temp": { - "displayText": "Phase 2 Temp", - "description": "" + "displayText": "阶段2温度", + "description": "此阶段结束时的目标温度" }, "ProfilePhase2Duration": { - "displayText": "Phase 2 Duration", - "description": "" + "displayText": "阶段2时间", + "description": "此阶段的目标持续时间(秒)" }, "ProfilePhase3Temp": { - "displayText": "Phase 3 Temp", - "description": "" + "displayText": "阶段3温度", + "description": "此阶段结束时的目标温度" }, "ProfilePhase3Duration": { - "displayText": "Phase 3 Duration", - "description": "" + "displayText": "阶段3时间", + "description": "此阶段的目标持续时间(秒)" }, "ProfilePhase4Temp": { - "displayText": "Phase 4 Temp", - "description": "" + "displayText": "阶段4温度", + "description": "此阶段结束时的目标温度" }, "ProfilePhase4Duration": { - "displayText": "Phase 4 Duration", - "description": "" + "displayText": "阶段4时间", + "description": "此阶段的目标持续时间(秒)" }, "ProfilePhase5Temp": { - "displayText": "Phase 5 Temp", - "description": "" + "displayText": "阶段5温度", + "description": "此阶段结束时的目标温度" }, "ProfilePhase5Duration": { - "displayText": "Phase 5 Duration", - "description": "" + "displayText": "阶段5时间", + "description": "此阶段的目标持续时间(秒)" }, "ProfileCooldownSpeed": { - "displayText": "Cooldown Speed", - "description": "Cooldown at this rate at the end of profile mode (degrees per second)" + "displayText": "冷却速度", + "description": "在配置模式结束时以此速度进行冷却(度/秒)" }, "MotionSensitivity": { "displayText": "动作灵敏度", @@ -252,8 +252,8 @@ "description": "霍尔效应传感器用作启动待机模式的灵敏度 <1=最低灵敏度 | ... | 9=最高灵敏度>" }, "HallEffSleepTimeout": { - "displayText": "HallSensor\nSleepTime", - "description": "Interval before \"sleep mode\" starts when hall effect is above threshold" + "displayText": "霍尔传感器休眠时间", + "description": "当霍尔传感器检测值高于阈值时,进入“睡眠模式”前的间隔时间" }, "TemperatureUnit": { "displayText": "温度单位", @@ -316,7 +316,7 @@ "description": "在下次重启时校正烙铁头热电偶冷接点补偿值(CJC)(温差小于5摄氏度时无需校正)" }, "VoltageCalibration": { - "displayText": "输入电压校正?", + "displayText": "输入电压校正", "description": "开始校正输入电压(VIN)<长按以退出>" }, "PowerPulsePower": { @@ -332,7 +332,7 @@ "description": "为保持电源处于唤醒状态,每次通电脉冲的时间长度 " }, "SettingsReset": { - "displayText": "全部重置?", + "displayText": "全部重置", "description": "将所有设定重置为默认值" }, "LanguageSwitch": { @@ -340,8 +340,8 @@ "description": "" }, "SolderingTipType": { - "displayText": "Soldering\nTip Type", - "description": "Select the tip type fitted" + "displayText": "焊接头类型", + "description": "选择安装合适的尖端类型" } } } From e26c8cc177ea36888002cb79cfc8b068e2aeb252 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:37:47 +0100 Subject: [PATCH 07/28] changed `Devel Build` => `Development Build` (#2022) Changed `Devel Build` => **`Development Build`** --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c88875c..1f1a8453 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ The links in the table below allow to download available builds directly. Current stable release is `v2.22`. _Devel builds_ **dynamically** provide _**the latest successful build**_ from **`dev`** branch. -| Device | Stable Release | Devel Build | +| Device | Stable Release | Development Build | |:---------------------:|:--------------:|:-----------:| | Pinecil V1 | [Pinecil.zip](https://github.com/Ralim/IronOS/releases/download/v2.22/Pinecil.zip) | [Pinecil.zip](https://nightly.link/Ralim/IronOS/workflows/push/dev/Pinecil.zip) | | Pinecil V1/multilang | [Pinecil_multi-lang.zip](https://github.com/Ralim/IronOS/releases/download/v2.22/Pinecil_multi-lang.zip) | [Pinecil_multi-lang.zip](https://nightly.link/Ralim/IronOS/workflows/push/dev/Pinecil_multi-lang.zip) | From 18bf4318451d1deda8ea89e906e7938d432df6df Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:42:12 +0100 Subject: [PATCH 08/28] adjusted lowest brightness threshold for TS101 (#2017) --- source/Core/BSP/Miniware/configuration.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index 913883e1..a873bcc4 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -63,8 +63,13 @@ * OLED Brightness * */ -#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable -#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable +#if defined(MODEL_TS101) + #define MIN_BRIGHTNESS 1 // Min OLED brightness selectable + #define MAX_BRIGHTNESS 101 // Max OLED brightness selectable +#else + #define MIN_BRIGHTNESS 0 // Min OLED brightness selectable + #define MAX_BRIGHTNESS 100 // Max OLED brightness selectable +#endif #define BRIGHTNESS_STEP 25 // OLED brightness increment #define DEFAULT_BRIGHTNESS 25 // default OLED brightness From 142d936b45721a2c7bb7ffe6c99cb9134a3dc2d1 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 16 Dec 2024 02:28:27 +0300 Subject: [PATCH 09/28] README.md: rename develop builds to development builds in the description to unify terminology (follow up for #2022) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1f1a8453..57d870b1 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,10 @@ For notes on installation for your device, please refer to the flashing guide fo The links in the table below allow to download available builds directly. Current stable release is `v2.22`. -_Devel builds_ **dynamically** provide _**the latest successful build**_ from **`dev`** branch. +_Development builds_ **dynamically** provide _**the latest successful build**_ from **`dev`** branch. | Device | Stable Release | Development Build | -|:---------------------:|:--------------:|:-----------:| +|:---------------------:|:--------------:|:-----------------:| | Pinecil V1 | [Pinecil.zip](https://github.com/Ralim/IronOS/releases/download/v2.22/Pinecil.zip) | [Pinecil.zip](https://nightly.link/Ralim/IronOS/workflows/push/dev/Pinecil.zip) | | Pinecil V1/multilang | [Pinecil_multi-lang.zip](https://github.com/Ralim/IronOS/releases/download/v2.22/Pinecil_multi-lang.zip) | [Pinecil_multi-lang.zip](https://nightly.link/Ralim/IronOS/workflows/push/dev/Pinecil_multi-lang.zip) | | Pinecil V2 | [PinecilV2.zip](https://github.com/Ralim/IronOS/releases/download/v2.22/PinecilV2.zip) | [PinecilV2.zip](https://nightly.link/Ralim/IronOS/workflows/push/dev/Pinecilv2.zip) | From d627459e183f72a0da97e993d87eb41352853738 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 16 Dec 2024 02:31:43 +0300 Subject: [PATCH 10/28] README.md: unification of Development Build term --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57d870b1..7255cc2a 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ For notes on installation for your device, please refer to the flashing guide fo The links in the table below allow to download available builds directly. Current stable release is `v2.22`. -_Development builds_ **dynamically** provide _**the latest successful build**_ from **`dev`** branch. +_Development Build_ **dynamically** provides _**the latest successful build**_ from **`dev`** branch. | Device | Stable Release | Development Build | |:---------------------:|:--------------:|:-----------------:| From c41c473289b51e55401f71e79622fc84e3fc5933 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 16 Dec 2024 02:38:55 +0300 Subject: [PATCH 11/28] README.md: use markdown list for build types in the builds description --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7255cc2a..6d4fee8d 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,9 @@ For notes on installation for your device, please refer to the flashing guide fo ## Builds -The links in the table below allow to download available builds directly. - -Current stable release is `v2.22`. -_Development Build_ **dynamically** provides _**the latest successful build**_ from **`dev`** branch. +The links in the table below allow to download available builds directly: +- current _Stable Release_ is **`v2.22`**; +- _Development Build_ **dynamically** provides _**the latest successful build**_ from **`dev`** branch. | Device | Stable Release | Development Build | |:---------------------:|:--------------:|:-----------------:| From 9ddf5c27c37dd37622f1cf062033b8d6410523bd Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Fri, 20 Dec 2024 00:47:34 +0300 Subject: [PATCH 12/28] Update ru translation --- Translations/translation_RU.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index b1139951..81dac2ef 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -116,19 +116,19 @@ "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" }, "TipTypeTS80": { - "displayText": "TS80\n" + "displayText": "TS80(P)\n" }, "TipTypeJBCC210": { "displayText": "JBC\nC210" @@ -252,8 +252,8 @@ "description": "Чувствительность датчика Холла к магнитному полю (1=мин. | ... | 9=макс.)" }, "HallEffSleepTimeout": { - "displayText": "HallSensor\nSleepTime", - "description": "Интервал перед запуском \"спящего режима\", когда эффект Холла превышает пороговое значение" + "displayText": "Интервал\nдатчика Холла", + "description": "Время между превышением датчиком Холла порогового значения и режимом сна" }, "TemperatureUnit": { "displayText": "Единицы\nизмерения", @@ -340,8 +340,8 @@ "description": "" }, "SolderingTipType": { - "displayText": "Soldering\nTip Type", - "description": "Select the tip type fitted" + "displayText": "Тип\nжала", + "description": "Выбор типа установленного жала" } } } From 6cc8b8184e308e29a3eee8ce2f3d3533ca586dce Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 7 Dec 2024 12:50:16 +1100 Subject: [PATCH 13/28] WiP Thermal rewrite --- .gitignore | 1 + source/Core/Threads/PIDThread.cpp | 67 +++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index c8e8df7f..dac85f24 100644 --- a/.gitignore +++ b/.gitignore @@ -215,3 +215,4 @@ Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/ # Tests/linters/sanitizers source/check-style.log +.ash_history diff --git a/source/Core/Threads/PIDThread.cpp b/source/Core/Threads/PIDThread.cpp index 83c53efd..4927bb47 100644 --- a/source/Core/Threads/PIDThread.cpp +++ b/source/Core/Threads/PIDThread.cpp @@ -30,7 +30,7 @@ int32_t powerSupplyWattageLimit = 0; bool heaterThermalRunaway = false; static int32_t getPIDResultX10Watts(TemperatureType_t set_point, TemperatureType_t current_value); -static void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const TemperatureType_t tError); +static void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const uint32_t x10WattsOut) ; static void setOutputx10WattsViaFilters(int32_t x10Watts); static int32_t getX10WattageLimits(); @@ -92,8 +92,8 @@ void startPIDTask(void const *argument __unused) { PIDTempTarget = TipThermoModel::getTipMaxInC(); } - detectThermalRunaway(currentTipTempInC, PIDTempTarget - currentTipTempInC); x10WattsOut = getPIDResultX10Watts(PIDTempTarget, currentTipTempInC); + detectThermalRunaway(currentTipTempInC,x10WattsOut); } else { detectThermalRunaway(currentTipTempInC, 0); } @@ -228,31 +228,54 @@ int32_t getPIDResultX10Watts(TemperatureType_t set_point, TemperatureType_t curr #endif } -void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const TemperatureType_t tError) { - static TemperatureType_t tipTempCRunawayTemp = 0; - static TickType_t runawaylastChangeTime = 0; +/* + * Detection of thermal runaway + * The goal of this is to handle cases where something has gone wrong + * 1. The tip MOSFET is broken, so power is being constantly applied to the tip + * a. This can show as temp being stuck at max + * b. Or temp rising when the heater is off + * 2. Broken temperature sense + * a. Temp is stuck at a value + * These boil down to either a constantly rising temperature or a temperature that is stuck at a value + * These are both covered; but looking at the eye/delta between min and max temp seen + */ +void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const uint32_t x10WattsOut) { - // Check for thermal runaway, where it has been x seconds with negligible (y) temp rise - // While trying to actively heat + static TemperatureType_t tiptempMin = 0xFFFF; // Min tip temp seen + static TemperatureType_t tipTempMax = 0; // Max tip temp seen while heater is on + bool thisCycleIsHeating = x10WattsOut > 0; + static TickType_t heatCycleStart = 0; - // If we are more than 20C below the setpoint - if ((tError > THERMAL_RUNAWAY_TEMP_C)) { + static bool haveSeenDelta = false; - // If we have heated up by more than 20C since last sample point, snapshot time and tip temp - TemperatureType_t delta = currentTipTempInC - tipTempCRunawayTemp; - if (delta > THERMAL_RUNAWAY_TEMP_C) { - // We have heated up more than the threshold, reset the timer - tipTempCRunawayTemp = currentTipTempInC; - runawaylastChangeTime = xTaskGetTickCount(); - } else { - if ((xTaskGetTickCount() - runawaylastChangeTime) > (THERMAL_RUNAWAY_TIME_SEC * TICKS_SECOND)) { - // It has taken too long to rise + if (haveSeenDelta) { + return; + } + + if (currentTipTempInC < tiptempMin) { + tiptempMin = currentTipTempInC; + } + if (thisCycleIsHeating && currentTipTempInC > tipTempMax) { + tipTempMax = currentTipTempInC; + } + if (thisCycleIsHeating) { + if (heatCycleStart == 0) { + heatCycleStart = xTaskGetTickCount(); + } + } else { + heatCycleStart = 0; + } + + if ((xTaskGetTickCount() - heatCycleStart) > (THERMAL_RUNAWAY_TIME_SEC * TICKS_SECOND)) { + if (tipTempMax > tiptempMin) { + // Have been heating for min seconds, check if the delta is large enough + TemperatureType_t delta = tipTempMax - tiptempMin; + haveSeenDelta = true; + + if (delta < THERMAL_RUNAWAY_TEMP_C) { heaterThermalRunaway = true; } } - } else { - tipTempCRunawayTemp = currentTipTempInC; - runawaylastChangeTime = xTaskGetTickCount(); } } @@ -308,4 +331,4 @@ void setOutputx10WattsViaFilters(int32_t x10WattsOut) { #endif setTipX10Watts(x10WattsOut); resetWatchdog(); -} \ No newline at end of file +} From d313f62101bd866e7a438c25f275fae59c8f82dd Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 7 Dec 2024 13:11:12 +1100 Subject: [PATCH 14/28] Fomatting and adjust setpoint --- source/Core/BSP/MHP30/configuration.h | 4 ++-- source/Core/BSP/Miniware/configuration.h | 2 +- source/Core/BSP/Pinecil/configuration.h | 2 +- source/Core/BSP/Pinecilv2/configuration.h | 2 +- source/Core/BSP/Sequre/configuration.h | 8 ++++---- source/Core/Threads/PIDThread.cpp | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h index a2d5910b..8698a857 100644 --- a/source/Core/BSP/MHP30/configuration.h +++ b/source/Core/BSP/MHP30/configuration.h @@ -103,8 +103,8 @@ #define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0 // Due to large thermal mass of the PCB being heated we need to pull this back a bit -#define THERMAL_RUNAWAY_TIME_SEC 45 -#define THERMAL_RUNAWAY_TEMP_C 3 +#define THERMAL_RUNAWAY_TIME_SEC 20 +#define THERMAL_RUNAWAY_TEMP_C 2 #define CUT_OUT_SETTING 0 // default to no cut-off voltage #define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33)) diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index a873bcc4..44ef5d66 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -109,7 +109,7 @@ #define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0 #define THERMAL_RUNAWAY_TIME_SEC 20 -#define THERMAL_RUNAWAY_TEMP_C 10 +#define THERMAL_RUNAWAY_TEMP_C 3 #define CUT_OUT_SETTING 0 // default to no cut-off voltage #define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33)) diff --git a/source/Core/BSP/Pinecil/configuration.h b/source/Core/BSP/Pinecil/configuration.h index fe04595b..bef59a93 100644 --- a/source/Core/BSP/Pinecil/configuration.h +++ b/source/Core/BSP/Pinecil/configuration.h @@ -104,7 +104,7 @@ #define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0 #define THERMAL_RUNAWAY_TIME_SEC 20 -#define THERMAL_RUNAWAY_TEMP_C 20 +#define THERMAL_RUNAWAY_TEMP_C 3 #define CUT_OUT_SETTING 0 // default to no cut-off voltage #define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33)) diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 8ca4ff40..3f7aa52e 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -105,7 +105,7 @@ #define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0 #define THERMAL_RUNAWAY_TIME_SEC 20 -#define THERMAL_RUNAWAY_TEMP_C 20 +#define THERMAL_RUNAWAY_TEMP_C 3 #define CUT_OUT_SETTING 0 // default to no cut-off voltage #define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33)) diff --git a/source/Core/BSP/Sequre/configuration.h b/source/Core/BSP/Sequre/configuration.h index be3c9f6b..df06f68e 100644 --- a/source/Core/BSP/Sequre/configuration.h +++ b/source/Core/BSP/Sequre/configuration.h @@ -133,7 +133,7 @@ #define TEMP_uV_LOOKUP_S60 #define USB_PD_VMAX 12 // Maximum voltage for PD to negotiate #define THERMAL_RUNAWAY_TIME_SEC 20 -#define THERMAL_RUNAWAY_TEMP_C 10 +#define THERMAL_RUNAWAY_TEMP_C 3 #define HARDWARE_MAX_WATTAGE_X10 600 @@ -167,7 +167,7 @@ #define TEMP_uV_LOOKUP_S60 #define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate #define THERMAL_RUNAWAY_TIME_SEC 20 -#define THERMAL_RUNAWAY_TEMP_C 10 +#define THERMAL_RUNAWAY_TEMP_C 3 #define HARDWARE_MAX_WATTAGE_X10 600 @@ -218,8 +218,8 @@ #define TIP_THERMAL_MASS 30 // X10 watts to raise 1 deg C in 1 second #define TIP_THERMAL_INERTIA 10 // We use a large inertia value to smooth out the drive to the tip since its stupidly sensitive -#define THERMAL_RUNAWAY_TIME_SEC 60 -#define THERMAL_RUNAWAY_TEMP_C 3 +#define THERMAL_RUNAWAY_TIME_SEC 30 +#define THERMAL_RUNAWAY_TEMP_C 2 #define COPPER_HEATER_COIL 1 // Have a heater coil that changes resistance on us #define TIP_RESISTANCE 52 // PCB heater, measured at ~19C. Will shift by temp a decent amount diff --git a/source/Core/Threads/PIDThread.cpp b/source/Core/Threads/PIDThread.cpp index 4927bb47..b928692c 100644 --- a/source/Core/Threads/PIDThread.cpp +++ b/source/Core/Threads/PIDThread.cpp @@ -30,7 +30,7 @@ int32_t powerSupplyWattageLimit = 0; bool heaterThermalRunaway = false; static int32_t getPIDResultX10Watts(TemperatureType_t set_point, TemperatureType_t current_value); -static void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const uint32_t x10WattsOut) ; +static void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const uint32_t x10WattsOut); static void setOutputx10WattsViaFilters(int32_t x10Watts); static int32_t getX10WattageLimits(); @@ -93,7 +93,7 @@ void startPIDTask(void const *argument __unused) { } x10WattsOut = getPIDResultX10Watts(PIDTempTarget, currentTipTempInC); - detectThermalRunaway(currentTipTempInC,x10WattsOut); + detectThermalRunaway(currentTipTempInC, x10WattsOut); } else { detectThermalRunaway(currentTipTempInC, 0); } From cfa2591db31bccefe72eb1798868de160680cd01 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 7 Dec 2024 14:21:28 +1100 Subject: [PATCH 15/28] Update Soldering.cpp --- source/Core/Threads/UI/logic/Soldering.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/Core/Threads/UI/logic/Soldering.cpp b/source/Core/Threads/UI/logic/Soldering.cpp index 50508025..45483d15 100644 --- a/source/Core/Threads/UI/logic/Soldering.cpp +++ b/source/Core/Threads/UI/logic/Soldering.cpp @@ -138,9 +138,7 @@ OperatingMode gui_solderingMode(const ButtonState buttons, guiContext *cxt) { // Draw in the screen details if (getSettingValue(SettingsOptions::DetailedSoldering)) { - ui_draw_soldering_power_status(cxt->scratch_state.state2); - } else { ui_draw_soldering_basic_status(cxt->scratch_state.state2); } From 8f05433be231d290a567ec138af0ac378efab422 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 7 Dec 2024 14:22:19 +1100 Subject: [PATCH 16/28] Update PIDThread.cpp --- source/Core/Threads/PIDThread.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Core/Threads/PIDThread.cpp b/source/Core/Threads/PIDThread.cpp index b928692c..c7b27118 100644 --- a/source/Core/Threads/PIDThread.cpp +++ b/source/Core/Threads/PIDThread.cpp @@ -248,6 +248,11 @@ void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const uint3 static bool haveSeenDelta = false; + // Check for readings being pegged at the top of the ADC while the heater is off + if (!thisCycleIsHeating && (getTipRawTemp(0) > (0x7FFF - 16))) { + heaterThermalRunaway = true; + } + if (haveSeenDelta) { return; } From 1d9b16e963f1af14a853c6962e71bccecf35387c Mon Sep 17 00:00:00 2001 From: Steven Seifried Date: Sun, 22 Dec 2024 08:42:20 +0100 Subject: [PATCH 17/28] Typo corrected (Squire -> Sequre) --- Documentation/Logo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Logo.md b/Documentation/Logo.md index a4947091..f51e8180 100644 --- a/Documentation/Logo.md +++ b/Documentation/Logo.md @@ -39,7 +39,7 @@ The model should be replaced by one of the following options: - `pinecilv1` for the Pinecil V1 - `pinecilv2` for the Pinecil V2 - `ts101` for the Miniware TS101 [^1] [^2] -- `s60` for the Squire S60 [^1] +- `s60` for the Sequre S60 [^1] - `mhp30` for the Miniware MHP30 Different models are used for different flash locations for the image storage. From d899dc7433615279db16c8e5f8a18ef31d2d769c Mon Sep 17 00:00:00 2001 From: Steven Seifried Date: Sun, 22 Dec 2024 09:26:36 +0100 Subject: [PATCH 18/28] Updated translation_DE.json --- Translations/translation_DE.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index d1bff777..03bf565d 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -340,8 +340,8 @@ "description": "" }, "SolderingTipType": { - "displayText": "Soldering\nTip Type", - "description": "Select the tip type fitted" + "displayText": "Lötspitzentyp", + "description": "Wählen Sie den Typ der eingesetzten Spitze" } } } From 71a1e2a367fcb0f6fd486fd4db2eeaeaa75fdf51 Mon Sep 17 00:00:00 2001 From: Steven Seifried <39765956+StevenSeifried@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:59:32 +0100 Subject: [PATCH 19/28] Updated translation_DE.json (again) (#2030) Updated translation_DE.json --- Translations/translation_DE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index 03bf565d..0208a848 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -340,7 +340,7 @@ "description": "" }, "SolderingTipType": { - "displayText": "Lötspitzentyp", + "displayText": "Löt-\nspitzentyp", "description": "Wählen Sie den Typ der eingesetzten Spitze" } } From 0a63b6b5df9814abd2388e8673cc56c4255e15cf Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 23 Dec 2024 21:13:44 +0300 Subject: [PATCH 20/28] Add macro to enable tip types for supported hardware only --- source/Core/BSP/Miniware/BSP.cpp | 15 ++++++++++++++- source/Core/BSP/Miniware/configuration.h | 1 + source/Core/BSP/Pinecilv2/configuration.h | 1 + source/Core/Inc/Settings.h | 6 ++++++ source/Core/Src/Settings.cpp | 5 +++++ source/Core/Src/settingsGUI.cpp | 14 +++++++++++--- 6 files changed, 38 insertions(+), 4 deletions(-) diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index efb52edc..8b099f3a 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -379,6 +379,8 @@ uint8_t preStartChecksDone() { #endif } +#ifdef TIP_TYPE_SUPPORT +// new version for models supporting tips of different length/resistance uint8_t getTipResistanceX10() { #ifdef TIP_RESISTANCE_SENSE_Pin // Return tip resistance in x10 ohms @@ -388,7 +390,6 @@ uint8_t getTipResistanceX10() { return lastTipResistance; // Auto mode } return user_selected_tip; - #else uint8_t user_selected_tip = getUserSelectedTipResistance(); if (user_selected_tip == 0) { @@ -397,6 +398,18 @@ uint8_t getTipResistanceX10() { return user_selected_tip; #endif } +#else /* no tip type support: legacy version */ +uint8_t getTipResistanceX10() { +#ifdef TIP_RESISTANCE_SENSE_Pin + // Return tip resistance in x10 ohms + // We can measure this using the op-amp + return lastTipResistance; +#else + return TIP_RESISTANCE; +#endif +} +#endif /* TIP_TYPE_SUPPORT */ + #ifdef TIP_RESISTANCE_SENSE_Pin bool isTipShorted() { return tipShorted; } #else diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index 44ef5d66..6aebed15 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -218,6 +218,7 @@ #define TEMP_NTC 1 #define ACCEL_I2CBB1 1 #define POW_EPR 1 +#define TIP_TYPE_SUPPORT 1 // Support for tips of different types, i.e. resistance #define AUTO_TIP_SELECTION 1 // Can auto-select the tip #define TIPTYPE_T12 1 // Can manually pick a T12 tip #define HAS_POWER_DEBUG_MENU diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 3f7aa52e..0f21f138 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -154,6 +154,7 @@ #define POW_EPR 1 #define ENABLE_QC2 1 #define MAG_SLEEP_SUPPORT 1 +#define TIP_TYPE_SUPPORT 1 // Support for tips of different types, i.e. resistance #define AUTO_TIP_SELECTION 1 // Can auto-select the tip #define TIPTYPE_T12 1 // Can manually pick a T12 tip #define DEVICE_HAS_VALIDATION_SUPPORT diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index 715b7991..28fb5426 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -123,6 +123,7 @@ typedef enum { * Some devices allow multiple types of tips to be fitted, this allows selecting them or overriding the logic * The first type will be the default (gets value of 0) */ +#ifdef TIP_TYPE_SUPPORT typedef enum { #ifdef AUTO_TIP_SELECTION TIP_TYPE_AUTO, // If the hardware supports automatic detection @@ -143,6 +144,9 @@ typedef enum { TIP_TYPE_MAX, // Max value marker } tipType_t; uint8_t getUserSelectedTipResistance(); // returns the resistance matching the selected tip type or 0 for auto +#else +typedef enum { TIP_TYPE_MAX = 0 } tipType_t; +#endif /* TIP_TYPE_SUPPORT */ // Settings wide operations void saveSettings(); @@ -162,5 +166,7 @@ void setSettingValue(const enum SettingsOptions option, const uint16_t newValue) // Special access helpers, to reduce logic duplication uint8_t lookupVoltageLevel(); uint16_t lookupHallEffectThreshold(); +#ifdef TIP_TYPE_SUPPORT const char *lookupTipName(); // Get the name string for the current soldering tip +#endif /* TIP_TYPE_SUPPORT */ #endif /* SETTINGS_H_ */ diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index b3507c3d..c740e97c 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -298,6 +298,7 @@ uint8_t lookupVoltageLevel() { } } +#ifdef TIP_TYPE_SUPPORT const char *lookupTipName() { // Get the name string for the current soldering tip tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType); @@ -334,7 +335,10 @@ const char *lookupTipName() { break; } } +#endif /* TIP_TYPE_SUPPORT */ + // Returns the resistance for the current tip selected by the user or 0 for auto +#ifdef TIP_TYPE_SUPPORT uint8_t getUserSelectedTipResistance() { tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType); @@ -370,3 +374,4 @@ uint8_t getUserSelectedTipResistance() { break; } } +#endif /* TIP_TYPE_SUPPORT */ diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index fac0d100..d26b26bb 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -116,8 +116,10 @@ static bool showHallEffect(void); #endif /* HALL_SENSOR */ // Tip type selection +#ifdef TIP_TYPE_SUPPORT static void displaySolderingTipType(void); static bool showSolderingTipType(void); +#endif /* TIP_TYPE_SUPPORT */ // Menu functions @@ -267,12 +269,12 @@ const menuitem powerMenu[] = { const menuitem solderingMenu[] = { /* - * Tip Type * Boost Mode Temp * Auto Start * Temp Change Short Step * Temp Change Long Step * Locking Mode + * Tip Type * Profile Phases * Profile Preheat Temperature * Profile Preheat Max Temperature Change Per Second @@ -288,8 +290,6 @@ const menuitem solderingMenu[] = { * Profile Phase 5 Duration (s) * Profile Cooldown Max Temperature Change Per Second */ - /* Tip Type */ - {SETTINGS_DESC(SettingsItemIndex::SolderingTipType), nullptr, displaySolderingTipType, showSolderingTipType, SettingsOptions::SolderingTipType, SettingsItemIndex::SolderingTipType, 5}, /* Boost Temp */ {SETTINGS_DESC(SettingsItemIndex::BoostTemperature), setBoostTemp, displayBoostTemp, nullptr, SettingsOptions::BoostTemp, SettingsItemIndex::BoostTemperature, 5}, /* Auto start */ @@ -300,6 +300,10 @@ const menuitem solderingMenu[] = { {SETTINGS_DESC(SettingsItemIndex::TempChangeLongStep), nullptr, displayTempChangeLongStep, nullptr, SettingsOptions::TempChangeLongStep, SettingsItemIndex::TempChangeLongStep, 6}, /* Locking Mode */ {SETTINGS_DESC(SettingsItemIndex::LockingMode), nullptr, displayLockingMode, nullptr, SettingsOptions::LockingMode, SettingsItemIndex::LockingMode, 7}, +#ifdef TIP_TYPE_SUPPORT + /* Tip Type */ + {SETTINGS_DESC(SettingsItemIndex::SolderingTipType), nullptr, displaySolderingTipType, showSolderingTipType, SettingsOptions::SolderingTipType, SettingsItemIndex::SolderingTipType, 5}, +#endif /* TIP_TYPE_SUPPORT */ #ifdef PROFILE_SUPPORT /* Profile Phases */ {SETTINGS_DESC(SettingsItemIndex::ProfilePhases), nullptr, displayProfilePhases, nullptr, SettingsOptions::ProfilePhases, SettingsItemIndex::ProfilePhases, 7}, @@ -763,12 +767,16 @@ static void displayHallEffectSleepTime(void) { } } #endif /* HALL_SENSOR */ + +#ifdef TIP_TYPE_SUPPORT static void displaySolderingTipType(void) { // TODO wrapping X value OLED::print(lookupTipName(), FontStyle::SMALL, 255, OLED::getCursorX()); } // If there is no detection, and no options, max is 0 static bool showSolderingTipType(void) { return tipType_t::TIP_TYPE_MAX != 0; } +#endif /* TIP_TYPE_SUPPORT */ + static void setTempF(const enum SettingsOptions option) { uint16_t Temp = getSettingValue(option); if (getSettingValue(SettingsOptions::TemperatureInF)) { From 5f38e1812c003c20745354d8448958e686364081 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 23 Dec 2024 21:51:51 +0300 Subject: [PATCH 21/28] Implement getUserSelectedTipResistance() as stub --- source/Core/BSP/Miniware/BSP.cpp | 13 ------------- source/Core/Inc/Settings.h | 9 +++++++-- source/Core/Src/Settings.cpp | 2 ++ 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index 8b099f3a..532dfb1f 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -379,8 +379,6 @@ uint8_t preStartChecksDone() { #endif } -#ifdef TIP_TYPE_SUPPORT -// new version for models supporting tips of different length/resistance uint8_t getTipResistanceX10() { #ifdef TIP_RESISTANCE_SENSE_Pin // Return tip resistance in x10 ohms @@ -398,17 +396,6 @@ uint8_t getTipResistanceX10() { return user_selected_tip; #endif } -#else /* no tip type support: legacy version */ -uint8_t getTipResistanceX10() { -#ifdef TIP_RESISTANCE_SENSE_Pin - // Return tip resistance in x10 ohms - // We can measure this using the op-amp - return lastTipResistance; -#else - return TIP_RESISTANCE; -#endif -} -#endif /* TIP_TYPE_SUPPORT */ #ifdef TIP_RESISTANCE_SENSE_Pin bool isTipShorted() { return tipShorted; } diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index 28fb5426..fd41e271 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -143,11 +143,16 @@ typedef enum { // #endif TIP_TYPE_MAX, // Max value marker } tipType_t; -uint8_t getUserSelectedTipResistance(); // returns the resistance matching the selected tip type or 0 for auto #else -typedef enum { TIP_TYPE_MAX = 0 } tipType_t; +typedef enum { + TIP_TYPE_AUTO = 0, // value for the default case + TIP_TYPE_MAX = 0, // marker for settings when not supported +} tipType_t; #endif /* TIP_TYPE_SUPPORT */ +// returns the resistance matching the selected tip type or 0 for auto and when not supported +uint8_t getUserSelectedTipResistance(); + // Settings wide operations void saveSettings(); bool loadSettings(); diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index c740e97c..59867d53 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -374,4 +374,6 @@ uint8_t getUserSelectedTipResistance() { break; } } +#else +uint8_t getUserSelectedTipResistance() { return tipType_t::TIP_TYPE_AUTO; } #endif /* TIP_TYPE_SUPPORT */ From 6cf9916a6e762b8f59c0649ebced55a6ae47ea4c Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 23 Dec 2024 22:37:49 +0300 Subject: [PATCH 22/28] Revert formatting for the unmodified file --- source/Core/BSP/Miniware/BSP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index 532dfb1f..615e93d3 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -389,6 +389,7 @@ uint8_t getTipResistanceX10() { } return user_selected_tip; #else + uint8_t user_selected_tip = getUserSelectedTipResistance(); if (user_selected_tip == 0) { return TIP_RESISTANCE; // Auto mode @@ -396,7 +397,6 @@ uint8_t getTipResistanceX10() { return user_selected_tip; #endif } - #ifdef TIP_RESISTANCE_SENSE_Pin bool isTipShorted() { return tipShorted; } #else From ee6aff54b3f612ea1c16ace4f3d3de87dfe3b5eb Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Mon, 23 Dec 2024 23:01:15 +0300 Subject: [PATCH 23/28] Restore the original file --- source/Core/BSP/Miniware/BSP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index 615e93d3..efb52edc 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -388,8 +388,8 @@ uint8_t getTipResistanceX10() { return lastTipResistance; // Auto mode } return user_selected_tip; -#else +#else uint8_t user_selected_tip = getUserSelectedTipResistance(); if (user_selected_tip == 0) { return TIP_RESISTANCE; // Auto mode From 1e285a6a5caefd56b9e774f88b6141abf341520f Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Tue, 24 Dec 2024 04:04:14 +0300 Subject: [PATCH 24/28] Set tip type as auto by default --- source/Core/Src/Settings.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 59867d53..28198f78 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -304,11 +304,6 @@ const char *lookupTipName() { tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType); switch (value) { -#ifdef AUTO_TIP_SELECTION - case tipType_t::TIP_TYPE_AUTO: - return translatedString(Tr->TipTypeAuto); - break; -#endif #ifdef TIPTYPE_T12 case tipType_t::T12_8_OHM: return translatedString(Tr->TipTypeT12Long); @@ -320,7 +315,7 @@ const char *lookupTipName() { return translatedString(Tr->TipTypeT12PTS); break; #endif -#ifdef TIPTYE_TS80 +#ifdef TIPTYPE_TS80 case tipType_t::TS80_4_5_OHM: return translatedString(Tr->TipTypeTS80); break; @@ -329,9 +324,12 @@ const char *lookupTipName() { case tipType_t::JBC_210_2_5_OHM: return translatedString(Tr->TipTypeJBCC210); break; +#endif +#ifdef AUTO_TIP_SELECTION + case tipType_t::TIP_TYPE_AUTO: #endif default: - return nullptr; + return translatedString(Tr->TipTypeAuto); break; } } From 5cf9d5bfff61cd46149cca0745b0839ab6758b71 Mon Sep 17 00:00:00 2001 From: Ziuta Date: Thu, 26 Dec 2024 13:31:29 +0100 Subject: [PATCH 25/28] Update PL translation (v2.23 rc1) --- Translations/translation_PL.json | 86 ++++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json index e139a85a..8e516076 100644 --- a/Translations/translation_PL.json +++ b/Translations/translation_PL.json @@ -4,7 +4,7 @@ "tempUnitFahrenheit": false, "messagesWarn": { "CalibrationDone": { - "message": "Kalibracja\nwykonana!" + "message": "Skalibrowano!" }, "ResetOKMessage": { "message": "Reset OK" @@ -19,7 +19,7 @@ "message": "Nie rozpoznano\nkont. USB-PD IC!" }, "LockingKeysString": { - "message": " ZABLOK." + "message": "ZABLOK." }, "UnlockingKeysString": { "message": "ODBLOK." @@ -31,7 +31,7 @@ "message": "Ucieczka\ntermiczna" }, "WarningTipShorted": { - "message": "!Tip Shorted!" + "message": "!Zwarty grot!" }, "SettingsCalibrationWarning": { "message": "Upewnij się, że końcówka i uchwyt mają temperaturę pokojową podczas następnego rozruchu!" @@ -58,16 +58,16 @@ "message": "Grot: \n" }, "ProfilePreheatString": { - "message": "Preheat\n" + "message": "Rozgrzewanie\n" }, "ProfileCooldownString": { - "message": "Cooldown\n" + "message": "Schładzanie\n" }, "DeviceFailedValidationWarning": { "message": "Twoje urządzenie jest najprawdopodobniej podróbką!" }, "TooHotToStartProfileWarning": { - "message": "Too hot to\nstart profile" + "message": "Zbyt gorące, aby\nuruchomić profil" } }, "characters": { @@ -107,22 +107,22 @@ }, "menuValues": { "USBPDModeDefault": { - "displayText": "Default\nMode" + "displayText": "Tryb\ndomyślny" }, "USBPDModeNoDynamic": { - "displayText": "No\nDynamic" + "displayText": "Nie\ndynamiczny" }, "USBPDModeSafe": { - "displayText": "Safe\nMode" + "displayText": "Tryb\nbezpieczny" }, "TipTypeAuto": { - "displayText": "Auto\nSense" + "displayText": "Auto\nwykrycie" }, "TipTypeT12Long": { - "displayText": "TS100\nLong" + "displayText": "Długi\nTS100" }, "TipTypeT12Short": { - "displayText": "Pine\nShort" + "displayText": "Krótki\nPine" }, "TipTypeT12PTS": { "displayText": "PTS\n200" @@ -137,27 +137,27 @@ "menuOptions": { "DCInCutoff": { "displayText": "Źródło\nzasilania", - "description": "Źródło zasilania. Ustaw napięcie odcięcia. (DC 10V) (S 3.3V dla ogniw Li, wyłącz limit mocy)" + "description": "Źródło zasilania. Ustaw napięcie odcięcia. (DC 10V) (S=3.3V dla ogniw Li, wyłącz limit mocy)" }, "MinVolCell": { "displayText": "Minimalne\nnapięcie", "description": "Minimalne dozwolone napięcie na komórkę (3S: 3 - 3,7V | 4-6S: 2,4 - 3,7V)" }, "QCMaxVoltage": { - "displayText": "QC\nnapięcie", + "displayText": "Napięcie QC", "description": "Maksymalne napięcie, które lutownica będzie próbowała wynegocjować z ładowarką Quick Charge (V)" }, "PDNegTimeout": { "displayText": "Limit czasu\nPD", - "description": "Limit czasu negocjacji PD w krokach co 100 ms dla zgodności z niektórymi ładowarkami QC (0: wyłączone)" + "description": "Limit czasu negocjacji PD w krokach co 100ms dla zgodności z niektórymi ładowarkami QC (0: wyłączone)" }, "USBPDMode": { - "displayText": "PD\nMode", + "displayText": "Tryb PD", "description": "Włącza tryby PPS & EPR." }, "BoostTemperature": { "displayText": "Temp.\nboost", - "description": "Temperatura w trybie \"boost\" " + "description": "Temp. w trybie \"boost\" " }, "AutoStart": { "displayText": "Aut. uruch.\ntr. lutowania", @@ -176,60 +176,60 @@ "description": "W trybie lutowania, wciśnij oba przyciski aby je zablokować (B=tylko Boost | P=pełna blokada)" }, "ProfilePhases": { - "displayText": "Profile\nPhases", - "description": "Number of phases in profile mode" + "displayText": "Fazy\nprofilu", + "description": "Liczba faz w trybie profilu" }, "ProfilePreheatTemp": { - "displayText": "Preheat\nTemp", - "description": "Preheat to this temperature at the start of profile mode" + "displayText": "Temp.\nrozgrzewania", + "description": "Rozgrzanie do tej temp. na początku trybu profilu" }, "ProfilePreheatSpeed": { - "displayText": "Preheat\nSpeed", - "description": "Preheat at this rate (degrees per second)" + "displayText": "Prędk.\nrozgrzewania", + "description": "Tempo rozgrzewania (stopnie na sekundę)" }, "ProfilePhase1Temp": { - "displayText": "Phase 1\nTemp", - "description": "Target temperature for the end of this phase" + "displayText": "Temp.\nfazy 1", + "description": "Docelowa temp. na koniec tej fazy" }, "ProfilePhase1Duration": { - "displayText": "Phase 1\nDuration", - "description": "Target duration of this phase (seconds)" + "displayText": "Dług.\nfazy 1", + "description": "Docelowy czas trwania tej fazy (sekundy)" }, "ProfilePhase2Temp": { - "displayText": "Phase 2\nTemp", + "displayText": "Temp.\nfazy 2", "description": "" }, "ProfilePhase2Duration": { - "displayText": "Phase 2\nDuration", + "displayText": "Dług.\nfazy 2", "description": "" }, "ProfilePhase3Temp": { - "displayText": "Phase 3\nTemp", + "displayText": "Temp.\nfazy 3", "description": "" }, "ProfilePhase3Duration": { - "displayText": "Phase 3\nDuration", + "displayText": "Dług.\nfazy 3", "description": "" }, "ProfilePhase4Temp": { - "displayText": "Phase 4\nTemp", + "displayText": "Temp.\nfazy 4", "description": "" }, "ProfilePhase4Duration": { - "displayText": "Phase 4\nDuration", + "displayText": "Dług.\nfazy 4", "description": "" }, "ProfilePhase5Temp": { - "displayText": "Phase 5\nTemp", + "displayText": "Temp.\nfazy 5", "description": "" }, "ProfilePhase5Duration": { - "displayText": "Phase 5\nDuration", + "displayText": "Dług.\nfazy 5", "description": "" }, "ProfileCooldownSpeed": { - "displayText": "Cooldown\nSpeed", - "description": "Cooldown at this rate at the end of profile mode (degrees per second)" + "displayText": "Prędk.\nschładzania", + "description": "Tempo schładzania na koniec trybu profilu (stopnie na sekundę)" }, "MotionSensitivity": { "displayText": "Czułość\nwykr. ruchu", @@ -264,8 +264,8 @@ "description": "Obrót ekranu (P: dla praworęcznych | L: dla leworęcznych | A: automatycznie)" }, "CooldownBlink": { - "displayText": "Mig. podczas\nwychładzania", - "description": "Temperatura miga podczas wychładzania, gdy grot jest wciąż gorący" + "displayText": "Mig. podczas\nschładzania", + "description": "Temperatura miga podczas schładzania, gdy grot jest wciąż gorący" }, "ScrollingSpeed": { "displayText": "Sz. przew.\ntekstu", @@ -296,7 +296,7 @@ "description": "Ustawia czas wyświetlania loga podczas uruchamiania (s=sekund)" }, "AdvancedIdle": { - "displayText": "Szeczegółowy\nekran bezczy.", + "displayText": "Szczegółowy\nekran bezczyn.", "description": "Wyświetla szczegółowe informacje za pomocą mniejszej czcionki na ekranie bezczynności" }, "AdvancedSoldering": { @@ -305,7 +305,7 @@ }, "BluetoothLE": { "displayText": "Bluetooth\n", - "description": "Enables BLE" + "description": "Włącza Bluetooth Low Energy" }, "PowerLimit": { "displayText": "Ogr.\nmocy", @@ -340,8 +340,8 @@ "description": "" }, "SolderingTipType": { - "displayText": "Soldering\nTip Type", - "description": "Select the tip type fitted" + "displayText": "Typ grotu", + "description": "Wybierz typ zamontowanego grotu" } } } From 169d9e6956948459fb25b79b3c93ca42a14ffeed Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Mon, 6 Jan 2025 10:15:29 +1100 Subject: [PATCH 26/28] Allocate fixed ID's for Operating Modes --- source/Core/Threads/UI/logic/OperatingModes.h | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source/Core/Threads/UI/logic/OperatingModes.h b/source/Core/Threads/UI/logic/OperatingModes.h index a2c08a7d..379094e4 100644 --- a/source/Core/Threads/UI/logic/OperatingModes.h +++ b/source/Core/Threads/UI/logic/OperatingModes.h @@ -25,20 +25,20 @@ extern "C" { #endif enum class OperatingMode { - StartupLogo = 0, // Showing the startup logo - CJCCalibration, // Cold Junction Calibration - StartupWarnings, // Startup checks and warnings - InitialisationDone, // Special state we use just before we to home screen at first startup. Allows jumping to extra startup states - HomeScreen, // Home/Idle screen that is the main launchpad to other modes - Soldering, // Main soldering operating mode - SolderingProfile, // Soldering by following a profile, used for reflow for example - Sleeping, // Sleep state holds iron at lower sleep temp - Hibernating, // Like sleeping but keeps heater fully off until woken - SettingsMenu, // Settings Menu - DebugMenuReadout, // Debug metrics - TemperatureAdjust, // Set point temperature adjustment - UsbPDDebug, // USB PD debugging information - ThermalRunaway, // Thermal Runaway warning state. + StartupLogo=10, // Showing the startup logo + CJCCalibration=11, // Cold Junction Calibration + StartupWarnings=12, // Startup checks and warnings + InitialisationDone=13, // Special state we use just before we to home screen at first startup. Allows jumping to extra startup states + HomeScreen=0, // Home/Idle screen that is the main launchpad to other modes + Soldering=1, // Main soldering operating mode + SolderingProfile=6, // Soldering by following a profile, used for reflow for example + Sleeping=3, // Sleep state holds iron at lower sleep temp + Hibernating=14, // Like sleeping but keeps heater fully off until woken + SettingsMenu=4, // Settings Menu + DebugMenuReadout=5, // Debug metrics + TemperatureAdjust=7, // Set point temperature adjustment + UsbPDDebug=8, // USB PD debugging information + ThermalRunaway=9, // Thermal Runaway warning state. }; enum class TransitionAnimation { From a3082c389ecd47e0645866d137c1e05ff5366e7a Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 11 Jan 2025 09:50:41 +1100 Subject: [PATCH 27/28] Drop crit section on I2C --- source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp | 10 ++-------- source/Core/Threads/UI/logic/utils/SolderingCommon.cpp | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp b/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp index 93d11ae5..ce80e330 100644 --- a/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp +++ b/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp @@ -40,10 +40,7 @@ bool FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t read_address, uint8_t *p_b i2cCfg.data = p_buffer; i2cCfg.subAddrSize = 1; // one byte address - taskENTER_CRITICAL(); - /* --------------- */ - err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg); - taskEXIT_CRITICAL(); + err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg); bool res = err == SUCCESS; if (!res) { I2C_Unstick(); @@ -65,10 +62,7 @@ bool FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, uint8_t *p_bu i2cCfg.data = p_buffer; i2cCfg.subAddrSize = 1; // one byte address - taskENTER_CRITICAL(); - /* --------------- */ - err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg); - taskEXIT_CRITICAL(); + err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg); bool res = err == SUCCESS; if (!res) { I2C_Unstick(); diff --git a/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp b/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp index 9425c90f..865c6a40 100644 --- a/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp +++ b/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp @@ -39,8 +39,6 @@ bool checkExitSoldering(void) { } #endif - // If we have tripped thermal runaway, turn off heater and show warning - return false; } From fd91cf9f3511a118a63321d6fcbcabaf6cb11168 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 11 Jan 2025 12:46:32 +1100 Subject: [PATCH 28/28] Revert "Merge pull request #2048 from Ralim/pinecilv2-i2c-rework" This reverts commit b401dc8264e5dda826a18a8be5c3827368e7808f, reversing changes made to 42fb9e11050ed9953569cefdb1e5f8771d1305ce. --- source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp | 10 ++++++++-- source/Core/Threads/UI/logic/utils/SolderingCommon.cpp | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp b/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp index ce80e330..93d11ae5 100644 --- a/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp +++ b/source/Core/BSP/Pinecilv2/I2C_Wrapper.cpp @@ -40,7 +40,10 @@ bool FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t read_address, uint8_t *p_b i2cCfg.data = p_buffer; i2cCfg.subAddrSize = 1; // one byte address - err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg); + taskENTER_CRITICAL(); + /* --------------- */ + err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg); + taskEXIT_CRITICAL(); bool res = err == SUCCESS; if (!res) { I2C_Unstick(); @@ -62,7 +65,10 @@ bool FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, uint8_t *p_bu i2cCfg.data = p_buffer; i2cCfg.subAddrSize = 1; // one byte address - err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg); + taskENTER_CRITICAL(); + /* --------------- */ + err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg); + taskEXIT_CRITICAL(); bool res = err == SUCCESS; if (!res) { I2C_Unstick(); diff --git a/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp b/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp index 865c6a40..9425c90f 100644 --- a/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp +++ b/source/Core/Threads/UI/logic/utils/SolderingCommon.cpp @@ -39,6 +39,8 @@ bool checkExitSoldering(void) { } #endif + // If we have tripped thermal runaway, turn off heater and show warning + return false; }