-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adjust code for distance measurement capability Incorporated a distance detector module in the main codebase. The xe121 example has been expanded and updated to accommodate this module, including necessary modifications for data handling and result processing within the example. All dependencies and relevant functions have likewise been updated to ensure compatibility. * Make RadarState trait public and add to generic constraints The RadarState trait has been made public and added to generic constraints in relevant structures and implementations. Additionally, an unsafe function to get a mutable reference to the sensor was added for completeness. This is part of a broader effort to refine our radar capabilities and ensure robust error handling. * Refactor Radar and Sensor structs to support OutputPin and Delay The Radar, Sensor, and RadarDistanceDetector structs have been extended to incorporate pin outputs and delays, using the embedded_hal and embedded_hal_async libraries. The changes also include edit all related function signatures and calls. This addition provides support for hardware control, enabling and disabling the radar sensor when required. * Update Radar initialization and remove unnecessary pin control * Adjust threshold sensitivity in Radar config * Refactor main function and improve radar calibration * remove unused configs * Refactor DistanceSizes struct to results module * Update build optimization settings and clean up main.rs code * Adjust variable initialization and buffer sizes * Add type alias for result transitions in radar
- Loading branch information
Showing
18 changed files
with
989 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use embassy_stm32::exti::ExtiInput; | ||
use embassy_stm32::peripherals::PC13; | ||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||
use embassy_sync::signal::Signal; | ||
|
||
pub static LED_SIGNAL: Signal<CriticalSectionRawMutex, ()> = Signal::new(); | ||
|
||
#[embassy_executor::task] | ||
pub async fn button_task(mut button: ExtiInput<'static, PC13>) { | ||
// Await the button press | ||
loop { | ||
button.wait_for_high().await; | ||
LED_SIGNAL.signal(()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.