|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Module glue for the Goertek SPA06-003 / SPL06-001 barometer. More...
#include "peripherals/spa06.h"Go to the source code of this file.
Functions | |
| void | baro_spa06_init (void) |
| Bind the driver to the configured bus and register telemetry (module init hook). | |
| void | baro_spa06_periodic (void) |
| Drive the sensor state machine (module periodic hook). | |
| void | baro_spa06_event (void) |
| Process finished bus transactions and publish new measurements (module event hook). | |
Variables | |
| struct spa06_t | baro_spa06 |
| The barometer driver instance, exposed for debugging/telemetry. | |
| float | baro_spa06_alt |
| ISA pressure altitude of the last sample [m]. | |
| bool | baro_spa06_alt_valid |
| true once the first valid sample has been processed | |
Module glue for the Goertek SPA06-003 / SPL06-001 barometer.
Publishes pressure and temperature as ABI messages (BARO_SPA_SENDER_ID); see baro_spa06.c for details. Configure the bus with SPA06_USE_SPI, SPA06_DEV and SPA06_SLAVE_ADDR / SPA06_SLAVE_IDX.
Definition in file baro_spa06.h.
| void baro_spa06_event | ( | void | ) |
Process finished bus transactions and publish new measurements (module event hook).
Process finished bus transactions and publish new measurements (module event hook).
When the driver flags a valid sample: sends ABI BARO_ABS [Pa] and TEMPERATURE [deg Celcius], updates the baro_spa06_alt globals (including the ISA pressure altitude) and clears data_available for the next sample.
Definition at line 94 of file baro_spa06.c.
References baro_spa06, baro_spa06_alt, baro_spa06_alt_valid, BARO_SPA_SENDER_ID, get_sys_time_usec(), pprz_isa_altitude_of_pressure(), spa06_event(), and TEMPERATURE_TYPE_BARO.
| void baro_spa06_init | ( | void | ) |
Bind the driver to the configured bus and register telemetry (module init hook).
Bind the driver to the configured bus and register telemetry (module init hook).
Bus selection is compile time: SPA06_USE_SPI picks SPI (SPA06_DEV + SPA06_SLAVE_IDX) or I2C (SPA06_DEV + SPA06_SLAVE_ADDR). The sensor itself is detected and configured asynchronously by the periodic/event pair.
Definition at line 67 of file baro_spa06.c.
References baro_spa06, SPA06_I2C, spa06_init(), SPA06_SLAVE_ADDR, SPA06_SLAVE_IDX, and SPA06_SPI.
| void baro_spa06_periodic | ( | void | ) |
Drive the sensor state machine (module periodic hook).
Drive the sensor state machine (module periodic hook).
Definition at line 82 of file baro_spa06.c.
References baro_spa06, and spa06_periodic().
|
extern |
The barometer driver instance, exposed for debugging/telemetry.
The barometer driver instance, exposed for debugging/telemetry.
Definition at line 58 of file baro_spa06.c.
Referenced by baro_spa06_event(), baro_spa06_init(), and baro_spa06_periodic().
|
extern |
ISA pressure altitude of the last sample [m].
Definition at line 54 of file baro_spa06.c.
Referenced by baro_spa06_event().
|
extern |
true once the first valid sample has been processed
Definition at line 55 of file baro_spa06.c.
Referenced by baro_spa06_event().