bmp180: give sda,scl param in constructor
This commit is contained in:
parent
55beced1f8
commit
ce1f4fc3b2
@ -9,12 +9,12 @@ int bmp180Connected = 0;
|
||||
|
||||
int BMP180GetTemperature(double &t);
|
||||
int BMP180GetTempAndPressure(double &t, double &p);
|
||||
int BMP180Setup();
|
||||
int BMP180Setup(int sda, int scl);
|
||||
bool BMP180IsConnected();
|
||||
|
||||
#else //ENABLE_BMP80
|
||||
int BMP180GetTemperature(double &t){return 0;};
|
||||
int BMP180GetTempAndPressure(double &t, double &p){return 0;};
|
||||
int BMP180Setup(){return 0;};
|
||||
int BMP180Setup(int , int ){return 0;};
|
||||
bool BMP180IsConnected(){return 0;};
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifdef ENABLE_BMP180
|
||||
#include "BMP180.h"
|
||||
int BMP180Setup() {
|
||||
bmp180Connected = bmp180.begin(SDA, SCL);
|
||||
int BMP180Setup(int sda, int scl) {
|
||||
bmp180Connected = bmp180.begin(sda, scl);
|
||||
return bmp180Connected;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ void setup() {
|
||||
if (mode == BOOTMODE_OTA) {
|
||||
OTASetup();
|
||||
} else {
|
||||
if (BMP180Setup())
|
||||
if (BMP180Setup(SDA, SCL))
|
||||
SKETCH_DEBUG_PRINTLN("BMP180 init success");
|
||||
WebSetupServer(mode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user