summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Year_3/LSM/ex_20211110.c8
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;
+ }
}
}