Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2039 → Rev 2044

/branches/dongfang_FC_rewrite/timer0.c
138,7 → 138,7
ISR(TIMER0_OVF_vect)
{ // 9765.625 Hz
static uint8_t cnt_1ms = 1, cnt = 0;
uint8_t beeper_On = 0;
uint8_t beeperOn = 0;
 
#ifdef USE_NAVICTRL
if(SendSPI) SendSPI--; // if SendSPI is 0, the transmit of a byte via SPI bus to and from The Navicontrol is done
161,16 → 161,15
if (beepTime) {
beepTime--; // decrement BeepTime
if (beepTime & beepModulation)
// beeper_On = 1;
beeper_On = 1; // shut up in dev!!!
beeperOn = 1;
else
beeper_On = 0;
beeperOn = 0;
} else { // beeper off if duration is over
beeper_On = 0;
beeperOn = 0;
beepModulation = BEEP_MODULATION_NONE;
}
 
if (beeper_On) {
if (beeperOn) {
// set speaker port to high.
if (boardRelease == 10)
PORTD |= (1 << PORTD2); // Speaker at PD2
184,14 → 183,12
PORTC &= ~(1 << PORTC7);// Speaker at PC7
}
 
#ifndef USE_NAVICTRL
#ifdef USE_DIRECT_GPS
// update compass value if this option is enabled in the settings
if (staticParams.bitConfig & (CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE)) {
#ifdef USE_DIRECT_GPS
MK3MAG_periodicTask(); // read out mk3mag pwm
#endif
}
#endif
}
 
// -----------------------------------------------------------------------