Revert continuous battery charging, it doesn't quite work
This commit is contained in:
parent
9f356f88cc
commit
5f49f49140
@ -66,21 +66,15 @@ void ac_adapter() {
|
|||||||
// Set ACIN LED
|
// Set ACIN LED
|
||||||
gpio_set(&LED_ACIN, !new);
|
gpio_set(&LED_ACIN, !new);
|
||||||
|
|
||||||
// Battery charger disables by default after timeout, make sure it knows
|
|
||||||
// we are still alive by setting charge values repeatedly
|
|
||||||
if (new) {
|
|
||||||
battery_charger_disable();
|
|
||||||
} else {
|
|
||||||
battery_charger_enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If there has been a change, print
|
// If there has been a change, print
|
||||||
if (new != last) {
|
if (new != last) {
|
||||||
DEBUG("Power adapter ");
|
DEBUG("Power adapter ");
|
||||||
if (new) {
|
if (new) {
|
||||||
DEBUG("unplugged\n");
|
DEBUG("unplugged\n");
|
||||||
|
battery_charger_disable();
|
||||||
} else {
|
} else {
|
||||||
DEBUG("plugged in\n");
|
DEBUG("plugged in\n");
|
||||||
|
battery_charger_enable();
|
||||||
}
|
}
|
||||||
battery_debug();
|
battery_debug();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user