mirror of https://github.com/ArduPilot/ardupilot
AP_Baro_BMP085: move apm2_hardware flag from init to constructor.
This commit is contained in:
parent
f3ad7f3af8
commit
a626e21e98
|
@ -59,11 +59,8 @@ bool AP_Baro_BMP085::init(int initialiseWireLib, bool apm2_hardware)
|
||||||
{
|
{
|
||||||
byte buff[22];
|
byte buff[22];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
_apm2_hardware = apm2_hardware;
|
pinMode(BMP085_EOC, INPUT); // End Of Conversion (PC7) input
|
||||||
|
|
||||||
pinMode(BMP085_EOC, INPUT); // End Of Conversion (PC7) input
|
|
||||||
|
|
||||||
|
|
||||||
oss = 3; // Over Sampling setting 3 = High resolution
|
oss = 3; // Over Sampling setting 3 = High resolution
|
||||||
BMP085_State = 0; // Initial state
|
BMP085_State = 0; // Initial state
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
class AP_Baro_BMP085 : public AP_Baro
|
class AP_Baro_BMP085 : public AP_Baro
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AP_Baro_BMP085():
|
AP_Baro_BMP085(bool apm2_hardware):
|
||||||
_temp_index(0),
|
_temp_index(0),
|
||||||
_press_index(0){}; // Constructor
|
_press_index(0),
|
||||||
|
_apm2_hardware(apm2_hardware){}; // Constructor
|
||||||
|
|
||||||
bool init(int initialiseWireLib = 1, bool apm2_hardware=false);
|
|
||||||
|
|
||||||
/* AP_Baro public interface: */
|
/* AP_Baro public interface: */
|
||||||
uint8_t read();
|
uint8_t read();
|
||||||
|
|
Loading…
Reference in New Issue