diff --git a/Documentation/HallSensor.md b/Documentation/HallSensor.md index cca5e2afd..081266ff2 100644 --- a/Documentation/HallSensor.md +++ b/Documentation/HallSensor.md @@ -2,11 +2,11 @@ ## Sleep Mode Menu -In Sleep mode, the iron automatically lowers the temperature to 150 °C (default). This default was chosen as it is just below the melting point of many solders. A stand-by lower temperature helps reduce the rate of oxidation and prevents damage to iron tips. In general, when not using the iron, unplug it or let it sleep to increase the longevity of replaceable tips. The default sleep temperature can be customized. +In sleep mode, the iron automatically lowers the temperature to 150°C (default). This default setting was chosen as it is just below the melting point of a wide range of solders. A lower standby temperature helps reduce the oxidation rate and prevent damage to the soldering tips. As a general rule, when not in use, unplug the unit or let it go into sleep mode to extend the life of the replaceable tips. The default sleep temperature can be adjusted to your preference. -Simply moving the iron or pressing any button will wake it back up into soldering mode. +Simply moving the iron or pressing any button will wake it back up into soldering mode. The sensitivity is adjustable. It is recommended to adjust this to suit your environment so that it reliably stays in sleep mode when not in use, but does not go into sleep mode when in use. (This may vary depending on the amount of movement during soldering.) -### Optional Hall Effect Feature (Pinecil only): +### Optional Hall Effect Feature (Pinecil (v1/v2) only): Inside the [Sleep Menu](https://ralim.github.io/IronOS/Settings/#setting-sleep-temp) is an additional type of sleep setting. Pinecil has an unpopulated footprint (**U14**) for a hall effect sensor, Silicon Labs **Si7210-B-00-IV**. After installing the hall effect sensor (HES), it is possible to auto-trigger Pinecil to enter sleep mode when it enters the stand, and _Zzzz_ will appear (or text in detailed mode). This could be a fun enhancement for any Pinecil and adds a feature typically only found in more expensive high-end irons. The HES is available at many electronic stores for ~$2-$6. diff --git a/Documentation/Hardware.md b/Documentation/Hardware.md index 55f525129..8a1830b00 100644 --- a/Documentation/Hardware.md +++ b/Documentation/Hardware.md @@ -1,9 +1,30 @@ ## Notes on the various supported hardware +Below are short summaries / notes around the hardware. This is not an in-depth comparison of the features of the units. Please do your own research before purchasing. + +Due to descisions out of our control, Miniware no longer provides source-code/schematics/support for any open source firmware on their devices. This does mean that only (TS100/TS80/TS80P) are "open" to any extent. TS80P is pushing that as it was never open at all but just happens to be very close to the TS80. While this generally shouldn't affect the performance of the device, it does mean that their newer products can be slow to be supported or some issues are harder to resolve. + +Sequre has so far been supportive of the S60 by providing schematics. + +The Pine64 units (Pinecil) are schematics-available (i.e you can download them on the Pine64 Wiki). They are currently the only vendor that has provided financial support of the project. They are also the only vendor that allows contact directly to the engineering teams for hardware issues. This results in generally better support for these devices. It does **not** mean that this firmware is designed around them, but it does help however that they are designed with this firmware in mind as Ralim talks to them. Where possible features are designed to work across all devices but the time for support may vary depending on the hardware and its quirks. + + +## A quick note on power supplies + +For all devices listed **except** the MHP30: + +These soldering irons do *NOT* contain DC/DC converters. +This means that your power at the tip is a function of the supplied voltage. Just because the iron "supports" running at a wide range of voltages, you should always use a voltage near the upper limit where possible. +It is highly recommended to use a PD adapter where possible as this allows the iron to _know_ the limitations of your supply. +The marked irons can only turn the tip on and off in software, this means that they can't control the maximum power drawn from the supply. This is why when using PD the iron may select a lower voltage than your power supplies maximum. This is to prevent your power supply failing from over current. For more information about power management underhood, please, [see the related documentation section](https://ralim.github.io/IronOS/Power/). + +For the MHP30, it contains a buck DC/DC, which means it can utilise most power supplies fairly well, but you should still aim for highest voltage that is reasonable to use. + ### TS100 -TS100\* is a neat soldering iron: +The TS100 was the first supported soldering iron, and is generally a very capable device. +Its now generally not reccomended to buy new as other devices have all of its features and more, and can often be the same price or cheaper. It's still fully supported though, nothing will be taken away from it. - can run from 9-25V DC; - provides a power range that is determined by the input voltage; @@ -12,23 +33,32 @@ TS100\* is a neat soldering iron: ![](https://brushlesswhoop.com/images/ts100-og.jpg) +### TS101 + +The TS101 is the direct replacement of the TS100 with the same tip compatibility. +It adds a spring pressure tip holding mechanism instead of using a screw so tips are easier to swap on the fly (But are held less securely and can pull out depending on the use case). It adds USB-C PD support and the hardware is compatible with 28V EPR power supplies (under both IronOS and official firmware). + +It unfortunately uses an STM32 clone MCU with quirks, so performance of the screen isn't as good as it could be but its perfectly usable. The bootloader for programming is the biggest weakness of this device and programming can be a pain. Fortunately, IronOS is relatively stable feature wise, so you shouldn't need to update the device often. + +The Miniware bootup logo is burned into their bootloader, so IronOS cant remove this. IronOS can show your own logo when it starts however. There are quirks to loading a logo on this device, so be sure to read the documentation if you are coming from other devices. ### TS80 -TS80\* is a successor to TS100: +TS80 is a successor to TS100, it moves to custom smaller tips that perform better at lower wattages. It is optimised for a 9V/2A Quick Charge 3.0 power supply. This is commonly found on older power banks on the USB-A port. +It does **not** support USB-PD and will not work when powered from a USB-C power supply in most cases. - uses _Quick Charge 3.0_ / _QC3_ capable charger only (18W max); - doesn't support PD as it is not designed on the hardware level; - the original firmware can be found [here](https://e-design.com.cn/en/NewsDetail/4203645.html)([mirror backup](https://github.com/Ralim/IronOS-Meta/tree/main/Firmware/Miniware)). -![](https://core-electronics.com.au/media/catalog/product/4/2/4244-01.jpg) +![Image of TS80](https://core-electronics.com.au/media/catalog/product/4/2/4244-01.jpg) ### TS80P -TS80P\* is a successor to TS80: +The TS80P is the direct successor to the TS80 and essentially what the TS80 should have been from its debut. It is nearly identical except it adds USB-PD support for far better compatibility with modern power banks as well as a faster tip removal method. -- supports _Quick Charge 3.0_ (_QC3_: 9V/3A, 18W max); +- supports _Quick Charge 3.0_ (_QC3_: 9V/2A,12V/1.5A 18W max); - supports _Power Delivery_ (_PD_: 9V/3A & 12V/3A, 30W max)\*\*; - the original firmware can be found [here](https://e-design.com.cn/en/NewsDetail/4203645.html)([mirror backup](https://github.com/Ralim/IronOS-Meta/tree/main/Firmware/Miniware)). @@ -50,7 +80,7 @@ MHP30 is a **M**ini **H**ot **P**late: ### Pinecil -Pincecil\*: +Pincecil: - first model of soldering iron from PINE64; - the default firmware can be found [here](https://files.pine64.org/os/Pinecil/Pinecil_firmware_20201115.zip). @@ -58,6 +88,3 @@ Pincecil\*: ![](https://pine64.com/wp-content/uploads/2020/11/pinecil-bb2-04.jpg?v=0446c16e2e66) -\*: Please note: these soldering irons do *NOT* contain DC/DC converters. This means that your power at the tip is a function of the supplied voltage. Just because the iron "supports" running at a wide range of voltages, you should always use a voltage near the upper limit where possible. It is highly recommended to use a PD adapter where possible as this allows the iron to _know_ the limitations of your supply. The marked irons can only turn the tip on and off in software, this means that they can't control the maximum power drawn from the supply. This is why when using PD the iron may select a lower voltage than your power supplies maximum. This is to prevent your power supply failing from over current. For more information about power management underhood, please, [see the related documentation section](https://ralim.github.io/IronOS/Power/). - - diff --git a/Env.yml b/Env.yml index 695cd122e..16db291d3 100644 --- a/Env.yml +++ b/Env.yml @@ -1,4 +1,3 @@ -version: "3" name: "ironos" services: builder: diff --git a/Translations/make_translation.py b/Translations/make_translation.py index 9c788aeb4..cd765bed8 100755 --- a/Translations/make_translation.py +++ b/Translations/make_translation.py @@ -203,9 +203,9 @@ def get_letter_counts(defs: dict, lang: dict, build_version: str) -> Dict: """From the source definitions, language file and build version; calculates the ranked symbol list Args: - defs (dict): _description_ - lang (dict): _description_ - build_version (str): _description_ + defs (dict): Definitions + lang (dict): Language lookup + build_version (str): The build version id to ensure its letters are included Returns: Dict: _description_ diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index e9223c94d..42b16c025 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Бяспечны\nрэжым" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Мова:\n BY Беларуская", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json index 0d2d4a210..bfe61bc61 100644 --- a/Translations/translation_BG.json +++ b/Translations/translation_BG.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Вкл.без\nискане" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Език:\n BG Български", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index b112a5b8a..a6ea50e55 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Jazyk:\n CS Český", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json index 86f15aba4..c80e7c6fd 100644 --- a/Translations/translation_DA.json +++ b/Translations/translation_DA.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Sprog:\n DA Dansk", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index 684f797ee..d1bff7771 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -235,7 +253,7 @@ }, "HallEffSleepTimeout": { "displayText": "HallSensor\nSleepTime", - "description": "Das Intervall vor dem Start des \"Ruhemodus\", wenn der Hall-Effekt den Schwellenwert überschreitet" + "description": "Dauer vor dem Wechsel in den \"Ruhemodus\", nachdem die Hall-Sonde auslöst" }, "TemperatureUnit": { "displayText": "Temperatur-\neinheit", @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Sprache:\n DE Deutsch", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json index 4757359f1..8a8a99eae 100644 --- a/Translations/translation_EL.json +++ b/Translations/translation_EL.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Γλώσσα:\n EL Ελληνικά", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index bbf0c0a31..9ef29e1ef 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Language:\n EN English", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json index cde908db2..76d8fd4d7 100644 --- a/Translations/translation_ES.json +++ b/Translations/translation_ES.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Modo\nSeguro" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Idioma:\n ES Castellano", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_ET.json b/Translations/translation_ET.json index 807bd144d..75dcccf3a 100644 --- a/Translations/translation_ET.json +++ b/Translations/translation_ET.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Keel:\n ET Eesti", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json index a2d229e00..b9c04eadc 100644 --- a/Translations/translation_FI.json +++ b/Translations/translation_FI.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "USB-PD\nturva-ti" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Kieli:\n FI Suomi", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json index f3d49d161..07f404f81 100644 --- a/Translations/translation_FR.json +++ b/Translations/translation_FR.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Langue:\n FR Français", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json index c892675e2..53455e5f3 100644 --- a/Translations/translation_HR.json +++ b/Translations/translation_HR.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Jezik:\n HR Hrvatski", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json index 8c812a3b1..db817202c 100644 --- a/Translations/translation_HU.json +++ b/Translations/translation_HU.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Nyelv:\n HU Magyar", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index 58a285e4a..29c08e6d5 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Modalità\nsicura" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Lingua:\n IT Italiano", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json index e251a2156..58fe176b0 100644 --- a/Translations/translation_JA_JP.json +++ b/Translations/translation_JA_JP.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "言語: 日本語", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json index b154cb819..2d77dec8d 100644 --- a/Translations/translation_LT.json +++ b/Translations/translation_LT.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Kalba:\n LT Lietuvių", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json index 96c59ab36..cac1f3079 100644 --- a/Translations/translation_NB.json +++ b/Translations/translation_NB.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Språk:\n NB Norsk bm", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json index baff25dee..7b3a68d8d 100644 --- a/Translations/translation_NL.json +++ b/Translations/translation_NL.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Taal:\n NL Nederlands", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json index 171b56d21..989359df1 100644 --- a/Translations/translation_NL_BE.json +++ b/Translations/translation_NL_BE.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Spraak:\n NL_BE Vlaams", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json index 84c4c713e..e139a85a5 100644 --- a/Translations/translation_PL.json +++ b/Translations/translation_PL.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Język:\n PL Polski", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json index 5c3dae3f9..5f4ab9993 100644 --- a/Translations/translation_PT.json +++ b/Translations/translation_PT.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Idioma:\n PT Português", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json index 427556bbd..2e5105fac 100644 --- a/Translations/translation_RO.json +++ b/Translations/translation_RO.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Limbă:\n RO Română", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index 37fed6a64..b1139951f 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Вкл.без\nзапроса" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Язык:\n RU Русский", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json index b80308b2a..476b8288b 100644 --- a/Translations/translation_SK.json +++ b/Translations/translation_SK.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Jazyk:\n SK Slovenčina", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json index a9288e7fe..358f91173 100644 --- a/Translations/translation_SL.json +++ b/Translations/translation_SL.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Jezik:\n SL Slovenščina", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json index cc999097a..70ddae54e 100644 --- a/Translations/translation_SR_CYRL.json +++ b/Translations/translation_SR_CYRL.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Jезик:\n SR Српски", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json index b1b6fdcb1..eaa70d808 100644 --- a/Translations/translation_SR_LATN.json +++ b/Translations/translation_SR_LATN.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Jezik:\n SR Srpski", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json index b92800a5b..3cdaf6917 100644 --- a/Translations/translation_SV.json +++ b/Translations/translation_SV.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Språk:\n SV Svenska", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json index d164e07e2..539ffa441 100644 --- a/Translations/translation_TR.json +++ b/Translations/translation_TR.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Dil:\n TR Türkçe", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index 2fce7ba37..02fa7df9b 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Безпечний\nРежим" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Мова:\n UK Українська", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json index f3f8ec38c..dae1a6535 100644 --- a/Translations/translation_VI.json +++ b/Translations/translation_VI.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "Ngôn ngu:\n VI Tieng Viet", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json index 52f4dc3b9..e7737b2ba 100644 --- a/Translations/translation_YUE_HK.json +++ b/Translations/translation_YUE_HK.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "語言: 廣東話", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index dc745dfb7..2b93b87e2 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "语言:简体中文", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json index d39f39dc7..222180519 100644 --- a/Translations/translation_ZH_TW.json +++ b/Translations/translation_ZH_TW.json @@ -114,6 +114,24 @@ }, "USBPDModeSafe": { "displayText": "Safe\nMode" + }, + "TipTypeAuto": { + "displayText": "Auto\nSense" + }, + "TipTypeT12Long": { + "displayText": "TS100\nLong" + }, + "TipTypeT12Short": { + "displayText": "Pine\nShort" + }, + "TipTypeT12PTS": { + "displayText": "PTS\n200" + }, + "TipTypeTS80": { + "displayText": "TS80\n" + }, + "TipTypeJBCC210": { + "displayText": "JBC\nC210" } }, "menuOptions": { @@ -320,6 +338,10 @@ "LanguageSwitch": { "displayText": "語言:正體中文", "description": "" + }, + "SolderingTipType": { + "displayText": "Soldering\nTip Type", + "description": "Select the tip type fitted" } } } diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index 5cfe4302f..e473ca346 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -212,6 +212,30 @@ { "id": "USBPDModeSafe", "description": "When in this mode we enable all PD features, but we don't pad resistance slightly to account for cable and PCB trace loss" + }, + { + "id": "TipTypeAuto", + "description": "This is for automatic best-effort tip selection based on resistance" + }, + { + "id": "TipTypeT12Long", + "description": "Hakko T12 or older (long) TS100 tips" + }, + { + "id": "TipTypeT12Short", + "description": "Pine 6.2 ohm short TS100 style tips" + }, + { + "id": "TipTypeT12PTS", + "description": "PTS200 4 ohm short TS100 style tips" + }, + { + "id": "TipTypeTS80", + "description": "Miniware TS80(P) tips" + }, + { + "id": "TipTypeJBCC210", + "description": "JBC (or clone) tips" } ], "menuOptions": [ @@ -545,6 +569,12 @@ "maxLen": 7, "maxLen2": 15, "description": "Changes the device language on multi-lingual builds." + }, + { + "id": "SolderingTipType", + "maxLen": 7, + "maxLen2": 15, + "description": "For manually selecting the type of tip fitted" } ] } diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h index a94ae98f1..a2d5910be 100644 --- a/source/Core/BSP/MHP30/configuration.h +++ b/source/Core/BSP/MHP30/configuration.h @@ -1,6 +1,5 @@ #ifndef CONFIGURATION_H_ #define CONFIGURATION_H_ -#include "Settings.h" #include /** * Configuration.h @@ -147,7 +146,7 @@ #define MIN_BOOST_TEMP_F 300 // The min settable temp for boost mode °F #define NO_DISPLAY_ROTATE // Disable OLED rotation by accel #define SLEW_LIMIT 50 // Limit to 3.0 Watts per 64ms pid loop update rate slew rate - +#define TIPTYPE_MHP30 1 // It's own special tip #define ACCEL_SC7 #define ACCEL_MSA diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index d823263c6..efb52edc5 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -4,6 +4,7 @@ #include "BootLogo.h" #include "I2C_Wrapper.hpp" #include "Pins.h" +#include "Settings.h" #include "Setup.h" #include "TipThermoModel.h" #include "USBPD.h" @@ -382,9 +383,18 @@ uint8_t getTipResistanceX10() { #ifdef TIP_RESISTANCE_SENSE_Pin // Return tip resistance in x10 ohms // We can measure this using the op-amp - return lastTipResistance; + uint8_t user_selected_tip = getUserSelectedTipResistance(); + if (user_selected_tip == 0) { + return lastTipResistance; // Auto mode + } + return user_selected_tip; + #else - return TIP_RESISTANCE; + uint8_t user_selected_tip = getUserSelectedTipResistance(); + if (user_selected_tip == 0) { + return TIP_RESISTANCE; // Auto mode + } + return user_selected_tip; #endif } #ifdef TIP_RESISTANCE_SENSE_Pin diff --git a/source/Core/BSP/Miniware/configuration.h b/source/Core/BSP/Miniware/configuration.h index c1e9c3513..913883e1c 100644 --- a/source/Core/BSP/Miniware/configuration.h +++ b/source/Core/BSP/Miniware/configuration.h @@ -1,6 +1,5 @@ #ifndef CONFIGURATION_H_ #define CONFIGURATION_H_ -#include "Settings.h" #include /** * Configuration.h @@ -181,6 +180,7 @@ #define I2C_SOFT_BUS_1 1 #define OLED_I2CBB1 1 #define ACCEL_I2CBB1 1 +#define TIPTYPE_T12 1 // Can manually pick a T12 tip #define TEMP_TMP36 #endif /* TS100 */ @@ -213,6 +213,8 @@ #define TEMP_NTC 1 #define ACCEL_I2CBB1 1 #define POW_EPR 1 +#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 #define DEBUG_POWER_MENU_BUTTON_B @@ -230,6 +232,8 @@ #define I2C_SOFT_BUS_2 1 #define LIS_ORI_FLIP #define OLED_FLIP +#define TIPTYPE_TS80 1 // Only one tip type so far + #endif /* TS80(P) */ #ifdef MODEL_TS80 diff --git a/source/Core/BSP/Pinecil/BSP.cpp b/source/Core/BSP/Pinecil/BSP.cpp index 56e968108..dca65fd6e 100644 --- a/source/Core/BSP/Pinecil/BSP.cpp +++ b/source/Core/BSP/Pinecil/BSP.cpp @@ -5,6 +5,7 @@ #include "I2C_Wrapper.hpp" #include "IRQ.h" #include "Pins.h" +#include "Settings.h" #include "Setup.h" #include "TipThermoModel.h" #include "configuration.h" @@ -93,7 +94,13 @@ void setBuzzer(bool on) {} uint8_t preStartChecks() { return 1; } uint64_t getDeviceID() { return dbg_id_get(); } -uint8_t getTipResistanceX10() { return TIP_RESISTANCE; } +uint8_t getTipResistanceX10() { + uint8_t user_selected_tip = getUserSelectedTipResistance(); + if (user_selected_tip == 0) { + return TIP_RESISTANCE; // Auto mode + } + return user_selected_tip; +} bool isTipShorted() { return false; } uint8_t preStartChecksDone() { return 1; } diff --git a/source/Core/BSP/Pinecil/configuration.h b/source/Core/BSP/Pinecil/configuration.h index cfef29d11..fe04595bb 100644 --- a/source/Core/BSP/Pinecil/configuration.h +++ b/source/Core/BSP/Pinecil/configuration.h @@ -1,6 +1,5 @@ #ifndef CONFIGURATION_H_ #define CONFIGURATION_H_ -#include "Settings.h" #include /** * Configuration.h @@ -155,6 +154,7 @@ #define POW_QC_20V 1 #define ENABLE_QC2 1 #define MAG_SLEEP_SUPPORT 1 +#define TIPTYPE_T12 1 // Can manually pick a T12 tip #define TEMP_TMP36 #define ACCEL_BMA #define ACCEL_SC7 diff --git a/source/Core/BSP/Pinecilv2/BSP.cpp b/source/Core/BSP/Pinecilv2/BSP.cpp index e019407ef..4bcedb13d 100644 --- a/source/Core/BSP/Pinecilv2/BSP.cpp +++ b/source/Core/BSP/Pinecilv2/BSP.cpp @@ -5,6 +5,7 @@ #include "I2C_Wrapper.hpp" #include "IRQ.h" #include "Pins.h" +#include "Settings.h" #include "Setup.h" #include "TipThermoModel.h" #include "USBPD.h" @@ -152,7 +153,11 @@ uint8_t tipResistanceReadingSlot = 0; uint8_t getTipResistanceX10() { // Return tip resistance in x10 ohms // We can measure this using the op-amp - return lastTipResistance; + uint8_t user_selected_tip = getUserSelectedTipResistance(); + if (user_selected_tip == 0) { + return lastTipResistance; // Auto mode + } + return user_selected_tip; } uint16_t getTipThermalMass() { return 120; } @@ -289,4 +294,4 @@ TemperatureType_t getCustomTipMaxInC() { TemperatureType_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(max_reading); maximumTipTemp += getHandleTemperature(0) / 10; // Add handle offset return maximumTipTemp - 1; -} \ No newline at end of file +} diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 2d8079312..8ca4ff406 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -1,6 +1,5 @@ #ifndef CONFIGURATION_H_ #define CONFIGURATION_H_ -#include "Settings.h" #include /** * Configuration.h @@ -155,6 +154,8 @@ #define POW_EPR 1 #define ENABLE_QC2 1 #define MAG_SLEEP_SUPPORT 1 +#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 #define OLED_96x16 1 #define TEMP_NTC diff --git a/source/Core/BSP/Sequre/BSP.cpp b/source/Core/BSP/Sequre/BSP.cpp index 16d6dfd61..32daec13f 100644 --- a/source/Core/BSP/Sequre/BSP.cpp +++ b/source/Core/BSP/Sequre/BSP.cpp @@ -6,6 +6,7 @@ #include "HUB238.hpp" #include "I2C_Wrapper.hpp" #include "Pins.h" +#include "Settings.h" #include "Setup.h" #include "TipThermoModel.h" #include "configuration.h" @@ -262,7 +263,11 @@ uint8_t getTipResistanceX10() { return TIP_RESISTANCE + ((TIP_RESISTANCE * scaler) / 100000); #else - return TIP_RESISTANCE; + uint8_t user_selected_tip = getUserSelectedTipResistance(); + if (user_selected_tip == 0) { + return TIP_RESISTANCE; // Auto mode + } + return user_selected_tip; #endif } bool isTipShorted() { return false; } @@ -277,4 +282,4 @@ void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR) #ifdef CUSTOM_MAX_TEMP_C TemperatureType_t getCustomTipMaxInC() { return MAX_TEMP_C; } -#endif \ No newline at end of file +#endif diff --git a/source/Core/BSP/Sequre/configuration.h b/source/Core/BSP/Sequre/configuration.h index fca1fb71e..be3c9f6b4 100644 --- a/source/Core/BSP/Sequre/configuration.h +++ b/source/Core/BSP/Sequre/configuration.h @@ -1,6 +1,5 @@ #ifndef CONFIGURATION_H_ #define CONFIGURATION_H_ -#include "Settings.h" #include /** * Configuration.h diff --git a/source/Core/Drivers/BootLogo.cpp b/source/Core/Drivers/BootLogo.cpp index e1f4d7de5..af43fee43 100644 --- a/source/Core/Drivers/BootLogo.cpp +++ b/source/Core/Drivers/BootLogo.cpp @@ -2,6 +2,7 @@ #include "BSP.h" #include "Buttons.hpp" #include "OLED.hpp" +#include "Settings.h" #include "cmsis_os.h" #define LOGO_PAGE_LENGTH 1024 diff --git a/source/Core/Drivers/FS2711.cpp b/source/Core/Drivers/FS2711.cpp index 35e90898a..e6624b306 100644 --- a/source/Core/Drivers/FS2711.cpp +++ b/source/Core/Drivers/FS2711.cpp @@ -1,9 +1,11 @@ -#include "FS2711.hpp" -#include "FS2711_defines.h" -#include "I2CBB2.hpp" #include "configuration.h" + #if POW_PD_EXT == 2 #include "BSP.h" +#include "FS2711.hpp" +#include "FS2711_defines.h" +#include "I2CBB2.hpp" +#include "Settings.h" #include "cmsis_os.h" #include #include diff --git a/source/Core/Drivers/OLED.cpp b/source/Core/Drivers/OLED.cpp index 7d641dbb7..adde9d2b3 100644 --- a/source/Core/Drivers/OLED.cpp +++ b/source/Core/Drivers/OLED.cpp @@ -6,6 +6,7 @@ */ #include "Buttons.hpp" +#include "Settings.h" #include "Translation.h" #include "cmsis_os.h" #include "configuration.h" diff --git a/source/Core/Drivers/USBPD.cpp b/source/Core/Drivers/USBPD.cpp index 6c21f5ed5..016f882a2 100644 --- a/source/Core/Drivers/USBPD.cpp +++ b/source/Core/Drivers/USBPD.cpp @@ -1,9 +1,9 @@ #include "USBPD.h" #include "configuration.h" #ifdef POW_PD - #include "BSP_PD.h" #include "FreeRTOS.h" +#include "Settings.h" #include "fusb302b.h" #include "main.hpp" #include "pd.h" diff --git a/source/Core/Drivers/Utils.cpp b/source/Core/Drivers/Utils.cpp index 20f8c46fa..4ebb6e737 100644 --- a/source/Core/Drivers/Utils.cpp +++ b/source/Core/Drivers/Utils.cpp @@ -6,6 +6,7 @@ */ #include "BSP_Power.h" +#include "Settings.h" #include "configuration.h" #include diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index 44d9a1ff0..715b79912 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -7,11 +7,12 @@ * Houses the system settings and allows saving / restoring from flash */ -#ifndef SETTINGS_H_ -#define SETTINGS_H_ +#include "configuration.h" + +#ifndef CORE_SETTINGS_H_ +#define CORE_SETTINGS_H_ #include #include - #ifdef MODEL_Pinecilv2 // Required settings reset for PR #1916 #define SETTINGSVERSION (0x55AB) // This number is frozen, do not edit @@ -74,8 +75,9 @@ enum SettingsOptions { 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 // - SettingsOptionsLength = 54, // + SettingsOptionsLength = 55, // End marker }; typedef enum { @@ -117,6 +119,31 @@ typedef enum { FULL = 2, // Locking buttons for Boost mode AND for Soldering mode } lockingMode_t; +/* Selection of the soldering tip + * 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) + */ +typedef enum { +#ifdef AUTO_TIP_SELECTION + TIP_TYPE_AUTO, // If the hardware supports automatic detection +#endif + +#ifdef TIPTYPE_T12 + T12_8_OHM, // TS100 style tips or Hakko T12 tips with adaptors + T12_6_2_OHM, // Short Tips manufactured by Pine64 + T12_4_OHM, // Longer tip but low resistance for PTS200 +#endif + // #ifdef TIPTYPE_TS80 + // TS80_4_5_OHM, // TS80(P) default tips + // // We do not know of other tuning tips (?yet?) + // #endif + // #ifdef TIPTYPE_JBC + // JBC_210_2_5_OHM, // Small JBC tips as used in the S60/S60P + // #endif + TIP_TYPE_MAX, // Max value marker +} tipType_t; +uint8_t getUserSelectedTipResistance(); // returns the resistance matching the selected tip type or 0 for auto + // Settings wide operations void saveSettings(); bool loadSettings(); @@ -129,11 +156,11 @@ uint16_t getSettingValue(const enum SettingsOptions option); void nextSettingValue(const enum SettingsOptions option); void prevSettingValue(const enum SettingsOptions option); bool isLastSettingValue(const enum SettingsOptions option); - +// For setting values to settings void setSettingValue(const enum SettingsOptions option, const uint16_t newValue); -// Special access -uint8_t lookupVoltageLevel(); -uint16_t lookupHallEffectThreshold(); - -#endif /* SETTINGS_H_ */ +// Special access helpers, to reduce logic duplication +uint8_t lookupVoltageLevel(); +uint16_t lookupHallEffectThreshold(); +const char *lookupTipName(); // Get the name string for the current soldering tip +#endif /* SETTINGS_H_ */ diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index 92185f676..c8ad90198 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -106,6 +106,7 @@ enum class SettingsItemIndex : uint8_t { PowerPulseDuration, SettingsReset, LanguageSwitch, + SolderingTipType, NUM_ITEMS, }; @@ -149,6 +150,12 @@ struct TranslationIndexTable { uint16_t USBPDModeDefault; uint16_t USBPDModeNoDynamic; uint16_t USBPDModeSafe; + uint16_t TipTypeAuto; + uint16_t TipTypeT12Long; + uint16_t TipTypeT12Short; + uint16_t TipTypeT12PTS; + uint16_t TipTypeTS80; + uint16_t TipTypeJBCC210; uint16_t SettingsDescriptions[static_cast(SettingsItemIndex::NUM_ITEMS)]; uint16_t SettingsShortNames[static_cast(SettingsItemIndex::NUM_ITEMS)]; diff --git a/source/Core/Src/ScrollMessage.cpp b/source/Core/Src/ScrollMessage.cpp index ff7a2b513..c56b593bd 100644 --- a/source/Core/Src/ScrollMessage.cpp +++ b/source/Core/Src/ScrollMessage.cpp @@ -1,6 +1,6 @@ #include "ScrollMessage.hpp" - #include "OLED.hpp" +#include "Settings.h" #include "configuration.h" /** diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 1a4e3729b..b3507c3d1 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -16,6 +16,10 @@ #include // for memset bool sanitiseSettings(); +/* + * Used to constrain the QC 3.0 Voltage selection to suit hardware. + * We allow a little overvoltage for users who want to push it + */ #ifdef POW_QC_20V #define QC_VOLTAGE_MAX 220 #else @@ -51,60 +55,61 @@ typedef struct { static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = { //{ 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 - { 0, 4, 1, CUT_OUT_SETTING}, // MinDCVoltageCells - { 24, 38, 1, RECOM_VOL_CELL}, // MinVoltageCells - { 90, QC_VOLTAGE_MAX, 2, 90}, // QCIdealVoltage - { 0, MAX_ORIENTATION_MODE, 1, ORIENTATION_MODE}, // OrientationMode - { 0, 9, 1, SENSITIVITY}, // Sensitivity - { 0, 1, 1, ANIMATION_LOOP}, // AnimationLoop - { 0, settingOffSpeed_t::MAX_VALUE - 1, 1, ANIMATION_SPEED}, // AnimationSpeed - { 0, 3, 1, AUTO_START_MODE}, // AutoStartMode - { 0, 60, 1, SHUTDOWN_TIME}, // ShutdownTime - { 0, 1, 1, COOLING_TEMP_BLINK}, // CoolingTempBlink - { 0, 1, 1, DETAILED_IDLE}, // DetailedIDLE - { 0, 1, 1, DETAILED_SOLDERING}, // DetailedSoldering - { 0, (uint16_t)(HasFahrenheit ? 1 : 0), 1, TEMPERATURE_INF}, // TemperatureInF - { 0, 1, 1, DESCRIPTION_SCROLL_SPEED}, // DescriptionScrollSpeed - { 0, 2, 1, LOCKING_MODE}, // LockingMode - { 0, 99, 1, POWER_PULSE_DEFAULT}, // KeepAwakePulse - { 1, POWER_PULSE_WAIT_MAX, 1, POWER_PULSE_WAIT_DEFAULT}, // KeepAwakePulseWait - { 1, POWER_PULSE_DURATION_MAX, 1, POWER_PULSE_DURATION_DEFAULT}, // KeepAwakePulseDuration - { 360, 900, 1, VOLTAGE_DIV}, // VoltageDiv - { 0, MAX_TEMP_F, 10, BOOST_TEMP}, // BoostTemp - {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 - { 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 - { 0, 9, 1, 0}, // AccelMissingWarningCounter - { 0, 9, 1, 0}, // PDMissingWarningCounter - { 0, 0xFFFF, 0, 41431 /*EN*/}, // UILanguage - { 0, 50, 1, 20}, // PDNegTimeout - { 0, 1, 1, 0}, // OLEDInversion - { MIN_BRIGHTNESS, MAX_BRIGHTNESS, BRIGHTNESS_STEP, DEFAULT_BRIGHTNESS}, // OLEDBrightness - { 0, 6, 1, 1}, // LOGOTime - { 0, 1, 1, 0}, // CalibrateCJC - { 0, 1, 1, 0}, // BluetoothLE - { 0, 2, 1, 1}, // USBPDMode - { 1, 5, 1, 4}, // ProfilePhases - { MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePreheatTemp - { 1, 10, 1, 1}, // ProfilePreheatSpeed - { MIN_TEMP_C, MAX_TEMP_F, 5, 130}, // ProfilePhase1Temp - { 10, 180, 5, 90}, // ProfilePhase1Duration - { MIN_TEMP_C, MAX_TEMP_F, 5, 140}, // ProfilePhase2Temp - { 10, 180, 5, 30}, // ProfilePhase2Duration - { MIN_TEMP_C, MAX_TEMP_F, 5, 165}, // ProfilePhase3Temp - { 10, 180, 5, 30}, // ProfilePhase3Duration - { MIN_TEMP_C, MAX_TEMP_F, 5, 140}, // ProfilePhase4Temp - { 10, 180, 5, 30}, // ProfilePhase4Duration - { MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePhase5Temp - { 10, 180, 5, 30}, // ProfilePhase5Duration - { 1, 10, 1, 2}, // ProfileCooldownSpeed - { 0, 12, 1, 0}, // HallEffectSleepTime + { 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 + { 0, 4, 1, CUT_OUT_SETTING}, // MinDCVoltageCells + { 24, 38, 1, RECOM_VOL_CELL}, // MinVoltageCells + { 90, QC_VOLTAGE_MAX, 2, 90}, // QCIdealVoltage + { 0, MAX_ORIENTATION_MODE, 1, ORIENTATION_MODE}, // OrientationMode + { 0, 9, 1, SENSITIVITY}, // Sensitivity + { 0, 1, 1, ANIMATION_LOOP}, // AnimationLoop + { 0, settingOffSpeed_t::MAX_VALUE - 1, 1, ANIMATION_SPEED}, // AnimationSpeed + { 0, 3, 1, AUTO_START_MODE}, // AutoStartMode + { 0, 60, 1, SHUTDOWN_TIME}, // ShutdownTime + { 0, 1, 1, COOLING_TEMP_BLINK}, // CoolingTempBlink + { 0, 1, 1, DETAILED_IDLE}, // DetailedIDLE + { 0, 1, 1, DETAILED_SOLDERING}, // DetailedSoldering + { 0, (uint16_t)(HasFahrenheit ? 1 : 0), 1, TEMPERATURE_INF}, // TemperatureInF + { 0, 1, 1, DESCRIPTION_SCROLL_SPEED}, // DescriptionScrollSpeed + { 0, 2, 1, LOCKING_MODE}, // LockingMode + { 0, 99, 1, POWER_PULSE_DEFAULT}, // KeepAwakePulse + { 1, POWER_PULSE_WAIT_MAX, 1, POWER_PULSE_WAIT_DEFAULT}, // KeepAwakePulseWait + { 1, POWER_PULSE_DURATION_MAX, 1, POWER_PULSE_DURATION_DEFAULT}, // KeepAwakePulseDuration + { 360, 900, 1, VOLTAGE_DIV}, // VoltageDiv + { 0, MAX_TEMP_F, 10, BOOST_TEMP}, // BoostTemp + {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 + { 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 + { 0, 9, 1, 0}, // AccelMissingWarningCounter + { 0, 9, 1, 0}, // PDMissingWarningCounter + { 0, 0xFFFF, 0, 41431 /*EN*/}, // UILanguage + { 0, 50, 1, 20}, // PDNegTimeout + { 0, 1, 1, 0}, // OLEDInversion + { MIN_BRIGHTNESS, MAX_BRIGHTNESS, BRIGHTNESS_STEP, DEFAULT_BRIGHTNESS}, // OLEDBrightness + { 0, 6, 1, 1}, // LOGOTime + { 0, 1, 1, 0}, // CalibrateCJC + { 0, 1, 1, 0}, // BluetoothLE + { 0, 2, 1, 1}, // USBPDMode + { 1, 5, 1, 4}, // ProfilePhases + { MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePreheatTemp + { 1, 10, 1, 1}, // ProfilePreheatSpeed + { MIN_TEMP_C, MAX_TEMP_F, 5, 130}, // ProfilePhase1Temp + { 10, 180, 5, 90}, // ProfilePhase1Duration + { MIN_TEMP_C, MAX_TEMP_F, 5, 140}, // ProfilePhase2Temp + { 10, 180, 5, 30}, // ProfilePhase2Duration + { MIN_TEMP_C, MAX_TEMP_F, 5, 165}, // ProfilePhase3Temp + { 10, 180, 5, 30}, // ProfilePhase3Duration + { MIN_TEMP_C, MAX_TEMP_F, 5, 140}, // ProfilePhase4Temp + { 10, 180, 5, 30}, // ProfilePhase4Duration + { MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePhase5Temp + { 10, 180, 5, 30}, // ProfilePhase5Duration + { 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 }; static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength)); @@ -292,3 +297,76 @@ uint8_t lookupVoltageLevel() { return (minVoltageOnCell * minVoltageCellCount) + (minVoltageCellCount * 2); } } + +const char *lookupTipName() { + // Get the name string for the current soldering tip + 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); + break; + case tipType_t::T12_6_2_OHM: + return translatedString(Tr->TipTypeT12Short); + break; + case tipType_t::T12_4_OHM: + return translatedString(Tr->TipTypeT12PTS); + break; +#endif +#ifdef TIPTYE_TS80 + case tipType_t::TS80_4_5_OHM: + return translatedString(Tr->TipTypeTS80); + break; +#endif +#ifdef TIPTYPE_JBC + case tipType_t::JBC_210_2_5_OHM: + return translatedString(Tr->TipTypeJBCC210); + break; +#endif + default: + return nullptr; + break; + } +} +// Returns the resistance for the current tip selected by the user or 0 for auto +uint8_t getUserSelectedTipResistance() { + tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType); + + switch (value) { +#ifdef AUTO_TIP_SELECTION + case tipType_t::TIP_TYPE_AUTO: + return 0; + break; +#endif +#ifdef TIPTYPE_T12 + case tipType_t::T12_8_OHM: + return 80; + break; + case tipType_t::T12_6_2_OHM: + return 62; + break; + case tipType_t::T12_4_OHM: + return 40; + break; +#endif +#ifdef TIPTYE_TS80 + case tipType_t::TS80_4_5_OHM: + return 45; + break; +#endif +#ifdef TIPTYPE_JBC + case tipType_t::JBC_210_2_5_OHM: + return 25; + break; +#endif + default: + return 0; + break; + } +} diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index c21071a5f..fac0d1009 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -115,6 +115,10 @@ static void displayHallEffectSleepTime(void); static bool showHallEffect(void); #endif /* HALL_SENSOR */ +// Tip type selection +static void displaySolderingTipType(void); +static bool showSolderingTipType(void); + // Menu functions #if defined(POW_DC) || defined(POW_QC) || defined(POW_PD) @@ -137,6 +141,7 @@ static void displayAdvancedMenu(void); * USBPDMode * * Soldering + * Tip Type selection * Boost Mode Temp * Auto Start * Temp Change Short Step @@ -262,6 +267,7 @@ const menuitem powerMenu[] = { const menuitem solderingMenu[] = { /* + * Tip Type * Boost Mode Temp * Auto Start * Temp Change Short Step @@ -282,6 +288,8 @@ 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 */ @@ -755,7 +763,12 @@ static void displayHallEffectSleepTime(void) { } } #endif /* HALL_SENSOR */ - +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; } static void setTempF(const enum SettingsOptions option) { uint16_t Temp = getSettingValue(option); if (getSettingValue(SettingsOptions::TemperatureInF)) { diff --git a/source/Core/Threads/UI/drawing/ui_drawing.hpp b/source/Core/Threads/UI/drawing/ui_drawing.hpp index ecfc1ec10..4f88aa7d7 100644 --- a/source/Core/Threads/UI/drawing/ui_drawing.hpp +++ b/source/Core/Threads/UI/drawing/ui_drawing.hpp @@ -3,6 +3,7 @@ #include "Buttons.hpp" #include "OLED.hpp" #include "OperatingModeUtilities.h" +#include "Settings.h" #include "configuration.h" #include #include @@ -21,13 +22,13 @@ void ui_draw_soldering_power_status(bool boost_mode_on); void ui_draw_soldering_basic_status(bool boostModeOn); void ui_draw_soldering_detailed_sleep(TemperatureType_t tipTemp); void ui_draw_soldering_basic_sleep(TemperatureType_t tipTemp); -void ui_draw_soldering_profile_advanced(TemperatureType_t tipTemp, TemperatureType_t profileCurrentTargetTemp, uint32_t phaseElapsedSeconds, uint32_t phase,const uint32_t phaseTimeGoal); +void ui_draw_soldering_profile_advanced(TemperatureType_t tipTemp, TemperatureType_t profileCurrentTargetTemp, uint32_t phaseElapsedSeconds, uint32_t phase, const uint32_t phaseTimeGoal); -//Temp change +// Temp change void ui_draw_temperature_change(void); -//USB-PD debug -void ui_draw_usb_pd_debug_state(const uint16_t vbus_sense_state, const uint8_t stateNumber) ; -void ui_draw_usb_pd_debug_pdo(const uint8_t entry_num, const uint16_t min_voltage, const uint16_t max_voltage, const uint16_t current_a_x100, const uint16_t wattage) ; +// USB-PD debug +void ui_draw_usb_pd_debug_state(const uint16_t vbus_sense_state, const uint8_t stateNumber); +void ui_draw_usb_pd_debug_pdo(const uint8_t entry_num, const uint16_t min_voltage, const uint16_t max_voltage, const uint16_t current_a_x100, const uint16_t wattage); // Utils void printVoltage(void); -#endif // UI_DRAWING_UI_DRAWING_HPP_ \ No newline at end of file +#endif // UI_DRAWING_UI_DRAWING_HPP_ diff --git a/source/Core/Threads/UI/logic/utils/OperatingModeUtilities.h b/source/Core/Threads/UI/logic/utils/OperatingModeUtilities.h index 1bd0835ee..519bdad36 100644 --- a/source/Core/Threads/UI/logic/utils/OperatingModeUtilities.h +++ b/source/Core/Threads/UI/logic/utils/OperatingModeUtilities.h @@ -2,6 +2,7 @@ #define OPERATING_MODE_UTILITIES_H_ #include "Buttons.hpp" #include "OLED.hpp" +#include "Settings.h" #include void GUIDelay(); // @@ -14,4 +15,4 @@ void printVoltage(void); // bool checkForUnderVoltage(void); // uint16_t min(uint16_t a, uint16_t b); // void printCountdownUntilSleep(int sleepThres); // -#endif \ No newline at end of file +#endif diff --git a/source/Makefile b/source/Makefile index 0754d7c6a..4ff5bec1e 100644 --- a/source/Makefile +++ b/source/Makefile @@ -1,5 +1,5 @@ ifndef model -model:=Pinecil +model:=Pinecilv2 endif ALL_MINIWARE_MODELS=TS100 TS80 TS80P TS101