mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-20 15:48:29 -04:00
AP_Baro_BMP085: Conform to AP_Baro interface. Make the rest private.
This commit is contained in:
parent
a41b6da263
commit
f0ab0318b3
@ -6,12 +6,25 @@
|
|||||||
|
|
||||||
#include "AP_Baro.h"
|
#include "AP_Baro.h"
|
||||||
|
|
||||||
class AP_Baro_BMP085
|
class AP_Baro_BMP085 : public AP_Baro
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AP_Baro_BMP085():
|
AP_Baro_BMP085():
|
||||||
_temp_index(0),
|
_temp_index(0),
|
||||||
_press_index(0){}; // Constructor
|
_press_index(0){}; // Constructor
|
||||||
|
|
||||||
|
bool init(int initialiseWireLib = 1, bool apm2_hardware=false);
|
||||||
|
|
||||||
|
/* AP_Baro public interface: */
|
||||||
|
uint8_t read();
|
||||||
|
int32_t get_pressure();
|
||||||
|
int16_t get_temperature();
|
||||||
|
float get_altitude();
|
||||||
|
|
||||||
|
int32_t get_raw_pressure();
|
||||||
|
int32_t get_raw_temp();
|
||||||
|
|
||||||
|
private:
|
||||||
int32_t RawPress;
|
int32_t RawPress;
|
||||||
int32_t _offset_press;
|
int32_t _offset_press;
|
||||||
int32_t RawTemp;
|
int32_t RawTemp;
|
||||||
@ -22,10 +35,7 @@ class AP_Baro_BMP085
|
|||||||
bool _apm2_hardware;
|
bool _apm2_hardware;
|
||||||
//int32_t Press0; // Pressure at sea level
|
//int32_t Press0; // Pressure at sea level
|
||||||
|
|
||||||
bool Init(int initialiseWireLib = 1, bool apm2_hardware=false);
|
|
||||||
uint8_t Read();
|
|
||||||
|
|
||||||
private:
|
|
||||||
// State machine
|
// State machine
|
||||||
uint8_t BMP085_State;
|
uint8_t BMP085_State;
|
||||||
// Internal calibration registers
|
// Internal calibration registers
|
||||||
|
Loading…
Reference in New Issue
Block a user