Rev 64 | Rev 75 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 64 | Rev 65 | ||
---|---|---|---|
Line 531... | Line 531... | ||
531 | { |
531 | { |
532 | case 'e': // request for the text of the error status |
532 | case 'e': // request for the text of the error status |
533 | Request_ErrorMessage = TRUE; |
533 | Request_ErrorMessage = TRUE; |
534 | break; |
534 | break; |
Line 535... | Line -... | ||
535 | - | ||
536 | case 'o': // request for navigation information |
- | |
537 | NaviData_Interval = (u32) pRxData[0] * 10; |
- | |
538 | if(NaviData_Interval > 0) Request_NaviData = TRUE; |
- | |
539 | break; |
- | |
540 | 535 | ||
541 | case 's':// new target position |
536 | case 's':// new target position |
542 | pWaypoint = (Waypoint_t*)&pRxData[0]; |
537 | pWaypoint = (Waypoint_t*)&pRxData[0]; |
543 | BeepTime = 300; |
538 | BeepTime = 300; |
544 | if(pWaypoint->Position.Status == NEWDATA) |
539 | if(pWaypoint->Position.Status == NEWDATA) |
Line 590... | Line 585... | ||
590 | 585 | ||
591 | default: |
586 | default: |
592 | // unsupported command recieved |
587 | // unsupported command recieved |
593 | break; |
588 | break; |
594 | } // case NC_ADDRESS |
- | |
- | 589 | } // case NC_ADDRESS |
|
Line 595... | Line 590... | ||
595 | 590 | // "break;" is missing here to fall thru to the common commands |
|
Line 596... | Line 591... | ||
596 | 591 | ||
597 | default: // and any other Slave Address |
592 | default: // and any other Slave Address |
Line 738... | Line 733... | ||
738 | Request_VerInfo = FALSE; |
733 | Request_VerInfo = FALSE; |
739 | } |
734 | } |
740 | if(( (NaviData_Interval && CheckDelay(NaviData_Timer) ) || Request_NaviData) && txd_complete) |
735 | if(( (NaviData_Interval && CheckDelay(NaviData_Timer) ) || Request_NaviData) && txd_complete) |
741 | { |
736 | { |
742 | NaviData.Errorcode = ErrorCode; |
737 | NaviData.Errorcode = ErrorCode; |
743 | SendOutData('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
738 | SendOutData('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
744 | if (DebugUART == UART1) SendOutData0('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
739 | if (DebugUART == UART1) SendOutData0('O', NC_ADDRESS,1, (u8 *)&NaviData, sizeof(NaviData)); |
745 | NaviData_Timer = SetDelay(NaviData_Interval); |
740 | NaviData_Timer = SetDelay(NaviData_Interval); |
746 | Request_NaviData = FALSE; |
741 | Request_NaviData = FALSE; |
747 | } |
742 | } |
748 | if(Request_ErrorMessage && txd_complete) |
743 | if(Request_ErrorMessage && txd_complete) |
749 | { |
744 | { |
Line 767... | Line 762... | ||
767 | } |
762 | } |
Line 768... | Line 763... | ||
768 | 763 | ||
769 | if(Request_NewWaypoint && txd_complete) |
764 | if(Request_NewWaypoint && txd_complete) |
770 | { |
765 | { |
771 | u8 WPNumber = WPList_GetCount(); |
766 | u8 WPNumber = WPList_GetCount(); |
772 | SendOutData('W', NC_ADDRESS, 1, &WPNumber, sizeof(WPNumber)); |
767 | SendOutData('W', NC_ADDRESS, 1, &WPNumber, sizeof(WPNumber)); |
773 | Request_NewWaypoint = FALSE; |
768 | Request_NewWaypoint = FALSE; |
Line 774... | Line 769... | ||
774 | } |
769 | } |