mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-06 22:34:13 -05:00
test_radiolib_drivers has been red on develop since the RadioLib pin moved to 5878f990 (#12277): the three lr20x0_interface_tests cases added by #12036 all fail at the same assertion with -12, RADIOLIB_ERR_INVALID_FREQUENCY. Nothing in the firmware is wrong. At the new pin LR2021::setLoRaModulationParams() ends in setDCDCworkaround() (RadioLib#1864), whose last act is setFrequency(this->freqMHz, true). The suite builds the interface without calling init(), so begin() never runs and freqMHz is still 0, and the range check in setFrequency() rejects it. Every setter that reaches the modulation params now needs a frequency first, where before the jump it did not. lr2021_tests.h already handles this: LR2021_RADIO() calls lr2021Tune() for exactly this reason. The interface suite builds its radio by hand and skipped that step, so give it the same tune before it writes the SF. Claude-Session: https://claude.ai/code/session_011C7D9biGfpxLruq7DFLzsP Co-authored-by: Claude Opus 5 <noreply@anthropic.com>