diff --git a/spule.c b/spule.c index 50d3a27..92f119f 100644 --- a/spule.c +++ b/spule.c @@ -87,23 +87,52 @@ void do_spule(){ ISR(TIMER1_OVF_vect) { if(ioHelperReadBit(outStates, MOTOR_TRANS_DIR)){ spule_trans_pos -= 1; + if(spule_trans_homed && spule_trans_pos == 84999){ + TCCR1B &= ~(_BV(CS11)); + TIMSK5 |= 1<= 85000){ - //TCCR1B &= ~(_BV(CS11)); - //TIMSK5 |= 1<= 2*4000){ + cnt = 0; + TCCR1B |= _BV(CS11); //TURN ON + TIMSK5 &= ~(1<