diff options
author | discip <[email protected]> | 2023-11-29 18:02:36 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-29 18:02:36 +0100 |
commit | 698026eb366a495be98bc227ed274ac17289e3b3 (patch) | |
tree | 9226c5d0b2799516dd1c80befd13a24a192c4e72 | |
parent | be41415717754f9dd683348cefd70d27b8e615db (diff) | |
parent | 20ad63d0206513e0b1f72acb037d7d70dd472d94 (diff) | |
download | IronOS-698026eb366a495be98bc227ed274ac17289e3b3.tar.gz IronOS-698026eb366a495be98bc227ed274ac17289e3b3.zip |
Merge branch 'dev' into dev
-rw-r--r-- | Documentation/Flashing/MHP30.md | 4 | ||||
-rw-r--r-- | Documentation/Flashing/TS100.md | 4 | ||||
-rw-r--r-- | Documentation/Flashing/TS80(P).md | 4 | ||||
-rw-r--r-- | Documentation/Hardware.md | 9 | ||||
-rw-r--r-- | Translations/translation_BE.json | 22 | ||||
-rw-r--r-- | source/Core/Drivers/BootLogo.cpp | 58 | ||||
-rw-r--r-- | source/Core/Drivers/Font.h | 14 | ||||
-rw-r--r-- | source/Core/Inc/Settings.h | 6 | ||||
-rw-r--r-- | source/Core/Src/Settings.cpp | 2 | ||||
-rw-r--r-- | source/Core/Src/settingsGUI.cpp | 15 | ||||
-rw-r--r-- | source/Core/Threads/GUIThread.cpp | 12 |
11 files changed, 93 insertions, 57 deletions
diff --git a/Documentation/Flashing/MHP30.md b/Documentation/Flashing/MHP30.md index 4ac4c5d1..afc13313 100644 --- a/Documentation/Flashing/MHP30.md +++ b/Documentation/Flashing/MHP30.md @@ -26,9 +26,9 @@ Then this works the same as a production release (use the correct file). # MHP30 -This is completely safe, but if it goes wrong just put the `.hex` file from the official website ([MHP30](https://www.minidso.com/forum.php?mod=viewthread&tid=4385&extra=page%3D1) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called MHP30.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `MHP30_{Language-Code}.hex`. +This is completely safe, but if it goes wrong just put the corresponding `.hex` file from [the official website](https://e-design.com.cn/en/NewsDetail/4203645.html) ([mirror backup](https://github.com/Ralim/IronOS-Meta/tree/main/Firmware/Miniware)) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called MHP30.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `MHP30_{Language-Code}.hex`. -Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under Mac, and can be made to work under Linux _sometimes_. Details over on the [wiki page](https://github.com/Ralim/IronOS/wiki/Upgrading-Firmware). +Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under [Mac](#mac), and can be made to work under [Linux](#linux) _sometimes_ (look for details below). 1. Hold the button closest to the tip (MHP30 the left button on the back), and plug in the USB to the computer. 2. The unit will appear as a USB drive. (Screen will say `DFU` on it.) diff --git a/Documentation/Flashing/TS100.md b/Documentation/Flashing/TS100.md index 787164e1..0d5ff257 100644 --- a/Documentation/Flashing/TS100.md +++ b/Documentation/Flashing/TS100.md @@ -26,9 +26,9 @@ Then this works the same as a production release (use the correct file). # TS100 -This is completely safe, but if it goes wrong just put the `.hex` file from the official website ([TS100](https://www.minidso.com/forum.php?mod=viewthread&tid=868&extra=page%3D1) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called TS100.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `TS100_{Language-Code}.hex`. +This is completely safe, but if it goes wrong just put the corresponding `.hex` file from [the official website](https://e-design.com.cn/en/NewsDetail/4203645.html) ([mirror backup](https://github.com/Ralim/IronOS-Meta/tree/main/Firmware/Miniware)) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called TS100.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `TS100_{Language-Code}.hex`. -Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under Mac, and can be made to work under Linux _sometimes_. Details over on the [wiki page](https://github.com/Ralim/IronOS/wiki/Upgrading-Firmware). +Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under [Mac](#mac), and can be made to work under [Linux](#linux) _sometimes_ (look for details below). 1. Hold the button closest to the tip (MHP30 the left button on the back), and plug in the USB to the computer. 2. The unit will appear as a USB drive. (Screen will say `DFU` on it.) diff --git a/Documentation/Flashing/TS80(P).md b/Documentation/Flashing/TS80(P).md index deaa6b98..739f4da4 100644 --- a/Documentation/Flashing/TS80(P).md +++ b/Documentation/Flashing/TS80(P).md @@ -26,9 +26,9 @@ Then this works the same as a production release (use the correct file). # TS80 / TS80P -This is completely safe, but if it goes wrong just put the `.hex` file from the official website ([TS80](https://www.minidso.com/forum.php?mod=viewthread&tid=868&extra=page%3D1)/[TS80P](https://www.minidso.com/forum.php?mod=viewthread&tid=4070&extra=page%3D1) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called TS80.zip or TS80P.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `TS80_{Language-Code}.hex`/`TS80P_{Language-Code}.hex`. +This is completely safe, but if it goes wrong just put the corresponding `.hex` file from [the official website](https://e-design.com.cn/en/NewsDetail/4203645.html) ([mirror backup](https://github.com/Ralim/IronOS-Meta/tree/main/Firmware/Miniware)) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called TS80.zip or TS80P.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `TS80_{Language-Code}.hex`/`TS80P_{Language-Code}.hex`. -Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under Mac, and can be made to work under Linux _sometimes_. Details over on the [wiki page](https://github.com/Ralim/TS80/wiki/Upgrading-Firmware). +Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under [Mac](#mac), and can be made to work under [Linux](#linux) _sometimes_ (look for details below). 1. Hold the button closest to the tip (MHP30 the left button on the back), and plug in the USB to the computer. 2. The unit will appear as a USB drive. (Screen will say `DFU` on it.) diff --git a/Documentation/Hardware.md b/Documentation/Hardware.md index 4734a552..55f52512 100644 --- a/Documentation/Hardware.md +++ b/Documentation/Hardware.md @@ -8,7 +8,7 @@ TS100\* is a neat soldering iron: - can run from 9-25V DC; - provides a power range that is determined by the input voltage; - voltages below 12V don't overly work well for any substantial mass; -- the default firmware can be found [here](https://www.minidso.com/forum.php?mod=viewthread&tid=892&extra=page%3D1). +- 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://brushlesswhoop.com/images/ts100-og.jpg) @@ -19,7 +19,7 @@ TS80\* is a successor to TS100: - 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 default firmware can be found [here](https://www.minidso.com/forum.php?mod=viewthread&tid=3208&extra=page%3D1). +- 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) @@ -30,7 +30,7 @@ TS80P\* is a successor to TS80: - supports _Quick Charge 3.0_ (_QC3_: 9V/3A, 18W max); - supports _Power Delivery_ (_PD_: 9V/3A & 12V/3A, 30W max)\*\*; -- the default firmware can be found [here](https://www.minidso.com/forum.php?mod=viewthread&tid=4085&extra=page%3D1). +- 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)). \*\*: use valid PD device that supports 12V/3A as power source to get full 30W potential, otherwise the iron will fall back to 9V/18W power mode. @@ -44,7 +44,8 @@ MHP30 is a **M**ini **H**ot **P**late: - accelerometer is the MSA301, this is mounted roughly in the middle of the unit; - USB-PD is using the FUSB302; - the hardware I2C bus on PB6/7 is used for the MSA301 and FUSB302; -- the OLED is the same SSD1306 as everything else, but it’s on a bit-banged bus. +- the OLED is the same SSD1306 as everything else, but it’s on a bit-banged bus; +- 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)). ### Pinecil diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index 30039009..092e95e8 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -31,7 +31,7 @@ "message": "Некантралюемае\nразаграванне" }, "WarningTipShorted": { - "message": "!Tip Shorted!" + "message": "!Кароткае замыканне на джале!" }, "SettingsCalibrationWarning": { "message": "Пераканайцеся, што пры наступнай загрузцы наканечнік і ручка маюць пакаёвую тэмпературу!" @@ -64,16 +64,16 @@ "message": "Выкл." }, "ProfilePreheatString": { - "message": "Preheat\n" + "message": "Разагрэць\n" }, "ProfileCooldownString": { - "message": "Cooldown\n" + "message": "Астудзіць\n" }, "DeviceFailedValidationWarning": { "message": "Ваша прылада, хутчэй за ўсё, падробка!" }, "TooHotToStartProfileWarning": { - "message": "Too hot to\nstart profile" + "message": "Занадта горача\nкаб запусціць профіль" } }, "characters": { @@ -157,23 +157,23 @@ }, "ProfilePhases": { "displayText": "Profile\nPhases", - "description": "Number of phases in profile mode" + "description": "Колькасць фаз у рэжыме профілю" }, "ProfilePreheatTemp": { "displayText": "Preheat\nTemp", - "description": "Preheat to this temperature at the start of profile mode" + "description": "Разагрэйце да гэтай тэмпературы ў пачатку профільнага рэжыму" }, "ProfilePreheatSpeed": { "displayText": "Preheat\nSpeed", - "description": "Preheat at this rate (degrees per second)" + "description": "Разагрэйце з гэтай хуткасцю (градусы ў секунду)" }, "ProfilePhase1Temp": { "displayText": "Phase 1\nTemp", - "description": "Target temperature for the end of this phase" + "description": "Мэтавая тэмпература ў канцы гэтай фазы" }, "ProfilePhase1Duration": { "displayText": "Phase 1\nDuration", - "description": "Target duration of this phase (seconds)" + "description": "Мэтавая працягласць гэтай фазы (секунды)" }, "ProfilePhase2Temp": { "displayText": "Phase 2\nTemp", @@ -209,7 +209,7 @@ }, "ProfileCooldownSpeed": { "displayText": "Cooldown\nSpeed", - "description": "Cooldown at this rate at the end of profile mode (degrees per second)" + "description": "Астуджаць з гэтай хуткасцю ў канцы профільнага рэжыму (градусы ў секунду)" }, "MotionSensitivity": { "displayText": "Адчувальнасць\nакселерометра", @@ -281,7 +281,7 @@ }, "BluetoothLE": { "displayText": "Bluetooth\n", - "description": "Enables BLE" + "description": "Уключыць BLE" }, "PowerLimit": { "displayText": "Межы\nмагутнасці", diff --git a/source/Core/Drivers/BootLogo.cpp b/source/Core/Drivers/BootLogo.cpp index f21b8993..f1f5693d 100644 --- a/source/Core/Drivers/BootLogo.cpp +++ b/source/Core/Drivers/BootLogo.cpp @@ -3,10 +3,11 @@ #include "Buttons.hpp" #include "OLED.hpp" #include "cmsis_os.h" + #define LOGO_PAGE_LENGTH 1024 void delay() { - if (getSettingValue(SettingsOptions::LOGOTime) == 5) { + if (getSettingValue(SettingsOptions::LOGOTime) >= logoMode_t::ONETIME) { waitForButtonPress(); } else { waitForButtonPressOrTimeout(TICKS_SECOND * getSettingValue(SettingsOptions::LOGOTime)); @@ -20,60 +21,75 @@ void BootLogo::handleShowingLogo(const uint8_t *ptrLogoArea) { } else if (ptrLogoArea[0] == 0xAA) { showNewFormat(ptrLogoArea + 1); } + OLED::clearScreen(); OLED::refresh(); } void BootLogo::showOldFormat(const uint8_t *ptrLogoArea) { - OLED::drawAreaSwapped(0, 0, 96, 16, (uint8_t *)(ptrLogoArea + 4)); OLED::refresh(); - - // Delay here until button is pressed or its been the amount of seconds set by the user + // Delay here with static logo until a button is pressed or its been the amount of seconds set by the user delay(); } void BootLogo::showNewFormat(const uint8_t *ptrLogoArea) { - if (getSettingValue(SettingsOptions::LOGOTime) == 0) { + if (getSettingValue(SettingsOptions::LOGOTime) == logoMode_t::SKIP) { return; } + // New logo format (a) fixes long standing byte swap quirk and (b) supports animation uint8_t interFrameDelay = ptrLogoArea[0]; OLED::clearScreen(); - ButtonState buttons = getButtonState(); // Now draw in the frames int position = 1; - do { - + while (getButtonState() == BUTTON_NONE) { int len = (showNewFrame(ptrLogoArea + position)); OLED::refresh(); position += len; - buttons = getButtonState(); if (interFrameDelay) { osDelay(interFrameDelay * 4); } + // 1024 less the header type byte and the inter-frame-delay - if (getSettingValue(SettingsOptions::LOGOTime) > 0 && (position >= 1022 || len == 0)) { - // Delay here until button is pressed or its been the amount of seconds set by the user - delay(); - return; + if (getSettingValue(SettingsOptions::LOGOTime) && (position >= 1022 || len == 0)) { + // Animated logo stops here ... + if (getSettingValue(SettingsOptions::LOGOTime) == logoMode_t::INFINITY) { + // ... but if it's infinite logo setting then keep it rolling over again until a button is pressed + osDelay(4 * TICKS_100MS); + OLED::clearScreen(); + position = 1; + continue; + } + } else { + // Animation in progress so jumping to the next frame + continue; } - } while (buttons == BUTTON_NONE); + + // Static logo case ends up right here, so delay until a button is pressed or its been the amount of seconds set by the user + delay(); + return; + } } + int BootLogo::showNewFrame(const uint8_t *ptrLogoArea) { uint8_t length = ptrLogoArea[0]; - - if (length == 0xFF) { + switch (length) { + case 0: + // End + return 0; + break; + case 0xFE: + return 1; + break; + case 0xFF: // Full frame update OLED::drawArea(0, 0, 96, 16, ptrLogoArea + 1); length = 96; - } else if (length == 0xFE) { - return 1; - } else if (length == 0) { - return 0; // end - } else { + break; + default: length /= 2; // Draw length patches for (int p = 0; p < length; p++) { diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index 0bd08c82..234baefb 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -175,11 +175,17 @@ const uint8_t buttonB[] = { // 0xFE, 0x01, 0x79, 0x25, 0x79, 0x01, 0xFE, 0x00, 0x20, 0x20, 0x20, 0x20, 0xDF, 0x07, 0x8F, 0xDF, 0xFF, 0x01, 0xFE, 0x86, 0xDA, 0x86, 0xFE, 0x01,
// 0x7F, 0x80, 0xA4, 0xBE, 0xA0, 0x80, 0x7F, 0x00, 0x04, 0x0E, 0x1F, 0x04, 0xFB, 0xFB, 0xFB, 0xFB, 0xFF, 0x80, 0x7F, 0x5B, 0x41, 0x5F, 0x7F, 0x80};
-const uint8_t infinityIcon[] = {
- // width = 24
+const uint8_t RepeatOnce[] = {
+ // width = 16
+ // height = 16
+ 0x00, 0xc0, 0xf0, 0x78, 0x1c, 0x0c, 0x0e, 0x06, 0x06, 0x0e, 0x2c, 0x3c, 0x38, 0x3c, 0x00, 0x00,
+ 0x00, 0x01, 0x08, 0x04, 0x7e, 0x00, 0x00, 0x60, 0x60, 0x70, 0x30, 0x38, 0x1e, 0x0f, 0x03, 0x00};
+
+const uint8_t RepeatInf[] = {
+ // width = 16
// height = 16
- 0x00, 0xc0, 0x70, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x10, 0x20, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x70, 0xc0, 0x00,
- 0x00, 0x01, 0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x06, 0x03, 0x01, 0x00, 0x02, 0x04, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07, 0x01, 0x00};
+ 0x00, 0xc0, 0xf0, 0x78, 0x1c, 0x0c, 0x0e, 0x06, 0x06, 0x0e, 0x2c, 0x3c, 0x38, 0x3c, 0x00, 0x00,
+ 0x00, 0x31, 0x49, 0x48, 0x30, 0x48, 0x48, 0x30, 0x00, 0x00, 0x30, 0x38, 0x1e, 0x0f, 0x03, 0x00};
/*
* 16x16 icons
diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index c1eef128..f46df53b 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -92,6 +92,12 @@ typedef enum { AUTO = 2, // Automatic screen orientation based on accel.data if presented } orientationMode_t; +typedef enum { + SKIP = 0, // Skip boot logo + ONETIME = 5, // Show boot logo once (if animated) and stall until a button toggled + INFINITY = 6, // Show boot logo on repeat (if animated) until a button toggled +} logoMode_t; + // Settings wide operations void saveSettings(); bool loadSettings(); diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index 5196f4a4..e263943e 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -86,7 +86,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp {0, 50, 1, 20}, // PDNegTimeout {0, 1, 1, 0}, // OLEDInversion {MIN_BRIGHTNESS, MAX_BRIGHTNESS, BRIGHTNESS_STEP, DEFAULT_BRIGHTNESS}, // OLEDBrightness - {0, 5, 1, 1}, // LOGOTime + {0, 6, 1, 1}, // LOGOTime {0, 1, 1, 0}, // CalibrateCJC {0, 1, 1, 1}, // BluetoothLE {0, 1, 1, 1}, // PDVpdo diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index 9542b08c..cc6910ac 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -837,13 +837,20 @@ static void displayInvertColor(void) { } static void displayLogoTime(void) { - if (getSettingValue(SettingsOptions::LOGOTime) == 0) { + switch (getSettingValue(SettingsOptions::LOGOTime)) { + case logoMode_t::SKIP: OLED::print(translatedString(Tr->OffString), FontStyle::LARGE); - } else if (getSettingValue(SettingsOptions::LOGOTime) == 5) { - OLED::drawArea(OLED_WIDTH - 24 - 2, 0, 24, 16, infinityIcon); - } else { + break; + case logoMode_t::ONETIME: + OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, RepeatOnce); + break; + case logoMode_t::INFINITY: + OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, RepeatInf); + break; + default: OLED::printNumber(getSettingValue(SettingsOptions::LOGOTime), 2, FontStyle::LARGE); OLED::print(LargeSymbolSeconds, FontStyle::LARGE); + break; } } diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 56dc6574..a0684087 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -30,6 +30,7 @@ extern "C" { #include "USBPD.h" #include "pd.h" #endif + // File local variables extern bool heaterThermalRunaway; @@ -63,14 +64,13 @@ void startGUITask(void const *argument) { performCJCC(); } + uint16_t logoMode = getSettingValue(SettingsOptions::LOGOTime); + uint16_t startMode = getSettingValue(SettingsOptions::AutoStartMode); // If the boot logo is enabled (but it times out) and the autostart mode is enabled (but not set to sleep w/o heat), start heating during boot logo - if (getSettingValue(SettingsOptions::LOGOTime) > 0 && getSettingValue(SettingsOptions::LOGOTime) < 5 && getSettingValue(SettingsOptions::AutoStartMode) > 0 - && getSettingValue(SettingsOptions::AutoStartMode) < 3) { - uint16_t sleepTempDegC; + if (logoMode && logoMode < logoMode_t::ONETIME && startMode && startMode < autoStartMode_t::ZERO) { + uint16_t sleepTempDegC = getSettingValue(SettingsOptions::SleepTemp); if (getSettingValue(SettingsOptions::TemperatureInF)) { - sleepTempDegC = TipThermoModel::convertFtoC(getSettingValue(SettingsOptions::SleepTemp)); - } else { - sleepTempDegC = getSettingValue(SettingsOptions::SleepTemp); + sleepTempDegC = TipThermoModel::convertFtoC(sleepTempDegC); } // Only heat to sleep temperature (but no higher than 75°C for safety) currentTempTargetDegC = min(sleepTempDegC, 75); |