Skip to content

Commit

Permalink
T-Embed Battery charging Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorcelli committed Nov 7, 2024
1 parent 00751c9 commit 114843d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ build_flags =

lib_deps =
${common.lib_deps}
https://github.com/lewisxhe/XPowersLib
lewisxhe/XPowersLib @ ^0.2.4



Expand Down Expand Up @@ -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


Expand Down
10 changes: 2 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 114843d

Please sign in to comment.