Skip to content

Commit 5f738b1

Browse files
committed
pbio/sys/core: Use pbio os run hook.
Otherwise we don't drive the new processes. Fixes the light not blinking at the end because the newly updated LED process was not driven during pbsys deinit.
1 parent 2c7ae89 commit 5f738b1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/pbio/sys/core.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
#include <stdint.h>
55

6-
#include <contiki.h>
7-
86
#include <pbio/main.h>
7+
#include <pbio/os.h>
98

109
#include <pbsys/battery.h>
1110
#include <pbsys/bluetooth.h>
@@ -51,7 +50,7 @@ void pbsys_init(void) {
5150
process_start(&pbsys_system_process);
5251

5352
while (pbsys_init_busy()) {
54-
pbio_do_one_event();
53+
pbio_os_run_processes_once();
5554
}
5655
}
5756

@@ -64,6 +63,6 @@ void pbsys_deinit(void) {
6463
// Wait for all relevant pbsys processes to end, but at least 500 ms so we
6564
// see a shutdown animation even if the button is released sooner.
6665
while (pbsys_init_busy() || pbdrv_clock_get_ms() - start < 500) {
67-
pbio_do_one_event();
66+
pbio_os_run_processes_once();
6867
}
6968
}

0 commit comments

Comments
 (0)