Subversion Repositories NaviCtrl

Rev

Rev 199 | Rev 215 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 199 Rev 213
Line 174... Line 174...
174
        else if(FC.Flags & FCFLAG_SPI_RX_ERR)
174
        else if(FC.Flags & FCFLAG_SPI_RX_ERR)
175
        {
175
        {
176
                LED_RED_ON;
176
                LED_RED_ON;
177
                sprintf(ErrorMSG,"FC spi rx error ");
177
                sprintf(ErrorMSG,"FC spi rx error ");
178
                ErrorCode = 8;
178
                ErrorCode = 8;
179
                StopNavigation = 1;    
179
                StopNavigation = 1;
180
        }
180
        }
181
        else if(FC.RC_Quality < 100)
181
        else if(FC.RC_Quality < 100)
182
        {
182
        {
183
                LED_RED_ON;
183
                LED_RED_ON;
184
                sprintf(ErrorMSG,"RC Signal lost ");
184
                sprintf(ErrorMSG,"RC Signal lost ");
Line 192... Line 192...
192
                LED_RED_OFF;
192
                LED_RED_OFF;
193
        }
193
        }
194
}
194
}
Line 195... Line 195...
195
 
195
 
196
// the handler will be cyclic called by the timer 1 ISR
196
// the handler will be cyclic called by the timer 1 ISR
197
// used is for critical timing parts that normaly would handled 
197
// used is for critical timing parts that normaly would handled
198
// within the main loop that could block longer at logging activities
198
// within the main loop that could block longer at logging activities
199
void EXTIT3_IRQHandler(void)
199
void EXTIT3_IRQHandler(void)
200
{
200
{
Line 201... Line 201...
201
        IENABLE;
201
        IENABLE;
202
 
202
 
203
        VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq
203
        VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq
204
        VIC_SWITCmd(EXTIT3_ITLine,DISABLE); // clear pending bit
204
        VIC_SWITCmd(EXTIT3_ITLine,DISABLE); // clear pending bit
205
        I2C1_UpdateCompass();   // update compass communication 
205
        I2C1_UpdateCompass();   // update compass communication
Line 206... Line 206...
206
        Analog_Update();                // get new ADC values
206
        Analog_Update();                // get new ADC values
207
        VIC_ITCmd(EXTIT3_ITLine, ENABLE); // enable irq
207
        VIC_ITCmd(EXTIT3_ITLine, ENABLE); // enable irq
Line 272... Line 272...
272
 
272
 
Line 273... Line 273...
273
        UART0_GetMKOSDVersion();
273
        UART0_GetMKOSDVersion();
274
 
274
 
275
        GPS_Init();
275
        GPS_Init();
276
        // initialize fat16 partition on sd card (needs Timer 1)
276
        // initialize fat16 partition on sd card (needs Timer 1)
277
   
277
 
278
        // ---------- Prepare the isr driven 
278
        // ---------- Prepare the isr driven
279
        // set to absolute lowest priority
279
        // set to absolute lowest priority
280
    VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW);
280
    VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW);