|
|
|
@ -23,6 +23,28 @@ public:
@@ -23,6 +23,28 @@ public:
|
|
|
|
|
// If the value further that filtrer_range from mean value, it is rejected.
|
|
|
|
|
bool pressure_ok(float press); |
|
|
|
|
uint32_t get_error_count() const { return _error_count; } |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
device driver IDs. These are used to fill in the devtype field |
|
|
|
|
of the device ID, which shows up as GND_BARO_ID* parameters to |
|
|
|
|
users. |
|
|
|
|
*/ |
|
|
|
|
enum DevTypes { |
|
|
|
|
DEVTYPE_BARO_SITL = 0x01, |
|
|
|
|
DEVTYPE_BARO_BMP085 = 0x02, |
|
|
|
|
DEVTYPE_BARO_BMP280 = 0x03, |
|
|
|
|
DEVTYPE_BARO_BMP388 = 0x04, |
|
|
|
|
DEVTYPE_BARO_DPS280 = 0x05, |
|
|
|
|
DEVTYPE_BARO_DPS310 = 0x06, |
|
|
|
|
DEVTYPE_BARO_FBM320 = 0x07, |
|
|
|
|
DEVTYPE_BARO_ICM20789 = 0x08, |
|
|
|
|
DEVTYPE_BARO_KELLERLD = 0x09, |
|
|
|
|
DEVTYPE_BARO_LPS2XH = 0x0A, |
|
|
|
|
DEVTYPE_BARO_MS5611 = 0x0B, |
|
|
|
|
DEVTYPE_BARO_SPL06 = 0x0C, |
|
|
|
|
DEVTYPE_BARO_UAVCAN = 0x0D, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
// reference to frontend object
|
|
|
|
|
AP_Baro &_frontend; |
|
|
|
@ -38,4 +60,9 @@ protected:
@@ -38,4 +60,9 @@ protected:
|
|
|
|
|
float _mean_pressure;
|
|
|
|
|
// number of dropped samples. Not used for now, but can be usable to choose more reliable sensor
|
|
|
|
|
uint32_t _error_count; |
|
|
|
|
|
|
|
|
|
// set bus ID of this instance, for GND_BARO_ID parameters
|
|
|
|
|
void set_bus_id(uint8_t instance, uint32_t id) { |
|
|
|
|
_frontend.sensors[instance].bus_id.set(int32_t(id)); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|