Skip to content

Commit 583e65c

Browse files
committed
pbio/sys/main: Drive pbio/os hook.
This was missed when upgrading the event loop system. This would cause the charger event loop to not run after being switched off. Rather than switch to the direct equivalent of pbio_do_one_event (pbio_os_run_processes_once), we can use pbio_os_run_processes_and_wait_for_event since it can otherwise be idle.
1 parent 600e42a commit 583e65c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbio/sys/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ int main(int argc, char **argv) {
136136
// or USB being plugged in, so we have this loop to keep pumping events
137137
// to turn off most of the peripherals and keep the battery charger running.
138138
while (pbsys_status_test(PBIO_PYBRICKS_STATUS_POWER_BUTTON_PRESSED) || pbdrv_usb_get_bcd() != PBDRV_USB_BCD_NONE) {
139-
pbio_do_one_event();
139+
pbio_os_run_processes_and_wait_for_event();
140140
}
141141

142142
// Platform-specific power off.

0 commit comments

Comments
 (0)