Skip to content

Commit

Permalink
Only apply disable charging if temp is high and charger exists. #41
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbeanton committed Feb 4, 2020
1 parent 2eea7cb commit 3c4780c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void pmProcess() {
}

// Check that environmental temp is OK for charging
if (NRF_TEMP->EVENTS_DATARDY)
if (pmConfig->hasCharger && NRF_TEMP->EVENTS_DATARDY)
{
temp = (float)(NRF_TEMP->TEMP / 4.0);
if (temp < 15.0 || temp > 45.0)
Expand Down

0 comments on commit 3c4780c

Please sign in to comment.