Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 465 → Rev 466

/branches/v0.60_MicroMag3_Nick666/v0.66c/timer0.c
3,7 → 3,6
volatile unsigned int CountMilliseconds = 0;
volatile static unsigned int tim_main;
volatile unsigned char UpdateMotor = 0;
volatile unsigned int cntKompass = 0;
volatile unsigned int beeptime = 0;
unsigned int BeepMuster = 0xffff;
int ServoValue = 0;
20,7 → 19,7
};
 
 
SIGNAL (SIG_OVERFLOW0) // 8kHz
SIGNAL (SIG_OVERFLOW0) // 9,8kHz
{
static unsigned char cnt_1ms = 1,cnt = 0;
unsigned char pieper_ein = 0;
28,7 → 27,7
 
if(!cnt--)
{
cnt = 9;
cnt = 10;
cnt_1ms++;
cnt_1ms %= 2;
if(!cnt_1ms) UpdateMotor = 1;
62,17 → 61,7
else PORTC &= ~(1<<7);
}
if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV)
{
timer0_MM3(); // Kompass auslesen
 
if (!cntKompass--) // Aufruf mit 10 Hz
{
KompassValue = heading_MM3();
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
cntKompass = 980;
}
}
if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) timer0_MM3(); // Kompass auslesen
}