diff --git a/platformio.ini b/platformio.ini index 428c464..b15d097 100644 --- a/platformio.ini +++ b/platformio.ini @@ -926,7 +926,7 @@ build_flags = lib_deps = ${common.lib_deps} - https://github.com/lewisxhe/XPowersLib + lewisxhe/XPowersLib @ ^0.2.4 @@ -1190,7 +1190,7 @@ build_flags = lib_deps = ${common.lib_deps} - lewisxhe/XPowersLib @ ^0.2.6 + lewisxhe/XPowersLib @ ^0.2.4 mathertel/RotaryEncoder @ ^1.5.3 diff --git a/src/main.cpp b/src/main.cpp index a2823d0..91a01d0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -236,14 +236,8 @@ void setup() { PPM.enableADCMeasure(); PPM.enableCharge(); } - - - // To obtain voltage data, the ADC must be enabled first - PPM.enableADCMeasure(); - - // Turn on charging function - // If there is no battery connected, do not turn on the charging function - PPM.enableCharge(); + PPM.enableOTG(); + PPM.disableOTG(); pinMode(12, OUTPUT); digitalWrite(12,HIGH);//CS pin for CC1101 pin #else