Address safety review findings for the dual-interface (WiFi + USB serial) architecture running on the ESP32-S3's two Xtensa LX7 cores: - Protect sweep state with std::atomic (acquire/release ordering) - Add Attenuator::getSnapshot() for consistent multi-field reads - Add advanceStep()/persistCurrent() to eliminate TOCTOU races - Switch to StaticSemaphore_t (compile-time mutex, can't fail) - Accumulate web server POST bodies before parsing (chunked TCP fix) - Backport USB serial input validation to web server handlers - Auto-stop sweep on manual set (prevents silent overwrite) - Validate WiFi TX power against known-good levels - Add OTA password authentication support - Check NVS write return values, log failures - Reset USB serial buffer on reconnect (stale overflow fix) - Rename sweep.h to app.h (declares more than sweep functions)
Description
HMC472A digital RF attenuator controller — ESP32-S3 firmware with USB CDC serial and WiFi REST API
Languages
C++
59.5%
CSS
11.6%
JavaScript
11.4%
HTML
9.6%
C
6.5%
Other
1.4%