From e570736cc862731714371cea7b24d2f92db13ee9 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 1 Nov 2020 00:44:51 +0100 Subject: [PATCH] bugfix of TwoWire handeling --- src/LoRa_APRS_iGate.cpp | 1 - src/power_management.cpp | 2 +- src/power_management.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index a65c8c4..fa8aab9 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -60,7 +60,6 @@ void setup() } else { Serial.println("LoRa-APRS / Init / AXP192 Begin FAIL"); } - Wire.begin(SDA, SCL); powerManagement.activateLoRa(); powerManagement.activateOLED(); powerManagement.deactivateGPS(); diff --git a/src/power_management.cpp b/src/power_management.cpp index 099ff99..54b439e 100644 --- a/src/power_management.cpp +++ b/src/power_management.cpp @@ -7,7 +7,7 @@ PowerManagement::PowerManagement() } // cppcheck-suppress unusedFunction -bool PowerManagement::begin(TwoWire port) +bool PowerManagement::begin(TwoWire & port) { bool result = axp.begin(port, AXP192_SLAVE_ADDRESS); if(!result) diff --git a/src/power_management.h b/src/power_management.h index 9e1ad29..fccc031 100644 --- a/src/power_management.h +++ b/src/power_management.h @@ -8,7 +8,7 @@ class PowerManagement { public: PowerManagement(); - bool begin(TwoWire port); + bool begin(TwoWire & port); void activateLoRa(); void deactivateLoRa();