ardupilot/libraries/AP_Baro/AP_Baro_PX4.h
Andrew Tridgell fc119d9b80 AP_Baro: cleaned up temperature and pressure units
thanks to Mike McCauley for pointing this out
2013-09-21 21:30:41 +10:00

30 lines
595 B
C++

/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#ifndef __AP_BARO_PX4_H__
#define __AP_BARO_PX4_H__
#include "AP_Baro.h"
class AP_Baro_PX4 : public AP_Baro
{
public:
bool init();
uint8_t read();
float get_pressure();
float get_temperature();
private:
float _temperature;
float _pressure;
float _pressure_sum;
float _temperature_sum;
uint32_t _sum_count;
void _accumulate(void);
void _baro_timer(uint32_t now);
uint64_t _last_timestamp;
// baro driver handle
int _baro_fd;
};
#endif // __AP_BARO_PX4_H__