From 6fbc0d4c087b6818c12670feffd5801304c200be Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Tue, 24 May 2022 19:43:11 +0200 Subject: [PATCH] check init when spooling is stopped --- spule.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/spule.c b/spule.c index 3d99117..45bdb28 100644 --- a/spule.c +++ b/spule.c @@ -109,14 +109,13 @@ void do_spule(){ if (read_Input(BTN_WICKELN_AUS, RISING)) { spule_onoff(0); } - - if (read_Input(BTN_INIT, RISING)) { - spule_trans_homed = 0; - taenzer_state.homed = 0; - taenzer_state.active = 0; - windings = 0; - windings_wakeup = 0; - } + } + if (read_Input(BTN_INIT, RISING)) { + spule_trans_homed = 0; + taenzer_state.homed = 0; + taenzer_state.active = 0; + windings = 0; + windings_wakeup = 0; } //PORTH |= (1<<5); }