Skip to content

[WIP] Prep for 2.24 - #2253

Merged
Ralim merged 64 commits into
masterfrom
dev
Oct 29, 2026
Merged

Ralim merged 64 commits into
masterfrom
dev

Conversation

@Ralim

@Ralim Ralim commented Oct 23, 2026

Copy link
Copy Markdown
Owner
  • Please check if the PR fulfills these requirements
  • The changes have been tested locally
  • There are no breaking changes known (if there are, detail these at the end)
  • What kind of change does this PR introduce?
    Should have done this forever ago. Starting the motions for 2.24

  • What is the current behaviour?

  • What is the new behaviour (if this is a feature change)?

  • Other information:
    Going to try and get Add FNIRSI HS-01 / KAIWEETS KETS02 support #2251 in as well

Steltek and others added 30 commits August 31, 2025 17:57
Clarify that the -/B button needs to be held to get the debug menu.
* Update translation_ES.json

* Update translation_ES.json

Bug corrections and minor improvements

* Update translation_ES.json
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…/setup-python-6

chore(deps): bump actions/setup-python from 5 to 6
Update translation_DA.json
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…/upload-artifact-5

chore(deps): bump actions/upload-artifact from 4 to 5
…/download-artifact-6

chore(deps): bump actions/download-artifact from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…/checkout-6

chore(deps): bump actions/checkout from 5 to 6
Commit 0a63b6b didn't enable this feature for the Pinecil v1 despite
it supporting TIPTYPE_T12. Enable it so we can use different tip types.
Pinecil: Enable TIP_TYPE_SUPPORT
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v5...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v6...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
BLE: add setting and basic write protection
tvidal-net and others added 18 commits June 30, 2026 23:12
Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](actions/github-script@v8...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#2229)

Added info on required firmware version for logo support for pinecil v2; i recently bought one which was supplied with 'old' firmware and was not able to update the logo following the provided information. I hope this passage helps others to save some time.
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2240)

TS101: fix motion sensitivity being too weak on the LIS2 clone accelerometer

The wake-from-sleep movement threshold in MOVThread.cpp is a single fixed
formula shared across every accelerometer type IronOS supports, with no
per-chip calibration. On TS101 units fitted with the LIS2 clone
accelerometer (LIS2DH_CLONE_WHOAMI_ID 0x11, a register-compatible but not
identical clone of the genuine LIS2DH12), the same physical shake produces
a smaller raw delta than the formula assumes, so it takes a firm shake to
wake the iron even at maximum Sensitivity (issue #2132).

Divides the threshold by 6 specifically when DetectedAccelerometerVersion
is LIS_CLONE, so the existing Sensitivity setting (0-9, already
user-adjustable in the menu) gives comparable real-world sensitivity to
what it delivers on genuine LIS2DH12 or other supported chips. All other
accelerometer types are untouched.

Confirmed on two physical TS101 units (DFU 1.06 and 1.08): tried divisors
of 4, 5 and 6 on hardware; 6 gives a natural wake response across the
Sensitivity range without being overly twitchy.
…2239)

load_json()/read_version() and the --output FileType opened files with
Python's default encoding, which on Windows falls back to the system
locale codepage instead of UTF-8. Any non-ASCII character in a
translation JSON gets silently corrupted when that locale isn't UTF-8
(observed as "É" turning into "É" byte-for-byte, i.e. each UTF-8
continuation byte reinterpreted as a separate cp1252 character).

For FR specifically this crashes the build entirely: one of the
mis-decoded characters (cp1252 0x89, from the second byte of "É")
lands on U+2030 (PER MILLE SIGN), which isn't in the small font glyph
set, so make_translation.py raises KeyError: 'Symbol |‰| is missing in
small font set' while generating Core/Gen/Translation.FR.cpp. Other
non-ASCII languages likely encode/decode silently wrong without
raising, since not every corrupted character happens to be missing
from a font.

Reproduced on a Windows build host without the UTF-8 system locale
enabled; fixed by opening every text file this script reads/writes
with an explicit encoding="utf-8".
* Add support for Sequre S99, copied S60P settings

* Add S99

* Add Sequre S99 with correct bootloader offset

* Add whitespaces according to coding style

Co-authored-by: discip <53649486+discip@users.noreply.github.com>

* Add whitespaces according to coding style

Co-authored-by: discip <53649486+discip@users.noreply.github.com>

* Correct debug menu "Tip R" to "Tip uV"

* Use SettingsOptions::PDNegTimeout in FS2711 driver

* Correct debug menu "Tip R" to "Tip uV"

* Rename Sequre_S60 folder to Sequre

* Support for S99
* Enable PD Options
* Make PDNegTimeout configureable
* Add default value for PDNegTimeout, also for S60 and S60P
* Add basic DC detection / correct debug readings while powered via DC
* Add basic ThermoModel for C245 Tips
* Modify op-amp gain

* Add define for USB_PD_TIMEOUT, the default value for PDNegTimeout

* Add define for USB_PD_TIMEOUT, the default value for PDNegTimeout

* Fix clang-format code style mismatches

* Add S99 to overview table

* Fix clang-format code style mismatches

* Fix missing PD related description of menu items and messages for POW_PD_EXT

* Add pins for S99 v1.5 and probably S60P v1.2

* Add experimental detection of separate USB-PD I2C bus for S99 v1.5 and S60P v1.2

* Fix clang-format issues

* Code cleanup, always init both I2C bus

* Add missing __HAL_RCC_GPIOB_CLK_ENABLE

* 4x faster PWM, add Timer changes from #1926

* Add missing braces

* Correct README to Sequre S60, S60P and S99

* Fix showing displayPowerMenu for POW_PD and POW_PD_EXT 2

* Enable/add DC support for S60P

* Set equal USB_PD_TIMEOUT for all Sequre irons

* Fix i2c_probe function

* Add MODEL_S99

* Add THERMAL_RUNAWAY config values for S99

* Add probing for unused devices for testing/timing

* Change Utils.h to Utils.hpp

* S99: make the cartridge resistance selectable

The S99 ships with a 5.5 ohm cartridge but is commonly used with 2.5 ohm
JBC / Relife C245 cartridges. TIP_RESISTANCE was hardcoded to 2.0 ohms,
so every power and current calculation was wrong for both of them.

Add a C245 tip type (stock 5.5 ohm / JBC 2.5 ohm) and default to the
stock cartridge.

* S99: only chop the tip as hard as the supply requires

The S99 has no inductor, so the tip current can only be limited by
chopping the output. Until now the PID output was fed straight into the
fast (~11 kHz) chopper, which meant the MOSFET hard-switched the full
tip current on every cycle regardless of how much power was actually
being delivered. With a 2.5 ohm cartridge on 20V that is 8A per edge,
continuously - which is what cooks the FET and, in a few reported cases,
shorts it with the tip glowing red.

Split the two jobs apart:

 - TIM2 (~20 Hz) carries the PID output as the power envelope, the same
   way every other iron works. The ADC still samples in the off window.
 - TIM4 chops only inside the envelope on-time, and only at the duty
   needed to keep the average current within the supply limit
   (I_limit / I_tip). The limit comes from the negotiated FS2711 PDO, or
   from the user power limit on DC. A stock 5.5 ohm cartridge on 20V
   therefore never gets chopped at all and the FET switches at 20 Hz.

availableW10() is scaled by the chop duty so the PID still sees the real
deliverable power.

Also expose the chop frequency (11.2 / 5.9 / 3.0 / 1.5 kHz) in the power
menu for supplies that tolerate longer current pulses.

* S99: enforce the hardware wattage limit and derate on a hot handle

HARDWARE_MAX_WATTAGE_X10 was defined but never used, so on a DC supply -
where there is no PD current limit to fall back on - the PID was free to
ask for far more than the output stage is rated for. Cap it.

Additionally derate the output linearly from 100% at 55C down to 20% at
70C handle temperature, as a last line of defence for the MOSFET which
shares the handle with the NTC.

The NTC lookup table stopped at 44C and clamped everything above it, so
extend it to 80C using the same 10K B~4000 model. This also makes cold
junction compensation usable when the handle is warm.

* S99: use the full 128x32 display

The 128x32 drawing code was largely the 96x16 layout drawn into the top
half of the panel. Add a HUGE font style that pixel-doubles the existing
12x16 font to 24x32 - no additional font data, which matters because the
S99 image is already at ~94% of the available flash - and lay out the
soldering, sleep, temperature adjust and detailed home screens for the
full panel. The detailed soldering screen gains a four line info column
(watts, volts, source + sleep countdown, setpoint).

\x01 newlines now wrap over all four rows instead of only the second.

Guarded by OLED_128x32_HIRES_UI so the S60 / S60P / T55 layouts are
untouched.

* add s99 builds as well

* Add S99 nightly build workflow and fix README download links

* Docs: grant contents write so gh-deploy can push gh-pages

* S99: skip CJK languages that overflow the 43K application flash

* S60P: skip CJK languages that overflow the 42K application flash

* CI: clang-format sources, regenerate Settings.md, tolerate missing release tags in docs check

* S99 nightly: move the s99-nightly tag with each build

* S99: data-dense detailed screens, buzzer on PB12, use the 80K flash

- Detailed soldering / idle views now show watts, volts, amps, power source,
  handle temperature, cartridge resistance, chop frequency, the effective
  power limit (supply/user/hardware/derate) and the chop duty, plus a power
  bar; the simple views keep the huge temperature.
- Buzzer: the stock firmware bit-bangs PB12; drive it with TIM3 update
  interrupts (~2.7 kHz) via setBuzzer().
- The stock firmware is linked up to 0x08013820, so the S99 has at least 80K
  of flash: code region 78K, logo/settings pages at 78K/79K. All languages
  fit again, so the CJK exclusion is only kept for the S60P.

* S99: buzzer return pin + boot chirp, small-font voltage in the simple views

- The stock firmware drives PA8 low at boot alongside the PB12 buzzer; do the
  same so the piezo has its return path, and chirp once at boot.
- Simplified home screen: button B moved 8 px left so the input voltage fits
  as '20.0 / V' in the small font instead of two stacked large digits.
- Basic soldering view: HUGE digits, small °C, then '20.0V' and the power
  source name.

* Add a Buzzer on/off setting (S99)

New BuzzerEnabled setting (default on) in the UI menu, honoured by the
Sequre setBuzzer(); translations for all languages (DE localized).

* Beep only once per soldering session when the set point is first reached; drop the boot chirp

* S99: set points up to 480 C (measurable ceiling of the tip amplifier), keep the boot chirp

* S99: back to the 450 C default maximum

* Update source/Core/Drivers/FS2711.cpp

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>

* rename I2C to selected_i2c_port

* S99: keep the NTC lookup table as one ADC,temp pair per line

* FS2711: drop the leftover test probes from the bus detection

* settingsGUI: remove duplicated defined(POW_PD) in the power menu guard

* README: shorten the Sequre notes

* Drop the fork-only S99 nightly workflow and download links

* Restore the upstream USB-PD mode description and definitions formatting

The shortened text and the re-indented arrays were merge leftovers, not
intentional changes.

* S99: plainer comment on the chop scheme

* S99: shorten the tip drive comment in configuration.h

* 128x32: data dense detailed soldering screen

Two full width 8x16 rows: tip temperature, power and input voltage on the
first, handle temperature, cartridge resistance and the power limit in
force on the second.

* Docs: grant the workflow write access so gh-deploy can push gh-pages on forks

* FS2711: restore the two wake-up probes before bus detection, as named constants

* 128x32: compact 6x8 font (FontStyle::TINY) and data dense status screens

The Terminus 8x16/12x24 fonts stay the SMALL/LARGE fonts on 128x32 panels;
the hand drawn 6x8 font is generated alongside as USER_FONT_6x8_COMPACT and
exposed as FontStyle::TINY (identical to SMALL on 96x16). The detailed
soldering and idle screens use it for a four row info column (watts, volts,
amps, source, handle temperature, cartridge resistance, chop frequency,
power limit in force, chop duty) next to the temperature and a power bar;
the simple screens print the input voltage as 20.0V instead of stacked
digits.

* 128x32: gate the dense screens and compact font behind OLED_128x32_DENSE_UI

Enabled on the S99 (78K) and S60P (126K); the S60 and T55 keep the upstream
screens as their CJK builds are within 1K of the 45K limit. The compact
table now only covers the symbols printed in TINY (~50 glyphs), which are
ranked directly after the forced symbols.

* PID: no tip output below the DC minimum input voltage

The soldering mode already exits on undervoltage, but only after its 2 s
ADC settling delay. On a 5 V USB host port (no PD contract) the tip would
draw ~1 A in that window, more than the port allows, so VBUS drops and the
iron reboots in a loop. Check the input voltage in the PID loop as well.

* 128x32 basic soldering view: keep the small info rows on strip boundaries

* Shorter menu texts for the C245 tip names and the chop frequency setting

Two-line values next to a two-line name did not fit on the 128x32 panel
with the 8px font.

* 128x32: settings menu values in the 8x16 small font

Next to the two-line 8x16 names the 12x24 values did not fit (tip type,
power settings). VALUE_FONT / VALUE_SYMBOL pick the small font and symbols
on 128x32 panels; translated value strings are encoded for the small font
there when every glyph exists (CJK stays large and is detected by its
leading newline marker).

* 128x32: draw large-font encoded help text with the large font

* Translations: PD timeout / PD mode / no-PD warning also apply to POW_PD_EXT devices

The include lists only named POW_PD, so on the Sequre irons (POW_PD_EXT)
the generator dropped these strings and the menu entries showed no name.

* Review follow-ups: mask the dual I2C bus code, drop the chop frequency setting, MCU die temperature cut-off

- FS2711 dual bus detection and the per-bus dispatch are only compiled with
  FS2711_CHECK_BOTH_I2C_BUSES (S99, S60P).
- The chop frequency is fixed at ~5.9 kHz; the setting, its translations
  and docs are removed. Chopping itself only runs when the supply cannot
  deliver the full tip current.
- The STM32 internal temperature sensor is sampled on ADC1 alongside the
  handle NTC; above MCU_TEMP_CUTOFF_C (85 C) the PID stops heating and
  raises the thermal runaway warning.

* Document why the dense 128x32 layout is only enabled on the S99 and S60P

* S60 / T55: dense 128x32 layout for every language except CJK

The layout plus its compact font does not fit the CJK builds on the 45K
models, so build.sh builds those two models twice: DENSE_UI=1 (own object
set, OLED_128x32_DENSE_UI) for all other languages, and the default layout
for JA_JP / YUE_HK / ZH_CN / ZH_TW.

* CI memory report: add the S99 (59K application flash)

* 128x32 dense screens: bare degree sign in the compact rows

The compact 6x8 table did not contain the degree sign (the DegC constant
is prefixed with it at generation time), so the handle temperature row
showed a wrong glyph, and with the two-cell unit the amps row ran off the
right edge. Add SmallSymbolDegreeSign and use it for the handle and set
point temperatures in the info rows.

* MCU temperature cut-off: reference the sensor to the handle NTC at boot

V25 of the STM32F1 internal sensor varies by +-90 mV between chips, i.e.
+-20 C when the datasheet value is used blindly; on one S99 it read above
the 85 C threshold at room temperature and kept the output disabled.
Calibrate the offset against the handle temperature once the ADC has
samples (same temperature after a cold start) and cut at 95 C.

* S99 buzzer: 4 kHz tone, frequency as BUZZER_FREQ_HZ

* S99: drive the tip like the S60 (fast PWM = PID duty) with a supply current cap

The 20 Hz envelope with the chop inside delivered the power as ~45 ms
bursts at the supply current limit with 3.6-8 A peaks, which trips the
over-current protection of some PD chargers (boot loop on 45 W / 65 W
supplies) and reads as ~40 % over the user power limit on USB meters.

Use the S60 scheme instead - TIM4 duty is the PID output, TIM2 only frames
the ADC window - and cap that duty at I_limit / I_tip (10 % margin) so
neither the negotiated PDO nor the user limit can be exceeded, cold start
included. availableW10 is no longer scaled by the chop duty; the cap clips.

* S99: move the start-up chirp out of postRToSInit

postRToSInit() runs at the top of the power thread, immediately before
FS2711::start(); the 80 ms blocking chirp there delayed the PD start so
far that the chip had already negotiated on its own, and disabling the
protocol then made strict sources (Apple adapters, MacBook ports, some
chargers) hard-reset VBUS -> reboot loop. Chirp after the boot logo in the
GUI thread instead.

* S99: pick the PDO by deliverable power, chop at ~11 kHz

Testers with 45 W / 65 W chargers (Steam Deck, Xiaomi 67 W) got boot loops
or a source stuck at 5 V once the iron actually used the negotiated
current: a 5.5 ohm cartridge on 20 V / 2.25 A can only be run by chopping,
i.e. 3.6 A pulses at the charger, and the previous builds only got away
with it because they assumed a 2 ohm tip and asked for a fraction of the
power.

- FS2711: on chop-capped irons choose the fixed PDO with the highest
  min(V^2/R, V*I) and, within 10 %, prefer one that needs no chopping
  (15 V / 3 A -> 41 W clean rather than 20 V / 2.25 A -> 45 W pulsed).
- Chop at ~11.2 kHz like the S60 so the current pulses stay short.

* FS2711: bring the chip up the way the stock firmware does

Recovered from the stock S99 firmware's disassembly: at boot it issues a
system reset (0x4A), a mode-set / port-reset cycle (0xA0 / 0x49) - i.e. a
clean re-attach - selects PD, enables it and waits 500 ms before reading
the PDOs. IronOS instead disabled the protocol first, which tears down the
contract the FS2711 had already auto-negotiated; strict sources (Apple
adapters among others) answer that with a hard reset, VBUS drops and the
iron brownouts in a boot loop.

* FS2711: skip PDOs whose chop pulses would overshoot the rating by more than 50 %

Sources with tight constant-current limiting (Apple adapters) fold the
voltage back when the inductorless chop pulses run far above the PDO
current, browning the iron out as soon as heating starts. On an Apple 35 W
with the 5.5 ohm cartridge this now selects 15 V / 2.33 A (pulses 1.17x
the rating, ~31 W) instead of 20 V / 1.75 A (pulses 2.1x).

* S99: don't strand low resistance cartridges, scale the chop frequency with the tip current

Two tester reports:

- A 2.5 ohm cartridge only reached ~18 W. The pulse guard rejected every
  PDO whose chop pulses exceed 1.5x its rating, and a 2.5 ohm tip exceeds
  that on all of them, so only 9 V survived. The gentle PDO is now a
  preference, taken only while it keeps at least 70 % of the power: the
  5.5 ohm / Apple 35 W case still moves to 15 V, while a 2.5 ohm tip on a
  65 W supply keeps 20 V / 3.25 A (58 W instead of 20 W).
- The MOSFET ran hot with a 2.5 ohm cartridge until the chop frequency was
  turned down by hand. Switching loss scales with frequency x current, so
  the frequency now follows the peak tip current: 11.2 kHz below 4 A (the
  S60 behaviour, easiest on the supply) down to 1.5 kHz above 7 A, which
  is what those users selected manually before the setting was removed.

* S99: regulate the PWM frequency by the MOSFET temperature

Users report the MOSFET running hot even with the 5.5 ohm cartridge at
11 kHz - switching loss alone is ~0.4 W there, and the gate drive is weak.
Switching slower fixes that but lengthens the current pulses, which
supplies with little output capacitance dislike, so the frequency is now
regulated by the temperature of the FET itself via the handle NTC sitting
next to it (the same sensor the power derate uses): 5.9 kHz while cool and
current limited, ~2.4 kHz when the duty is not capped or on DC (what the
S60 does when resistance limited), stepping down to 3.0 / 2.4 / 1.5 kHz as
the handle passes 45 C and 55 C, with 5 C of hysteresis.

* S99: start at 11 kHz again while current limited, the thermal loop walks it back

11 kHz gives the shortest current pulses, which is what supplies with a
tight over-current trip need - it is only a problem because of switching
loss. Now that the frequency is regulated by the FET temperature, starting
fast is safe: it steps down as soon as the handle warms up. So the fast
step is back, but only while the duty is capped to the supply current;
with no cap, or on DC, it still starts at the S60's ~2.4 kHz.

* Debug menu: show the MCU die temperature

Gives a second thermal reading next to the handle NTC when judging how hot
the output stage gets, and shows what the 95 C cut-out is working from.

* S99: step the PWM down earlier (35 C / 45 C handle)

The handle NTC lags the MOSFET junction by a fair margin, so waiting for
45/55 C let the output stage get hot before the frequency came down. The
thresholds are now defines next to the derate settings.

* S99: let the user lower the PWM slowdown temperature from the menu

The handle NTC lags the MOSFET, and how warm is acceptable depends on the
cartridge, the supply and how long the user solders for. The threshold is
now a setting in the power menu, but it maxes out at the compiled-in
default, so it can only ever be made more conservative - never disabled.

* Keep the new setting and debug entry off models that do not have them

The settings generator gained an optional per-entry 'ifdef' so the table
row only exists where the feature does, the debug menu string is emitted
by macro as well, and the enum entry follows the same guard. The S60 and
T55 CJK builds sit within a few bytes of their 45K limit, so anything
S99-specific has to cost them nothing.

* S99: allow the PWM slowdown threshold up to 55 C

Default stays at 45 C; 55 C is where the power derate starts anyway, and
the 95 C die cut-out is untouched, so the setting stays bounded well below
anything that can damage the output stage.

* Fix a corrupted row in the S99 handle NTC table

Reformatting that table to one pair per line pulled two numbers out of a
comment that sat inside the array ('B~4000', '32767'), inserting them as a
bogus 4000 / 32767 C row between 44 C and 48 C. The lookup returns the
first row whose ADC threshold is below the reading, so every handle
temperature above ~44 C returned 32767 * 10 truncated to int16 - which
silently disabled the power derate and the PWM slowdown that depend on it,
and showed nonsense in the debug menu.

The row is gone, the rows above 44 C are recomputed from the curve the
original rows follow (B = 4100, reproducing them to within one ADC count
instead of the ~0.6 C the earlier B = 4000 was off by), and the model is
described above the array so no number can end up inside it again.

* Sequre: drop the empty unstick_I2C

Nothing calls it on this BSP - the Sequre irons run software I2C on every
bus, so there is no hardware peripheral to unstick - and all four models
link without it.

* Document what the die temperature reading assumes on CKS32F103 silicon

* Name the model in the FS2711 bus detection comments

The two revisions belong to different irons (S60P v1.2, S99 v1.5), which
the comments did not say.

* CI: do not fail the memory report on pull requests from forks

GitHub hands pull requests from a fork a read-only GITHUB_TOKEN whatever
the permissions block asks for, so creating the comment 403s and the job
fails for every external contribution. The report is now written to the
job summary as well, which needs no write access, and the comment step
treats a 403 as 'nothing to do' instead of an error.

* Report PD rather than QC on the FS2711 irons

getPowerSourceNumber() only knows the FUSB302 path, so on the Sequre irons
- which negotiate with an FS2711 - it fell through to the QC branch and
the screens showed QC while the supply was on a PD contract. The fork had
a POW_PD_EXT branch for this; it was lost when this branch merged upstream
dev. Restored, reporting plain PD as there is no VBUS sense line here.

* FS2711: say where the bring-up sequence comes from

Review feedback: mark the reset / re-attach sequence as taken from the
S99 stock firmware and drop the narrative about the code it replaced.

* Define the PWM slowdown setting on every model

Review feedback: an #ifdef inside the settings enum is fragile. The
TipPWMSlowdownTemp slot and its constants table row now exist on all
models; the default and maximum come from the fallbacks in BSP.h. Only
the menu entry stays behind TIP_PWM_SLOWDOWN_SETTING, as with the buzzer
and BLE settings. The per-entry 'ifdef' in the settings generator had no
other user and is removed again.

Costs the S60 / T55 CJK builds 8 bytes (S60 ZH_CN: 45420 of 46080).

* Offer the buzzer on/off setting on the MHP30 as well

Review feedback: keep the setting even across models with a buzzer. The
MHP30 gets BUZZER_SETTING and honours BuzzerEnabled in setBuzzer(). The
start-up chirp stays Sequre only, behind its own BUZZER_STARTUP_CHIRP,
so enabling the setting does not add a boot beep on the MHP30.

* Describe the start-up chirp by what it does

BUZZER_STARTUP_CHIRP is a general feature switch, so its comments should
not refer to a particular stock firmware.

* TS101: use the dense 128x32 layout

Review feedback: enable OLED_128x32_DENSE_UI wherever the flash allows
it. The TS101 fits it in every language (ZH_CN: 82 % of 66K). The S60
and T55 still cannot take it in JA_JP / YUE_HK / ZH_TW / ZH_CN, which
overflow their 45K by 0.3 - 1.0K, so their per-language split stays.

* Drop the PWM slowdown temperature setting

Review feedback: a fixed threshold is enough. The PWM frequency is
already regulated by the handle temperature in two steps, and the power
derate at 55 C and the die cut-out remain, so the user adjustable
threshold only bought a marginally cooler handle for very few users.
The thresholds stay as the compile time defines TIP_PWM_SLOWDOWN_1_C /
_2_C; the setting slot, menu entry, translations and documentation go.

* Fix the docs and style checks after dropping the slowdown setting

Settings.md regenerated with gen_menu_docs.py (trailing blank line), and
the two declarations in tipChopThermalStep() aligned as clang-format
wants them now that the comment between them is gone.

---------

Co-authored-by: jonasius <git@j1w.de>
Co-authored-by: jonasius <jonasius@users.noreply.github.com>
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
Co-authored-by: shambler123 <shambler123@users.noreply.github.com>
Co-authored-by: markusstadtmann.ext@levatis.com <markus.stadtmann.ext@levatis.com>
Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
* TS101: fix vertical image offset on the 128x32 OLED panel

setRotation() only ever sent the segment-remap (0xA0/0xA1) and
COM-scan-direction (0xC0/0xC8) commands, never touching the SSD1306
"Set Display Offset" (0xD3) command that already existed in
OLED_Setup_Array (always left at 0x00).

Disassembling the official Miniware TS101 firmware (TS101AppV220.hex)
shows that after the remap/scan commands it also sends 0xD3 with an
orientation-dependent value (0x10 / 0x30). Without it, the 128x32
panel can render shifted by half its screen height depending on the
physical OLED panel batch. Confirmed on real TS101 hardware.

* TS101: port the per-byte I2C command path from IronOS-TS101-FullOLED

Confirmed on hardware that stock TS101 OLED handling (the bulk 0x80-continuation
transmission shared by every other model, via I2C_CLASS::Transmit/writeRegistersBulk)
leaves the panel stuck on the boot splash with the menu confined to a small area at
the top-left: the 128x32 SSD1306 on the TS101 only reliably updates when each command/
data chunk is sent as its own I2C transaction.

This ports the working per-byte transmission path (i2c_send_command_byte /
oled_bulk_write) from the community fork IronOS-TS101-FullOLED into refresh(),
setDisplayState(), initialize(), setRotation(), setBrightness(), setInverseDisplay()
and maskScrollIndicatorOnOLED(), gated behind #ifdef MODEL_TS101 so no other model
(TS100/TS80/TS80P/Pinecil/Sequre S60/S60P/T55/...) is affected - they keep using the
existing Transmit()/writeRegistersBulk() path unchanged.

Also narrows the previous commit's segment-remap/offset triplet from
`#ifdef OLED_SEGMENT_MAP_REVERSED` to `#ifdef MODEL_TS101`: that macro is also set by
Sequre's 128x32 models, which would otherwise have received TS101-specific hardware
values they were never verified against.

Verified working end-to-end (EN and FR builds) on physical TS101 hardware.

* TS101: replace MODEL_TS101 ifdefs with descriptive OLED flags

Per review feedback: gate the per-byte I2C transmission path and the
non-zero orientation-dependent display offset behind two descriptive
flags (OLED_I2C_PER_BYTE_TRANSFERS, OLED_DISPLAY_OFFSET_QUIRK) defined
in TS101's configuration.h, instead of raw MODEL_TS101 checks in the
shared OLED driver. No behaviour change for TS101 or any other model.

* TS101: address review feedback on OLED flag refactor

- Move the OLED_I2C_PER_BYTE_TRANSFERS branching for refresh()/setDisplayState()
  out of the header and into OLED.cpp, so the header only has plain
  declarations and the ifdef mask lives in one place.
- Fix setRotation()'s per-byte command order to match OLED_Setup_Array's
  layout order instead of an arbitrary order.
- Run clang-format over both files.

* TS101: remove redundant segment remap branch in OLED setup

The OLED_DISPLAY_OFFSET_QUIRK branch duplicated the #else branch
(both wrote 0xA0 with the same comment), so it can be dropped.

* TS101: fix clang-format style mismatch in OLED setup array

CI flagged the padded spacing on the 0xA0 line; align it with the
adjacent 0x00 line's single-space formatting.
* fixed 'device busy' error

* pv progress display and implicitly disabled cache

* move messages to the top and into cat << EOF

* Pull devices with ionotifywait and more explicit DEVICE definition

---------

Co-authored-by: Karakurt <karakurtspiders0net@gmail.com>
* Add support for the Sequre Si012 Pro Max

Builds on the first port by @jemarro12 in #2124 (pin map, 0x4C00 bootloader
offset, S60 thermocouple scaling), with the open points from that PR resolved
and verified on hardware.

Si012 Pro Max (new model Si012ProMax, Sequre BSP):
- Two tip sockets: T12 (PB9 / PA6) and TS / SI (PB8 / PA0). #2124 had these
  the other way round; confirmed on hardware. Both are sampled every cycle and
  the socket in use is picked automatically; only its MOSFET is ever driven.
- T12 has priority; the TS / SI socket is only selected from the home screen,
  and its output is refused while a T12 is sensed. A bare T12 body touching
  the TS / SI contacts is latched as "Tip Shorted" with no output (a real
  short on this hardware, as the stock firmware reports too).
- USB-C PD is a standalone HUSB238 the MCU does not talk to (the stock
  firmware only addresses the OLED), so the input is measured and treated as
  DC; this fixes the "PD debug state 55" seen in #2124.
- OLED mounted flipped, buzzer, 10 status LEDs with selectable modes
  (off / status / temperature bar / power bar), TC1047 board temperature
  cut-out with a plausibility check against the handle NTC at boot.
- S99 flash layout (0x4C00 bootloader, 78K code), 100 W cap, per-socket tip
  resistance defaults from Sequre's power chart.

Shared changes:
- Settings: optional "include" in settings.yaml so a setting only exists on
  models that define the macro; other models do not grow (the T55 CJC build
  has ~28 bytes to spare in CI).
- Debug menu: the MCU temperature item was unreachable on builds without a
  hall sensor (S99); also adds the active socket and the unused socket's raw
  reading on dual socket irons.
- Per-socket CJC calibration offset on dual socket irons.
- isMCUTemperatureValid() so an implausible board sensor cannot trip the
  thermal cut-out.

Not yet verified: absolute tip temperature (solder tests suggest the display
reads ~10% high; calibration with a tip thermometer to follow).

* Address review: settings, short detection define, comments

- New settings get fixed numbers on all models; drop the settings.yaml
  "include" support.
- Drop the TC1047 board temperature cut-out and its plausibility check, as
  the handle temperature at boot can't be assumed equal to the board's.
- Add TIP_SHORT_DETECTION for the shorted tip check.
- Move the socket label into the screens that use it.
- README: leave the notes column empty for the Si012 Pro Max.
- Shorten and reword comments.

* Fix the buzzer getting stuck on

The soldering screen turns its beep off itself, and keeps the deadline in
the screen's scratch state, which is cleared on a screen change. Leaving the
screen while it beeped (button, sleep) left the buzzer on until a power cycle.

- Turn the buzzer off on every screen change.
- Sequre: a tone stops by itself after at most one second.

* Address review: explicit PWM_Out_CCR, comments, naming

- Set PWM_Out_CCR in Pins.h for every Sequre model instead of defaulting it.
- Rename statusLEDBar to getStatusLEDBarBitmask.
- Comment wording from review.
…tch (#2244) (#2248)

* S99: keep 2.5 ohm (JBC) cartridges within what the output stage can switch

Issue #2244: a C245 style cartridge on a 20 V PDO draws 8 A pulses, the
charger drops out after about 1.5 s and the MOSFET runs hot. The scope
captures in the thread show why: the gate is DC driven but slow (about
20 us to turn on, about 48 us to release through its pull-up), so the
FET keeps conducting for roughly 45 us after every off command. At the
5.9 kHz chop neither edge completes, the FET switches hard every cycle
and the average current ends up above the PDO rating. The stock 5.5 ohm
tip is unaffected: at 11.2 kHz the gate cannot follow at all and the
output is effectively DC.

Three changes, all behind new defines in the S99 block so they can be
tuned from test reports without touching the logic:

* TIP_PEAK_CURRENT_MAX_X100 (6 A): the FS2711 PDO selection skips any
  fixed PDO (and clamps the PPS request) whose voltage would push the
  tip current over this. A 2.5 ohm cartridge now negotiates 15 V / 3 A
  instead of 20 V; the stock tip picks the same PDO as before on every
  charger.
* TIP_CHOP_SLOW_ABOVE_X100 (4.5 A): above this tip current the chop uses
  a slow frequency set (3 kHz capped on PD, 1 kHz uncapped / DC) so the
  gate completes both edges; the per-edge loss grows with the current.
  The chop slows down further while the commanded pulse is shorter than
  two turn-off tails (low user power limits), and the thermal steps
  still stack on top.
* TIP_CHOP_TURNOFF_TAIL_US (45): on the slow set the tail is subtracted
  from the commanded on time, so the supply sees the intended average
  current instead of a pulse that is a tail longer than asked for.

Prescaler table extended with 50 (2.4 kHz) and 120 (1.0 kHz) entries.
Builds for S99 and S60P; stock tip path unchanged.

* Fix the PD debug screen never advancing past the first page

showPDDebug() for the FS2711 and HUSB238 did `*screen++`, which
increments the pointer rather than the page counter, so pressing the
front button never got past the PDO count and the PDO list could not be
reached. The FUSB302 variant already does `(*screen) += 1`.

* S99: compensate the net tail, not the whole turn-off tail

The first gate capture on a 2.5 ohm cartridge at 15 V (PR #2248) shows
the MOSFET stops conducting about 35 us after the off command, but it
also only starts conducting about 15 us after the on command, so the
net extra conduction per pulse is about 20 us, not 45. With 45 us taken
off the command the effective duty was 31 % (1.9 A average from the
charger) against the intended 43 %. TIP_CHOP_TURNOFF_TAIL_US goes to
25 us, which brings the average back to about 2.6 A at 15 V / 3 A, the
0.9 x rating the cap aims for. Chop frequency and FET loss unchanged.

* S99: 4 A peak current ceiling, PPS only without chopping

Test results on PR #2248: a 2.5 ohm cartridge at 15 V / 3 kHz (6 A
pulses) runs fine on a Lenovo 65 W charger but the Sequre-supplied
charger still drops out after about a second, at 1.9 A and at 2.6 A
average alike, with the bus dipping only 1.5 V. The same charger takes
the stock cartridge, which at 20 V draws 3.5 A effectively DC, 1.1x the
PDO rating. So it reacts to the pulse amplitude, not to the average or
the voltage. A charger model calibrated on those two points (fast
over-current detection against k x rating, any filter up to ~100 us and
any k between 1.1 and 1.7 fits) fails every 15 V and 12 V option and
passes 9 V: 3.6 A nominal, 3.3 A after the cable, the same 1.1x ratio
as the stock cartridge, and at 11.2 kHz with a 75 % cap the gate does
not really chop, so no switching loss either. Tip power about 27 W
instead of 35 W at 15 V.

With the ceiling below the best fixed PDO the PPS branch would have
picked e.g. 10 V / 3 A and pulled 4 A, so PPS requests are now also
clamped to the voltage the source current can supply through the tip
without chopping: a 100 W PPS source gives 10 V / 5 A (4 A DC, 40 W),
a 3 A PPS source stays on the fixed 9 V PDO.

Stock cartridge selection unchanged on every charger in the host
harness; builds for S99 and S60P.

* Sequre BSP: default values for the chop tunables

The Si012 Pro Max (#2247) compiles the same BSP with
TIP_CURRENT_LIMIT_CHOP but does not define TIP_CHOP_SLOW_ABOVE_X100 and
TIP_CHOP_TURNOFF_TAIL_US, which broke its build after the merge. The
BSP now carries defaults, the S99 block keeps overriding them. With an
8 ohm T12 heater the slow set never engages, so the Si012 Pro Max
behaves exactly as before.

* Leave the HUSB238 PD debug screen as it was

The same `*screen++` bug exists there, but fixing it costs 12 bytes and
the T55 ZH_CN image has none left (CI: region ROM overflowed by 12
bytes). The S99 / FS2711 fix stays; the HUSB238 screen has been stuck
on its first page since it was written, so nothing changes for the S60
and T55.

* S99: back to 15 V for 2.5 ohm, PPS by power, minimum chop pulse

Second test round on PR #2248 with the 4 A ceiling (9 V): the Sequre
charger now holds and the MOSFET stays cool there, but on the Lenovo
the MOSFET gets warm while heating and runs away at idle, 20 % duty at
5.9 kHz. Two things learned:

* The gate drive follows VBUS (-10 V at 20 V, -8.6 V at 15 V, so
  around -7 V at 9 V). At 9 V the MOSFET is barely enhanced and every
  edge crawls, so a low voltage is the wrong way to spare the charger.
  The ceiling goes back to 6 A, i.e. 15 V for a 2.5 ohm cartridge,
  which the first round had tested fine while heating.
* The Sequre charger that trips on 6 A pulses offers PPS 3-11 V / 5 A,
  and its PD debug readout is what revealed it. A PPS range is now
  scored like a fixed PDO, by the power it delivers at the highest
  voltage that needs no chopping (R x I_pps), and wins on power or as
  the gentle alternative to a fixed PDO with hard pulses. On that
  charger a 2.5 ohm cartridge takes 11 V / 5 A (4.4 A DC, 48 W) over
  15 V / 3 A (6 A pulses, 45 W); the Sequre charger is in the host
  harness with its real PDO list. The stock cartridge keeps its fixed
  20 V everywhere: PPS at 5.5 x 3.25 A = 17.9 V delivers less.
* Idle: the PID realises low power as short chop pulses, and a pulse
  shorter than the two gate edges is spent in the linear region
  whatever the voltage. On the slow set the chop now slows down until
  the pulse actually commanded (PID duty or cap, whichever is smaller)
  is at least TIP_CHOP_MIN_PULSE_US (100 us): 3 kHz at full power as
  before, 1.5 kHz at 20 %, 1 kHz at 10 %. The model puts the idle loss
  at 0.2-0.3 W instead of 0.8-1.5 W. The slow set is now selected by
  cartridge resistance (TIP_CHOP_SLOW_BELOW_RX10, 5 ohm) rather than
  tip current, so a 2.5 ohm cartridge gets it on 9 V and PPS 11 V too;
  for the stock cartridge nothing changes.

Also: the PD debug screen printed the PDO current 10x too high (mA
passed as A x100).

---------

Co-authored-by: markusstadtmann.ext@levatis.com <markus.stadtmann.ext@levatis.com>
* S99: PID control instead of the self-decaying integrator

The Sequre models regulate the tip with a self-decaying integrator. With the
S99's inertia of 128 the sum loses 7 % per 53 ms cycle, so near the set point
it is a plain P controller of about 1.25 W per degree. Holding a C245 at
350 C takes roughly 12 W, which it can only deliver with a standing error of
about 10 C below the set point (reported in #2244 for the 2.5 ohm
cartridge, the stock one does the same).

Use the existing TIP_CONTROL_PID path on the S99 (Kp 30 / Ki 150 / Kd 200,
starting values from a two-node cartridge model) and make the integral windup
limit configurable: it is fixed at 5 % of the max output, which cannot carry
the holding power here. TIP_PID_INTEGRAL_LIMIT_SCALE defaults to 5, so the
Pinecil V2 is unchanged; the S99 uses 50.

* S99: hysteresis on the minimum-pulse chop step

The minimum-pulse rule picked the chop prescaler every PID cycle from the
current command alone. With the PID output moving a few ticks per cycle
around the 1.5 / 2.4 / 3 kHz thresholds the chop frequency flipped almost
every cycle, each flip restarting TIM4 mid-pulse (reported on
#2250).

Slowing down stays immediate. Speeding back up needs the pulse at the
faster setting to be at least 1.5x the minimum and goes one step per
cycle. In the model this takes it from a change nearly every cycle to a
few per minute while holding temperature.

---------

Co-authored-by: markusstadtmann.ext@levatis.com <markus.stadtmann.ext@levatis.com>
echo
instructions="printed"
while ! DFU_disk_connected; do
if [ -z $instructions ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
GSETTINGS appears unused. Verify use (or export if used externally). SC2034

if ! GSETTINGS=$(which gsettings); then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
This function is never invoked. Check usage (or ignored if invoked indirectly). SC2329

enable_gautomount() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
This function is never invoked. Check usage (or ignored if invoked indirectly). SC2329

echo
instructions="printed"
while ! DFU_disk_connected; do
if [ -z $instructions ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

Suggested change
if [ -z $instructions ]; then
if [ -z "$instructions" ]; then

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Firmware Space Usage Report

Showing min and max flash usage builds per device.

HS01

Build Flash used RAM used
Suomi (min flash) 35.1 KiB (18.7%) 13.4 KiB (74.2%)
简体中文 (max flash) 41.3 KiB (22.0%) 13.4 KiB (74.2%)

MHP30

Build Flash used RAM used
English (min flash) 41.9 KiB (44.6%) 13.4 KiB (67.0%)
简体中文 (max flash) 45.7 KiB (48.6%) 13.4 KiB (67.0%)

Pinecil

Build Flash used RAM used
English (min flash) 57.3 KiB (45.8%) 13.3 KiB (51.2%)
multi_compressed_European (max flash) 124.8 KiB (99.8%) 24.0 KiB (92.4%)

PinecilV2

Build Flash used RAM used
Norsk bokmål (min flash) 190.6 KiB (18.9%) 28.9 KiB (27.2%)
multi_compressed_European (max flash) 259.0 KiB (25.7%) 39.7 KiB (37.3%)

S60

Build Flash used RAM used
Suomi (min flash) 39.7 KiB (88.2%) 13.7 KiB (68.7%)
简体中文 (max flash) 44.3 KiB (98.5%) 13.7 KiB (68.7%)

S60P

Build Flash used RAM used
Suomi (min flash) 42.2 KiB (55.2%) 13.9 KiB (69.4%)
简体中文 (max flash) 48.9 KiB (63.9%) 13.9 KiB (69.4%)

S99

Build Flash used RAM used
Suomi (min flash) 44.3 KiB (75.1%) 13.9 KiB (69.6%)
简体中文 (max flash) 51.0 KiB (86.4%) 13.9 KiB (69.6%)

Si012ProMax

Build Flash used RAM used
Norsk bokmål (min flash) 42.2 KiB (71.6%) 13.8 KiB (68.9%)
简体中文 (max flash) 48.9 KiB (83.0%) 13.8 KiB (68.9%)

T55

Build Flash used RAM used
Suomi (min flash) 40.0 KiB (88.8%) 13.8 KiB (68.9%)
简体中文 (max flash) 45.0 KiB (100.0%) 13.8 KiB (68.9%)

TS100

Build Flash used RAM used
Norsk bokmål (min flash) 36.1 KiB (78.4%) 12.6 KiB (63.1%)
简体中文 (max flash) 39.8 KiB (86.5%) 12.6 KiB (63.1%)

TS101

Build Flash used RAM used
Suomi (min flash) 48.2 KiB (66.9%) 14.2 KiB (71.1%)
简体中文 (max flash) 54.8 KiB (76.2%) 14.2 KiB (71.1%)

TS80

Build Flash used RAM used
Norsk bokmål (min flash) 36.2 KiB (78.7%) 12.7 KiB (63.4%)
简体中文 (max flash) 39.8 KiB (86.5%) 12.7 KiB (63.4%)

TS80P

Build Flash used RAM used
English (min flash) 41.6 KiB (90.5%) 13.1 KiB (65.7%)
简体中文 (max flash) 45.2 KiB (98.2%) 13.1 KiB (65.7%)

@radosek radosek mentioned this pull request Oct 26, 2026
9 of 11 tasks
radosek and others added 4 commits October 27, 2026 13:16
* OLED: allow per-board panel timings and instant transitions

Make the charge-pump, pre-charge and VCOMH values in the setup array
overridable from a BSP's configuration.h, and add an optional internal
IREF entry. Defaults are unchanged, so existing boards are unaffected.

Add OLED_TRANSITIONS_INSTANT, which skips the slide animations and draws
the next frame directly. Boards with a slow bit-banged I2C bus need this:
each animation step is a full-frame refresh there, so a single menu
transition took several seconds.

* Add FNIRSI HS-01 support

WCH CH571F (RISC-V, 192 KiB flash, 18 KiB RAM), a CH224K for
fixed-voltage USB-PD and a 128x32 OLED on a bit-banged I2C bus. The
KAIWEETS KETS02 is the same board and runs the same build.

The pin map was recovered from the stock firmware (see #1614). The WCH
peripheral drivers, startup code and linker script are vendored under
Core/BSP/HS01/Vendor, along with a FreeRTOS port for the CH571.

The firmware is linked at 0x0 and flashed through the WCH ROM bootloader
with wchisp. Builds use the same riscv-none-elf toolchain as Pinecil.

* Docs: add HS-01 hardware notes and flashing guide

* PID: optional integral reset band and low-temperature gains

TIP_PID_INTEGRAL_RESET_C clears the integral while the error is large, so
it can't wind up during heat-up. TIP_PID_LOW_TEMP_C selects a second set
of gains below that set point. Both optional; existing boards build the
same code.

* HS01: use the stock firmware's PI gains

The default integrator and the Pinecilv2 PID gains both oscillated on this
tip (0 to 35 W swings, +-15 C). Use the stock loop instead: Kp 35 / Ki 1.75
above 300 C and Kp 17 / Ki 0.9 below, integral cleared beyond 50 C of
error. Holds 250, 330 and 400 C within 1 C on hardware.

* Docs: correct HS-01 notes and use Simplified Technical English

Add the facts that were missing from the HS-01 docs: button layout,
5-minute sleep default, 7.5 V cut-off, CH224K voltage order, stock PI
gains, and that wchisp can stop after Verify OK. Rewrite the flashing
procedure as numbered steps and the hardware notes in short sentences.
Shorten the HS01 and PID code comments. No code changes.

* HS01: remove unused vendor files, rename settings address

Remove the WCH headers and the flash driver that the firmware does not use. The firmware binary does not change. Rename SETTINGS_EEPROM_ADDR to SETTINGS_FLASH_ADDR. Update the README rows for the HS-01 and the KETS02.

* README: put the KETS02 note in the Notes column
I don't speak uzbek, so I used a machine translator, I hope that's okay. Should be correct, though (I cross-referenced)

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
@Ralim
Ralim merged commit d9b7b34 into master Oct 29, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.