mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
constrain() is a min/max macro and NaN compares false against both bounds, so a corrupted or layout-shifted prefs file that decodes a float field as NaN/inf would pass it straight through to setParams() and could hang the radio at boot (stuck after "Loading...", recoverable only by erasing flash). Reset freq/bw/airtime_factor/rx_delay_base to safe defaults before the existing constrain() so a non-finite value can never reach the driver. Note: a defensive hardening of the boot path, not a confirmed root cause for the reported brick. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>