2011-12-28 05:32:21 -04:00
|
|
|
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
2011-10-13 11:22:03 -03:00
|
|
|
|
2013-05-02 02:08:42 -03:00
|
|
|
#ifndef __AP_BARO__HIL_H__
|
|
|
|
#define __AP_BARO__HIL_H__
|
2011-11-27 01:34:26 -04:00
|
|
|
|
|
|
|
#include "AP_Baro.h"
|
|
|
|
|
2013-05-02 02:08:42 -03:00
|
|
|
class AP_Baro_HIL : public AP_Baro
|
2011-10-13 11:22:03 -03:00
|
|
|
{
|
2011-12-28 05:32:21 -04:00
|
|
|
private:
|
2012-08-21 23:19:51 -03:00
|
|
|
uint8_t BMP085_State;
|
2012-07-06 02:11:22 -03:00
|
|
|
float Temp;
|
|
|
|
float Press;
|
2012-07-05 03:26:56 -03:00
|
|
|
int32_t _pressure_sum;
|
|
|
|
int32_t _temperature_sum;
|
2013-10-17 03:21:36 -03:00
|
|
|
volatile uint8_t _count;
|
2012-07-05 03:26:56 -03:00
|
|
|
|
2011-12-28 05:32:21 -04:00
|
|
|
public:
|
2012-10-11 14:53:21 -03:00
|
|
|
bool init();
|
2012-08-21 23:19:51 -03:00
|
|
|
uint8_t read();
|
|
|
|
float get_pressure();
|
|
|
|
float get_temperature();
|
2013-05-02 02:26:38 -03:00
|
|
|
void setHIL(float altitude_msl);
|
2011-10-13 11:22:03 -03:00
|
|
|
};
|
|
|
|
|
2013-05-02 02:08:42 -03:00
|
|
|
#endif // __AP_BARO__HIL_H__
|