AerospaceNU / AerospaceNU/stm32-avionics

Sensor Loop Refactoring

Abierto
#296 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
5
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.