diff --git a/taenzer.c b/taenzer.c index a404f12..65b7909 100644 --- a/taenzer.c +++ b/taenzer.c @@ -22,15 +22,15 @@ void send_info(void); void do_taenzer(){ /* Homing */ - if(!taenzer_state.homed){ - set_Output(MOTOR_TAENZER_DIR, 1); // direction: up - TCCR4B |= _BV(CS41); //TURN ON - } if(read_Input(IN_TAENZER_HOME, LEVEL)){ TCCR4B &= ~_BV(CS41); //TURN OFF taenzer_state.homed = 1; taenzer_state.pos = 0; } + if(!taenzer_state.homed && notaus_state == POWER_ON){ + set_Output(MOTOR_TAENZER_DIR, 1); // direction: up + TCCR4B |= _BV(CS41); //TURN ON + } if (read_Input(BTN_KRAFT_PLUS, RISING)) { taenzer_state.force_setpoint += 1000;