Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1868 → Rev 1887

/branches/dongfang_FC_rewrite/mk3mag.c
81,7 → 81,7
/*********************************************/
void MK3MAG_Update(void) {// called every 102.4 us by timer 0 ISR
static uint16_t PWMCount = 0;
static uint16_t BeepDelay = 0;
static uint16_t beepDelay = 0;
static uint16_t debugCounter = 0;
// The pulse width varies from 1ms (0°) to 36.99ms (359.9°)
// in other words 100us/° with a +1ms offset.
129,10 → 129,10
PWMCount = 0; // reset pwm counter
}
if (!PWMTimeout) {
if (CheckDelay(BeepDelay)) {
if (!BeepTime)
BeepTime = 100; // make noise with 10Hz to signal the compass problem
BeepDelay = SetDelay(100);
if (checkDelay(beepDelay)) {
if (!beepTime)
beepTime = 100; // make noise with 10Hz to signal the compass problem
beepDelay = setDelay(100);
}
}
}