Add timing monitor for main loop and add monitors to safety flag command

This commit is contained in:
2020-08-16 12:34:41 +02:00
parent fa3c980207
commit d1d2d514bd
5 changed files with 80 additions and 1 deletions

View File

@@ -206,9 +206,9 @@ int main(void)
shell_print_motd(shell_handle);
while (1) {
sd_card_mounted = mount_sd_card_if_avail(sd_card_mounted);
if (systick_ticks_have_passed(quarter_sec_timestamp, 250)) {
sd_card_mounted = mount_sd_card_if_avail(sd_card_mounted);
quarter_sec_timestamp = systick_get_global_tick();
}
@@ -220,6 +220,7 @@ int main(void)
oven_driver_set_power(0);
oven_driver_apply_power_level();
safety_controller_report_timing(ERR_TIMING_MAIN_LOOP);
if (menu_wait_request)
__WFI();
else