From 85fe0f67497230a0495c8554b11f40b2fa8b9592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 26 Apr 2020 19:52:48 +0200 Subject: [PATCH] Fix LEDs in ptdump command --- stm-firmware/shell.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stm-firmware/shell.c b/stm-firmware/shell.c index b4cd5da..9c54313 100644 --- a/stm-firmware/shell.c +++ b/stm-firmware/shell.c @@ -274,8 +274,11 @@ static shellmatta_retCode_t shell_cmd_pt1000_res_loop(const shellmatta_handle_t shellmatta_printf(handle, "\x1b[1A\x1b[150D\x1b[K"); shell_cmd_pt1000_res(handle, "", 0UL); - led_set(0, led_status); - led_set(1, !led_status); + led_set(1, led_status); + if (adc_pt1000_check_error() & ADC_PT1000_WATCHDOG_ERROR) { + led_set(0, 1); + } + led_status ^= 0x1; systick_wait_ms(150);