127,6 → 127,7 |
u8 MenuBlinkBit; |
u8 ExternalGpsInUse = 0; |
u32 StartPlotting = 0; |
u8 ControllerID = 0; |
|
//---------------------------------------------------------------------------------------------------- |
void SCU_Config(void) |
154,12 → 155,22 |
//---------------------------------------------------------------------------------------------------- |
void GetNaviCtrlVersion(void) |
{ |
u8 msg[25]; |
|
u8 msg[50]; |
sprintf(msg,"\r\n NaviCtrl HW: V%d.%d SW: V%d.%02d%c", UART_VersionInfo.HWMajor/10, UART_VersionInfo.HWMajor%10, VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH); |
UART1_PutString(msg); |
} |
|
void PrintControllerVersion(void) |
{ |
u8 msg[40]; |
if(ControllerID == 0x91) sprintf(msg," NC Controller:STR911FAM44\r\n"); |
else |
if(ControllerID == 0x92) sprintf(msg," NC Controller:STR911FAM46\r\n"); |
else sprintf(msg,"\r\n Controller:??? 0x%02x !! \r\n\r\n",ControllerID); |
UART1_PutString(msg); |
} |
|
|
//---------------------------------------------------------------------------------------------------- |
|
void CheckErrors(void) |
919,7 → 930,6 |
// +++++++++++++++++++++++++++++++++++++++ |
|
GPS_Init(); |
|
// ---------- Prepare the isr driven |
// set to absolute lowest priority |
VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW); |
973,12 → 983,22 |
u8 msg[30]; |
sprintf(msg, " GimbalCtrl found V%i.%02i ",1 + FromGimbalCtrl.Version / 100, FromGimbalCtrl.Version % 100); |
UART1_PutString(msg); |
if(!(FromGimbalCtrl.GimbalStatus & GIMBAL_DATA_OK)) UART1_PutString("... but no Gimbal data!\r\n"); |
else UART1_PutString("okay\r\n"); |
if(FromGimbalCtrl.Compatible != GIMBAL_CTRL_COMPATIBLE) |
{ |
sprintf(msg, " !! ERROR: Not Compatible! %i instead of %i !!\r\n\r\n",FromGimbalCtrl.Compatible,GIMBAL_CTRL_COMPATIBLE); |
UART1_PutString(msg); |
} |
else |
{ |
if(!(FromGimbalCtrl.GimbalStatus & GIMBAL_DATA_OK)) UART1_PutString("... but no Gimbal data!\r\n"); |
else UART1_PutString("okay\r\n"); |
} |
} |
else if(Compass_I2CPort == NCMAG_PORT_INTERN) UART1_PutString(" No GimbalCtrl connected \r\n"); |
PrintControllerVersion(); |
|
// ++++++++++++++++++++++++++++++++++++++++++++++ |
UART1_PutString(" Initialization finished ... Start\r\n"); |
UART1_PutString("\r\n Initialization finished ... Start\r\n"); |
// ++++++++++++++++++++++++++++++++++++++++++++++ |
for (;;) // the endless main loop |
{ |