Subversion Repositories NaviCtrl

Rev

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

Rev 275 Rev 292
Line 131... Line 131...
131
 
131
 
132
void CheckErrors(void)
132
void CheckErrors(void)
133
{
133
{
Line 134... Line 134...
134
        UART_VersionInfo.HardwareError[0] = 0;
134
        UART_VersionInfo.HardwareError[0] = 0;
135
 
135
 
Line 136... Line 136...
136
        if(/*(MK3MAG_Version.Compatible != MK3MAG_I2C_COMPATIBLE) ||*/ CheckDelay(I2C1_Timeout) || (Compass_Heading < 0)) DebugOut.Status[1] |= 0x08;
136
        if(CheckDelay(I2C1_Timeout) || (Compass_Heading < 0)) DebugOut.Status[1] |= 0x08;
137
        else DebugOut.Status[1] &= ~0x08; // MK3Mag green status
137
        else DebugOut.Status[1] &= ~0x08; // MK3Mag green status
Line 228... Line 228...
228
        {
228
        {
229
                LED_RED_ON;
229
                LED_RED_ON;
230
                sprintf(ErrorMSG,"Mixer Error");
230
                sprintf(ErrorMSG,"Mixer Error");
231
                ErrorCode = 19;
231
                ErrorCode = 19;
232
        }
232
        }
233
/*      else if(MK3MAG_Version.Compatible != MK3MAG_I2C_COMPATIBLE)
-
 
234
        {
-
 
235
                sprintf(ErrorMSG,"MK3Mag not compatible ");
-
 
236
                LED_RED_ON;
-
 
237
                ErrorCode = 2;
-
 
238
                StopNavigation = 1;
-
 
239
                UART_VersionInfo.HardwareError[0] |= NC_ERROR0_COMPASS_INCOMPATIBLE;
-
 
240
        } */
-
 
241
        else if(CheckDelay(UBX_Timeout))
233
        else if(CheckDelay(UBX_Timeout))
242
        {
234
        {
243
                LED_RED_ON;
235
                LED_RED_ON;
244
                sprintf(ErrorMSG,"no GPS communication ");
236
                sprintf(ErrorMSG,"no GPS communication ");
245
                ErrorCode = 5;
237
                ErrorCode = 5;
Line 291... Line 283...
291
{
283
{
292
        IENABLE;
284
        IENABLE;
Line 293... Line 285...
293
 
285
 
294
        VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq
286
        VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq
295
        VIC_SWITCmd(EXTIT3_ITLine,DISABLE); // clear pending bit
287
        VIC_SWITCmd(EXTIT3_ITLine,DISABLE); // clear pending bit
296
        Compass_UpdateHeading();        // update compass communication
288
        Compass_Update();               // update compass communication
297
        Analog_Update();                // get new ADC values
289
        Analog_Update();                // get new ADC values
Line 298... Line 290...
298
        VIC_ITCmd(EXTIT3_ITLine, ENABLE); // enable irq
290
        VIC_ITCmd(EXTIT3_ITLine, ENABLE); // enable irq
299
 
291