AerospaceNU / AerospaceNU/stm32-avionics

Sensor Loop Refactoring

Đang mở
#296 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
5
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.