dont start moving if already homed

master
Eggert Jung 4 years ago
parent 5ff3793991
commit 5a85471ca5

@ -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;