AerospaceNU / AerospaceNU/stm32-avionics
Sensor Loop Refactoring
- Dominant language
- C
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently, every one of our sensors (barometer, IMU, accelerometer, etc.) is expected to produce data updates each loop. This is reasonable for some of the sensors with a fast data rate, but for some sensors like the MS5607 barometer, these updates take a few ms which slows down our overall loop time.
We want to implement an asynchronous sensor update loop so that these sensors can asynchronously capture data and provide it when asked, without us having to manually wait on them. For example, instead of waiting for the barometer data measurement to happen, we can tell it to start and do other things (other parts of the code) until the conversion is ready.
I've added a basic `ISensor` interface in the [sensor-refactor](https://github.com/AerospaceNU/stm32-avionics/tree/sensor-refactor) branch in the `common/devices_common` folder. There's also a small sample implementation of a fake barometer in here as well. Investigate this interface and how we can apply it to the rest of our sensors.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.