diff --git a/libraries/AP_Baro/AP_Baro_BMP085.cpp b/libraries/AP_Baro/AP_Baro_BMP085.cpp index 6eb84d274e..690f121a5f 100644 --- a/libraries/AP_Baro/AP_Baro_BMP085.cpp +++ b/libraries/AP_Baro/AP_Baro_BMP085.cpp @@ -59,11 +59,8 @@ bool AP_Baro_BMP085::init(int initialiseWireLib, bool apm2_hardware) { byte buff[22]; 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 BMP085_State = 0; // Initial state diff --git a/libraries/AP_Baro/AP_Baro_BMP085.h b/libraries/AP_Baro/AP_Baro_BMP085.h index d957c1f7a2..4cd8916d5b 100644 --- a/libraries/AP_Baro/AP_Baro_BMP085.h +++ b/libraries/AP_Baro/AP_Baro_BMP085.h @@ -9,11 +9,11 @@ class AP_Baro_BMP085 : public AP_Baro { public: - AP_Baro_BMP085(): + AP_Baro_BMP085(bool apm2_hardware): _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: */ uint8_t read();