AerospaceNU / AerospaceNU/stm32-avionics

Sensor Loop Refactoring

Ouverte
#296 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
5
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.