31,7 → 31,7 |
static unsigned char cnt_1ms = 1,cnt = 0; |
unsigned char pieper_ein = 0; |
if(SendSPI) SendSPI--; |
if(SpektrumTimer) SpektrumTimer--; |
if(SpektrumTimer) SpektrumTimer--; |
|
if(!cnt--) |
{ |
80,10 → 80,8 |
{ |
cntKompass += cntKompass / 41; |
if(cntKompass > 10) KompassValue = cntKompass - 10; else KompassValue = 0; |
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
} |
// if(cntKompass < 10) cntKompass =r 10; |
// KompassValue = (unsigned long)((unsigned long)(cntKompass-10)*720L + 1L) / 703L; |
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
cntKompass = 0; |
} |
} |
132,7 → 130,7 |
|
// disable all interrupts before reconfiguration |
cli(); |
|
|
PORTD &= ~(1<<PORTD7); // set PD7 to low |
|
DDRC |= (1<<DDC6); // set PC6 as output (Reset for HEF4017) |