Rev 49 | Rev 61 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 49 | Rev 54 | ||
---|---|---|---|
Line 117... | Line 117... | ||
117 | UART_VersionInfo_t UART_VersionInfo; |
117 | UART_VersionInfo_t UART_VersionInfo; |
118 | NaviData_t NaviData; |
118 | NaviData_t NaviData; |
119 | Waypoint_t FollowMe; |
119 | Waypoint_t FollowMe; |
Line 120... | Line 120... | ||
120 | 120 | ||
121 | u32 DebugData_Timer; |
121 | u32 DebugData_Timer; |
122 | u32 DebugData_Interval = 1000; // in 1ms |
122 | u32 DebugData_Interval = 1000; // in ms |
123 | u32 NaviData_Timer; |
123 | u32 NaviData_Timer; |
Line 124... | Line 124... | ||
124 | u32 NaviData_Interval = 100; // in 1ms |
124 | u32 NaviData_Interval = 1000; // in ms |
Line 222... | Line 222... | ||
222 | VIC_Config(UART1_ITLine, VIC_IRQ, 4); |
222 | VIC_Config(UART1_ITLine, VIC_IRQ, 4); |
223 | // enable the uart 1 IRQ |
223 | // enable the uart 1 IRQ |
224 | VIC_ITCmd(UART1_ITLine, ENABLE); |
224 | VIC_ITCmd(UART1_ITLine, ENABLE); |
225 | // initialize the debug timer |
225 | // initialize the debug timer |
226 | DebugData_Timer = SetDelay(DebugData_Interval); |
226 | DebugData_Timer = SetDelay(DebugData_Interval); |
227 | NaviData_Timer = SetDelay(NaviData_Interval+500); |
227 | NaviData_Timer = SetDelay(NaviData_Interval)+500; |
228 | // unlock rxd_buffer |
228 | // unlock rxd_buffer |
229 | rxd_buffer_locked = FALSE; |
229 | rxd_buffer_locked = FALSE; |
230 | pRxData = NULL; |
230 | pRxData = NULL; |
231 | RxDataLen = 0; |
231 | RxDataLen = 0; |
232 | // no bytes to send |
232 | // no bytes to send |
Line 717... | Line 717... | ||
717 | Request_VerInfo = FALSE; |
717 | Request_VerInfo = FALSE; |
718 | } |
718 | } |
719 | if(( (NaviData_Interval && CheckDelay(NaviData_Timer) ) || Request_NaviData) && txd_complete) |
719 | if(( (NaviData_Interval && CheckDelay(NaviData_Timer) ) || Request_NaviData) && txd_complete) |
720 | { |
720 | { |
721 | NaviData.Errorcode = ErrorCode; |
721 | NaviData.Errorcode = ErrorCode; |
722 | SendOutData('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
722 | SendOutData('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
723 | #ifdef SEND_MKOSD_DATA |
- | |
724 | if (DebugUART == UART1) SendOutData0('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
723 | if (DebugUART == UART1) SendOutData0('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
725 | #endif |
- | |
726 | NaviData_Timer = SetDelay(NaviData_Interval); |
724 | NaviData_Timer = SetDelay(NaviData_Interval); |
727 | Request_NaviData = FALSE; |
725 | Request_NaviData = FALSE; |
728 | } |
726 | } |
729 | if(Request_ErrorMessage && txd_complete) |
727 | if(Request_ErrorMessage && txd_complete) |
730 | { |
728 | { |