Commit Graph

2 Commits

Author SHA1 Message Date
f17ebd17e5 Use libavr flash_table and __builtin_log
The thermistor Beta curve and the fan cubic move onto avr::flash_table
instead of hand-rolled [[gnu::progmem]] arrays with raw pgm_read, and
the compile-time logarithm uses __builtin_log (which constant-folds on
the AVR backend) instead of a hand-rolled series. Same 11284 B, still
byte-identical across libavr modes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-18 08:03:42 +02:00
ab78d94872 Rewrite on libavr
Same controller: thermistor on ADC0 averaged over 1000 free-running
conversions, 50 kHz fan PWM on OC0B, 115200 Bd console with the full
command set, EEPROM temperature histogram, watchdog-reset path into the
boot section. The Steinhart-Hart math and the libm log are gone — the
Beta equation and the cubic fan curve are consteval-evaluated into
flash tables; the firmware never does floating point. Byte-identical
.text in both libavr modes. Legacy stays on master.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-18 04:37:26 +02:00