use charge status for staying on, not usb status

usb status doesnt seem to be updating properly yet
custom
jacqueline 1 year ago
parent cddfc2fbf7
commit d11eea7e0b
  1. 5
      src/system_fsm/idle.cpp

@ -64,9 +64,8 @@ void Idle::react(const internal::IdleTimeout& ev) {
transit<Running>(); transit<Running>();
return; return;
} }
auto s = static_cast<int>(sServices->samd().GetUsbStatus()); if (sServices->samd().GetChargeStatus() !=
ESP_LOGI(kTag, "usb status is %i", s); drivers::Samd::ChargeStatus::kDischarging) {
if (sServices->samd().GetUsbStatus() != drivers::Samd::UsbStatus::kDetached) {
// Stay powered on if we're plugged in, in order to charge faster, sync // Stay powered on if we're plugged in, in order to charge faster, sync
// files, flash updates, etc. // files, flash updates, etc.
return; return;

Loading…
Cancel
Save