Subversion Repositories NaviCtrl

Rev

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

Rev 264 Rev 270
Line 120... Line 120...
120
 
120
 
121
//----------------------------------------------------------------------------------------------------
121
//----------------------------------------------------------------------------------------------------
122
void GetNaviCtrlVersion(void)
122
void GetNaviCtrlVersion(void)
123
{
123
{
124
        u8 msg[25];
124
        u8 msg[25];
125
       
125
 
126
        sprintf(msg,"\n\r NaviCtrl HW: V%d.%d SW: V%d.%d%c",  Version_HW/10, Version_HW%10, VERSION_MAJOR,  VERSION_MINOR, 'a'+ VERSION_PATCH);
126
        sprintf(msg,"\n\r NaviCtrl HW: V%d.%d SW: V%d.%d%c",  Version_HW/10, Version_HW%10, VERSION_MAJOR,  VERSION_MINOR, 'a'+ VERSION_PATCH);
127
        UART1_PutString(msg);
127
        UART1_PutString(msg);
Line 128... Line 128...
128
}
128
}
Line 348... Line 348...
348
        GetNaviCtrlVersion();
348
        GetNaviCtrlVersion();
349
        DebugOut.Status[0] = 0x04 | 0x08; // NC and MK3Mag
349
        DebugOut.Status[0] = 0x04 | 0x08; // NC and MK3Mag
350
        DebugOut.Status[1] = 0x00;
350
        DebugOut.Status[1] = 0x00;
Line 351... Line 351...
351
 
351
 
352
        Compass_Init();
352
        Compass_Init();
353
       
353
 
354
        SPI0_GetFlightCtrlVersion();
354
        SPI0_GetFlightCtrlVersion();
355
        if(FC_Version.Compatible != FC_SPI_COMPATIBLE)
355
        if(FC_Version.Compatible != FC_SPI_COMPATIBLE)
356
        {
356
        {
357
                UART1_PutString("\n\r Flight-Ctrl not compatible");
357
                UART1_PutString("\n\r Flight-Ctrl not compatible");
358
                LED_RED_ON;
358
                LED_RED_ON;
Line 359... Line 359...
359
        }
359
        }
Line 360... Line 360...
360
 
360
 
361
        GPS_Init();    
361
        GPS_Init();
362
 
362
 
363
        // ---------- Prepare the isr driven
363
        // ---------- Prepare the isr driven
364
        // set to absolute lowest priority
364
        // set to absolute lowest priority
Line 365... Line 365...
365
    VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW);
365
    VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW);
366
        // enable interrupts
366
        // enable interrupts
367
    VIC_ITCmd(EXTIT3_ITLine, ENABLE);
367
    VIC_ITCmd(EXTIT3_ITLine, ENABLE);
368
 
368
 
369
        Debug_OK("START");
369
        Debug_OK("START");
370
       
370
 
371
        for (;;) // the endless main loop
371
        for (;;) // the endless main loop