diff --git a/sw/airborne/modules/sensors/baro_bmp.h b/sw/airborne/modules/sensors/baro_bmp.h index 7db2fa66a2..860937bfe6 100644 --- a/sw/airborne/modules/sensors/baro_bmp.h +++ b/sw/airborne/modules/sensors/baro_bmp.h @@ -34,7 +34,13 @@ #define BARO_BMP_START_PRESS 4 #define BARO_BMP_READ_PRESS 5 -#define BARO_BMP_DT 0.05 +/// new measurement every 3rd baro_bmp_periodic +#ifndef SITL +#define BARO_BMP_DT (BARO_BMP_PERIODIC_PERIOID / 3) +#else +#define BARO_BMP_DT BARO_BMP_PERIODIC_PERIOID +#endif + extern bool_t baro_bmp_enabled; extern float baro_bmp_r; extern float baro_bmp_sigma2; diff --git a/sw/airborne/modules/sensors/baro_ets.h b/sw/airborne/modules/sensors/baro_ets.h index 832280f60a..33f7bbd592 100644 --- a/sw/airborne/modules/sensors/baro_ets.h +++ b/sw/airborne/modules/sensors/baro_ets.h @@ -45,7 +45,8 @@ #include "std.h" #include "mcu_periph/i2c.h" -#define BARO_ETS_DT 0.05 +/// new measurement every baro_ets_read_periodic +#define BARO_ETS_DT BARO_ETS_READ_PERIODIC_PERIOD extern uint16_t baro_ets_adc; extern uint16_t baro_ets_offset; diff --git a/sw/airborne/modules/sensors/baro_ms5611_i2c.h b/sw/airborne/modules/sensors/baro_ms5611_i2c.h index 2f575e8a37..2f34e8fcff 100644 --- a/sw/airborne/modules/sensors/baro_ms5611_i2c.h +++ b/sw/airborne/modules/sensors/baro_ms5611_i2c.h @@ -12,7 +12,9 @@ #define PROM_NB 8 -#define BARO_MS5611_DT 0.05 +/// new measurement every baro_ms5611_periodic +#define BARO_MS5611_DT BARO_MS5611_PERIODIC_PERIOID + #define BARO_MS5611_R 20 #define BARO_MS5611_SIGMA2 1 extern float baro_ms5611_alt;