AP_Baro_BMP085: move apm2_hardware flag from init to constructor.

This commit is contained in:
Pat Hickey 2011-12-08 22:27:30 -08:00
parent f3ad7f3af8
commit a626e21e98
2 changed files with 5 additions and 8 deletions

View File

@ -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

View File

@ -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();