diff --git a/src/curve.hpp b/src/curve.hpp index 44acbba..5dce19f 100644 --- a/src/curve.hpp +++ b/src/curve.hpp @@ -5,9 +5,9 @@ #include -// The auto-mode fan curve, tabulated at compile time: the legacy cubic -// (0.002246·x³ − 0.09·x² + 0.91·x, zero below 20 °C) becomes a libavr -// flash_table of duty percent per °C. +// The auto-mode fan curve, tabulated at compile time: a cubic in °C +// (0.002246·x³ − 0.09·x² + 0.91·x, zero below 20 °C) as a flash_table of +// duty percent per °C. namespace app::curve { namespace detail { diff --git a/src/thermistor.hpp b/src/thermistor.hpp index f24da85..3e0b469 100644 --- a/src/thermistor.hpp +++ b/src/thermistor.hpp @@ -21,8 +21,8 @@ namespace detail { consteval double temperature_of(double adc) { double resistance = series_resistor * adc / (1023.0 - adc); - // __builtin_log constant-folds on the AVR backend, so no runtime libm - // and no hand-rolled series is needed for the compile-time table. + // __builtin_log constant-folds on the AVR backend, so the table is + // built at compile time with no runtime libm. double steinhart = __builtin_log(resistance / nominal_resistance) / beta + 1.0 / (nominal_temperature + 273.15); return 1.0 / steinhart - 273.15; }