2011-11-05 22:11:25 -03:00
|
|
|
|
2011-11-27 01:49:17 -04:00
|
|
|
#ifndef __AP_BARO_MS5611_H__
|
|
|
|
#define __AP_BARO_MS5611_H__
|
2011-11-05 22:11:25 -03:00
|
|
|
|
|
|
|
|
2011-11-27 01:49:17 -04:00
|
|
|
class AP_Baro_MS5611
|
2011-11-27 01:43:34 -04:00
|
|
|
{
|
2011-11-27 01:49:17 -04:00
|
|
|
public:
|
|
|
|
AP_Baro_MS5611() {} // Constructor
|
|
|
|
|
|
|
|
|
|
|
|
void init();
|
|
|
|
uint8_t read();
|
|
|
|
uint32_t get_pressure(); // in mbar*100 units
|
|
|
|
uint16_t get_temperature(); // in celsius degrees * 100 units
|
|
|
|
float get_altitude(); // in meter units
|
|
|
|
|
2011-11-27 01:43:34 -04:00
|
|
|
private:
|
|
|
|
|
2011-11-27 01:49:17 -04:00
|
|
|
int16_t Temp;
|
|
|
|
int32_t Press;
|
|
|
|
int32_t Alt;
|
|
|
|
|
|
|
|
// Internal calibration registers
|
|
|
|
uint16_t C1,C2,C3,C4,C5,C6;
|
|
|
|
uint32_t D1,D2;
|
|
|
|
void calculate();
|
|
|
|
uint8_t MS5611_Ready();
|
|
|
|
long MS5611_timer;
|
|
|
|
uint8_t MS5611_State;
|
2011-11-05 22:11:25 -03:00
|
|
|
};
|
|
|
|
|
2011-11-27 01:49:17 -04:00
|
|
|
#endif // __AP_BARO_MS5611_H__
|