From 6faea485bf85368311123cbbc8ccae56e0457c4f Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 11 Nov 2021 21:00:06 +0100 Subject: lsm: fixs --- Year_3/LSM/ex_20211110.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Year_3') diff --git a/Year_3/LSM/ex_20211110.c b/Year_3/LSM/ex_20211110.c index bba8665..505192f 100644 --- a/Year_3/LSM/ex_20211110.c +++ b/Year_3/LSM/ex_20211110.c @@ -197,9 +197,11 @@ TIM2_IRQHandler(void) if (status == OPEN) { counter_ta++; - if (counter_ta >= ta_time * 10) { - counter_ta = 0; - status = CLOSING; + if (counter_ta >= ta_time * 20) { + if (mode == AUTO) { + counter_ta = 0; + status = CLOSING; + } } } -- cgit v1.2.3-18-g5258