make LED blink if error that stop the PID are present
This commit is contained in:
parent
7a36b597be
commit
6ac108e1b2
@ -312,7 +312,7 @@ int main(void)
|
|||||||
* it is tried to load it from SD card.
|
* it is tried to load it from SD card.
|
||||||
*/
|
*/
|
||||||
if (systick_ticks_have_passed(quarter_sec_timestamp, 250)) {
|
if (systick_ticks_have_passed(quarter_sec_timestamp, 250)) {
|
||||||
led_set(1, 0);
|
led_set(1u, 0);
|
||||||
sd_old = sd_card_mounted;
|
sd_old = sd_card_mounted;
|
||||||
sd_card_mounted = mount_sd_card_if_avail(sd_card_mounted);
|
sd_card_mounted = mount_sd_card_if_avail(sd_card_mounted);
|
||||||
|
|
||||||
@ -325,6 +325,14 @@ int main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if any flags are present, that disable the PID controller. Blink
|
||||||
|
* LED 0 in this case
|
||||||
|
*/
|
||||||
|
if (oven_pid_get_status() == OVEN_PID_ABORTED)
|
||||||
|
led_set(0u, led_get(0u) ? 0 : 1);
|
||||||
|
else
|
||||||
|
led_set(0u, 0);
|
||||||
|
|
||||||
quarter_sec_timestamp = systick_get_global_tick();
|
quarter_sec_timestamp = systick_get_global_tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user