diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-11-11 21:00:06 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-11-11 21:00:06 +0100 |
commit | 6faea485bf85368311123cbbc8ccae56e0457c4f (patch) | |
tree | 790304ceeb222a4013e07f7e7d178d6f5cc11c50 | |
parent | 807e4c43bcb6496cd89a56227c15ca0d3bc4b999 (diff) |
lsm: fixs
-rw-r--r-- | Year_3/LSM/ex_20211110.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; + } } } |