529,24 → 529,30 |
Echo = 0; // reset echo value |
UART1_Request_Echo = FALSE; |
} |
if((UART1_Request_DebugLabel != 0xFF) && (UART1_tx_buffer.Locked == FALSE)) |
else if((UART1_Request_DebugLabel != 0xFF) && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'A', NC_ADDRESS, 2, &UART1_Request_DebugLabel, sizeof(UART1_Request_DebugLabel), (u8 *) ANALOG_LABEL[UART1_Request_DebugLabel], 16); |
UART1_Request_DebugLabel = 0xFF; |
} |
if(UART1_ConfirmFrame && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_ConfirmFrame && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'B', NC_ADDRESS, 1, &UART1_ConfirmFrame, sizeof(UART1_ConfirmFrame)); |
UART1_ConfirmFrame = 0; |
} |
if( (( (UART1_DebugData_Interval > 0) && CheckDelay(UART1_DebugData_Timer)) || UART1_Request_DebugData) && (UART1_tx_buffer.Locked == FALSE)) |
else if(( ((UART1_NaviData_Interval > 0) && CheckDelay(UART1_NaviData_Timer) ) || UART1_Request_NaviData) && (UART1_tx_buffer.Locked == FALSE)) |
{ |
NaviData.Errorcode = ErrorCode; |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
UART1_NaviData_Timer = SetDelay(UART1_NaviData_Interval); |
UART1_Request_NaviData = FALSE; |
} |
else if( (( (UART1_DebugData_Interval > 0) && CheckDelay(UART1_DebugData_Timer)) || UART1_Request_DebugData) && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'D', NC_ADDRESS, 1,(u8 *)&DebugOut, sizeof(DebugOut)); |
UART1_DebugData_Timer = SetDelay(UART1_DebugData_Interval); |
UART1_Request_DebugData = FALSE; |
} |
|
if((( (UART1_Data3D_Interval > 0) && CheckDelay(UART1_Data3D_Timer) ) || UART1_Request_Data3D) && (UART1_tx_buffer.Locked == FALSE)) |
else if((( (UART1_Data3D_Interval > 0) && CheckDelay(UART1_Data3D_Timer) ) || UART1_Request_Data3D) && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'C', NC_ADDRESS, 1,(u8 *)&Data3D, sizeof(Data3D)); |
UART1_Data3D_Timer = SetDelay(UART1_Data3D_Interval); |
553,12 → 559,12 |
UART1_Request_Data3D = FALSE; |
} |
|
if(UART1_Request_ExternalControl && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_Request_ExternalControl && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'G', NC_ADDRESS, 1, (u8 *)&ExternControl, sizeof(ExternControl)); |
UART1_Request_ExternalControl = FALSE; |
} |
if(UART1_Request_Display && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_Request_Display && (UART1_tx_buffer.Locked == FALSE)) |
{ |
LCD_PrintMenu(); |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'H', NC_ADDRESS, 2, &UART1_DisplayLine, sizeof(UART1_DisplayLine), (u8*)&DisplayBuff[UART1_DisplayLine * 20], 20); |
566,30 → 572,23 |
if(UART1_DisplayLine >= 4) UART1_DisplayLine = 0; |
UART1_Request_Display = FALSE; |
} |
if(UART1_Request_Display1 && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_Request_Display1 && (UART1_tx_buffer.Locked == FALSE)) |
{ |
LCD_PrintMenu(); |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'L', NC_ADDRESS, 3, (u8*)&MenuItem, sizeof(MenuItem), (u8*)&MaxMenuItem, sizeof(MaxMenuItem),(u8*)DisplayBuff, sizeof(DisplayBuff)); |
UART1_Request_Display1 = FALSE; |
} |
if(UART1_Request_VersionInfo && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_Request_VersionInfo && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'V', NC_ADDRESS,1, (u8 *)&UART_VersionInfo, sizeof(UART_VersionInfo)); |
UART1_Request_VersionInfo = FALSE; |
} |
if(( (UART1_NaviData_Interval && CheckDelay(UART1_NaviData_Timer) ) || UART1_Request_NaviData) && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_Request_ErrorMessage && (UART1_tx_buffer.Locked == FALSE)) |
{ |
NaviData.Errorcode = ErrorCode; |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
UART1_NaviData_Timer = SetDelay(UART1_NaviData_Interval); |
UART1_Request_NaviData = FALSE; |
} |
if(UART1_Request_ErrorMessage && (UART1_tx_buffer.Locked == FALSE)) |
{ |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'E', NC_ADDRESS, 1, (u8 *)&ErrorMSG, sizeof(ErrorMSG)); |
UART1_Request_ErrorMessage = FALSE; |
} |
if(UART1_Request_SendFollowMe && (UART1_tx_buffer.Locked == FALSE) && (GPSData.NumOfSats >= 4)) // sending for "Follow me" |
else if(UART1_Request_SendFollowMe && (UART1_tx_buffer.Locked == FALSE) && (GPSData.NumOfSats >= 4)) // sending for "Follow me" |
{ |
GPS_CopyPosition(&(GPSData.Position),&(FollowMe.Position)); |
FollowMe.Position.Status = NEWDATA; |
604,13 → 603,13 |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 's', NC_ADDRESS, 1, (u8 *)&FollowMe, sizeof(FollowMe)); |
UART1_Request_SendFollowMe = FALSE; |
} |
if(UART1_Request_NewWaypoint && (UART1_tx_buffer.Locked == FALSE)) |
else if(UART1_Request_NewWaypoint && (UART1_tx_buffer.Locked == FALSE)) |
{ |
u8 WPNumber = WPList_GetCount(); |
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'W', NC_ADDRESS, 1, &WPNumber, sizeof(WPNumber)); |
UART1_Request_NewWaypoint = FALSE; |
} |
if((UART1_Request_ReadWaypoint != 0xFF) && (UART1_tx_buffer.Locked == FALSE)) |
else if((UART1_Request_ReadWaypoint != 0xFF) && (UART1_tx_buffer.Locked == FALSE)) |
{ |
u8 WPNumber = WPList_GetCount(); |
if (UART1_Request_ReadWaypoint < WPNumber) |