Rev 214 | Rev 224 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 214 | Rev 215 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | 80 | ||
81 | #define ABO_TIMEOUT 4000 // disable abo after 4 seconds |
81 | #define ABO_TIMEOUT 4000 // disable abo after 4 seconds |
Line 82... | Line 82... | ||
82 | u32 UART1_AboTimeOut = 0; |
82 | u32 UART1_AboTimeOut = 0; |
83 | - | ||
84 | u8 UART1_Request_VersionInfo = FALSE; |
83 | |
85 | u8 UART1_Request_SendFollowMe = FALSE; |
84 | u8 UART1_Request_VersionInfo = FALSE; |
86 | u8 UART1_Request_ExternalControl= FALSE; |
85 | u8 UART1_Request_ExternalControl= FALSE; |
87 | u8 UART1_Request_Display = FALSE; |
86 | u8 UART1_Request_Display = FALSE; |
88 | u8 UART1_Request_Display1 = FALSE; |
87 | u8 UART1_Request_Display1 = FALSE; |
Line 162... | Line 161... | ||
162 | 161 | ||
163 | DebugOut_t DebugOut; |
162 | DebugOut_t DebugOut; |
164 | ExternControl_t ExternControl; |
163 | ExternControl_t ExternControl; |
165 | UART_VersionInfo_t UART_VersionInfo; |
164 | UART_VersionInfo_t UART_VersionInfo; |
166 | NaviData_t NaviData; |
- | |
167 | Waypoint_t FollowMe; |
165 | NaviData_t NaviData; |
168 | Data3D_t Data3D; |
166 | Data3D_t Data3D; |
Line 169... | Line 167... | ||
169 | u16 Echo; // 2 bytes recieved will be sent back as echo |
167 | u16 Echo; // 2 bytes recieved will be sent back as echo |
170 | 168 | ||
Line 736... | Line 734... | ||
736 | else if(UART1_Request_ErrorMessage && (UART1_tx_buffer.Locked == FALSE)) |
734 | else if(UART1_Request_ErrorMessage && (UART1_tx_buffer.Locked == FALSE)) |
737 | { |
735 | { |
738 | MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'E', NC_ADDRESS, 1, (u8 *)&ErrorMSG, sizeof(ErrorMSG)); |
736 | MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'E', NC_ADDRESS, 1, (u8 *)&ErrorMSG, sizeof(ErrorMSG)); |
739 | UART1_Request_ErrorMessage = FALSE; |
737 | UART1_Request_ErrorMessage = FALSE; |
740 | } |
738 | } |
741 | else if(UART1_Request_SendFollowMe && (UART1_tx_buffer.Locked == FALSE) && (GPSData.NumOfSats >= 4)) // sending for "Follow me" |
- | |
742 | { |
- | |
743 | GPS_CopyPosition(&(GPSData.Position),&(FollowMe.Position)); |
- | |
744 | FollowMe.Position.Status = NEWDATA; |
- | |
745 | FollowMe.Heading = -1; |
- | |
746 | FollowMe.ToleranceRadius = 1; |
- | |
747 | FollowMe.HoldTime = 60; |
- | |
748 | FollowMe.Event_Flag = 0; |
- | |
749 | FollowMe.Index = 1; |
- | |
750 | FollowMe.reserve[0] = 0; // reserve |
- | |
751 | FollowMe.reserve[1] = 0; // reserve |
- | |
752 | FollowMe.reserve[2] = 0; // reserve |
- | |
753 | FollowMe.reserve[3] = 0; // reserve |
- | |
754 | MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 's', NC_ADDRESS, 1, (u8 *)&FollowMe, sizeof(FollowMe)); |
- | |
755 | UART1_Request_SendFollowMe = FALSE; |
- | |
756 | } |
- | |
757 | UART1_Transmit(); // output pending bytes in tx buffer |
739 | UART1_Transmit(); // output pending bytes in tx buffer |
758 | } |
740 | } |