bugfix of TwoWire handeling

pull/11/head
Peter Buchegger 2020-11-01 00:44:51 +01:00
rodzic 18f206ff58
commit e570736cc8
3 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -60,7 +60,6 @@ void setup()
} else { } else {
Serial.println("LoRa-APRS / Init / AXP192 Begin FAIL"); Serial.println("LoRa-APRS / Init / AXP192 Begin FAIL");
} }
Wire.begin(SDA, SCL);
powerManagement.activateLoRa(); powerManagement.activateLoRa();
powerManagement.activateOLED(); powerManagement.activateOLED();
powerManagement.deactivateGPS(); powerManagement.deactivateGPS();

Wyświetl plik

@ -7,7 +7,7 @@ PowerManagement::PowerManagement()
} }
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
bool PowerManagement::begin(TwoWire port) bool PowerManagement::begin(TwoWire & port)
{ {
bool result = axp.begin(port, AXP192_SLAVE_ADDRESS); bool result = axp.begin(port, AXP192_SLAVE_ADDRESS);
if(!result) if(!result)

Wyświetl plik

@ -8,7 +8,7 @@ class PowerManagement
{ {
public: public:
PowerManagement(); PowerManagement();
bool begin(TwoWire port); bool begin(TwoWire & port);
void activateLoRa(); void activateLoRa();
void deactivateLoRa(); void deactivateLoRa();