a121-rs
a121-rs copied to clipboard
Refactor radar error handling and configuration management
trafficstars
Unified error handling under RadarError and enhanced RadarConfig to support locked and unlocked states. Added functions for setting and retrieving various radar configurations with clear state requirements for safer API utilization. Additionally, implemented an atomic configuration update method within Radar struct to ensure changes are applied consistently.
Summary by CodeRabbit
-
New Features
- Introduced an atomic configuration update mechanism that enables smooth, consolidated radar parameter modifications.
- Added unified error reporting for clearer diagnostic feedback.
-
Refactor
- Enhanced state management and refined method chaining for a more robust and consistent configuration experience.
- Improved overall error handling by consolidating sensor-related issues under a unified error system.