fix(display): Check for display in idle handler.

* Closes #679
This commit is contained in:
Pete Johanson 2021-02-15 22:04:19 -05:00
parent daf3a4af75
commit ff7891c097

View file

@ -38,12 +38,20 @@ void display_timer_cb() { k_work_submit(&display_tick_work); }
K_TIMER_DEFINE(display_timer, display_timer_cb, NULL);
static void start_display_updates() {
if (display == NULL) {
return;
}
display_blanking_off(display);
k_timer_start(&display_timer, K_MSEC(10), K_MSEC(10));
}
static void stop_display_updates() {
if (display == NULL) {
return;
}
display_blanking_on(display);
k_timer_stop(&display_timer);