Rev 54 | Rev 62 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 54 | Rev 61 | ||
---|---|---|---|
Line 90... | Line 90... | ||
90 | u8 Request_DebugLabel = 255; |
90 | u8 Request_DebugLabel = 255; |
91 | u8 Request_ChannelOnly = FALSE; |
91 | u8 Request_ChannelOnly = FALSE; |
92 | u8 Request_NaviData = FALSE; |
92 | u8 Request_NaviData = FALSE; |
93 | u8 Request_ErrorMessage = FALSE; |
93 | u8 Request_ErrorMessage = FALSE; |
94 | u8 Request_NewWaypoint = FALSE; |
94 | u8 Request_NewWaypoint = FALSE; |
- | 95 | u8 Request_3DData = FALSE; |
|
Line 95... | Line 96... | ||
95 | 96 | ||
Line 96... | Line 97... | ||
96 | u8 DisplayLine = 0; |
97 | u8 DisplayLine = 0; |
Line 115... | Line 116... | ||
115 | DebugOut_t DebugOut; |
116 | DebugOut_t DebugOut; |
116 | ExternControl_t ExternControl; |
117 | ExternControl_t ExternControl; |
117 | UART_VersionInfo_t UART_VersionInfo; |
118 | UART_VersionInfo_t UART_VersionInfo; |
118 | NaviData_t NaviData; |
119 | NaviData_t NaviData; |
119 | Waypoint_t FollowMe; |
120 | Waypoint_t FollowMe; |
- | 121 | Data3D_t Data3D; |
|
Line 120... | Line 122... | ||
120 | 122 | ||
121 | u32 DebugData_Timer; |
123 | u32 DebugData_Timer; |
122 | u32 DebugData_Interval = 1000; // in ms |
124 | u32 DebugData_Interval = 1000; // in ms |
123 | u32 NaviData_Timer; |
125 | u32 NaviData_Timer; |
124 | u32 NaviData_Interval = 1000; // in ms |
- | |
125 | - | ||
- | 126 | u32 NaviData_Interval = 1000; // in ms |
|
- | 127 | u32 Data3D_Timer = 0; |
|
Line 126... | Line 128... | ||
126 | 128 | u32 Intervall3D = 0; |
|
Line 127... | Line 129... | ||
127 | 129 | ||
128 | static u16 ptr_txd_buffer = 0; |
130 | static u16 ptr_txd_buffer = 0; |
Line 137... | Line 139... | ||
137 | " ", |
139 | " ", |
138 | " ", //5 |
140 | " ", //5 |
139 | " ", |
141 | " ", |
140 | " ", |
142 | " ", |
141 | " ", |
143 | " ", |
142 | " ", |
- | |
143 | " ", //10 |
- | |
144 | "GPS Data ", |
144 | "GPS Data ", |
- | 145 | "CompassHeading ", //10 |
|
- | 146 | "GyroHeading ", |
|
145 | "SPI Error ", |
147 | "SPI Error ", |
146 | "SPI Okay ", |
148 | "SPI Okay ", |
147 | "I2C Error ", |
149 | "I2C Error ", |
148 | "I2C Okay ", //15 |
150 | "I2C Okay ", //15 |
149 | " ",// "FC_Kalman_K ", |
151 | " ",// "FC_Kalman_K ", |
Line 153... | Line 155... | ||
153 | " ",// "MAXDrift ", //20 |
155 | " ",// "MAXDrift ", //20 |
154 | "N_Speed ", |
156 | "N_Speed ", |
155 | "E_Speed ", |
157 | "E_Speed ", |
156 | " ",// "KalmDist_N ", |
158 | " ",// "KalmDist_N ", |
157 | " ",// "KalmDist_E ", |
159 | " ",// "KalmDist_E ", |
158 | "GyroHeading ",//25 |
160 | " ",//25 |
159 | "CompassHeading ", |
161 | " ", |
160 | "Distance N ", |
162 | "Distance N ", |
161 | "Distance E ", |
163 | "Distance E ", |
162 | "GPS_Nick ", |
164 | "GPS_Nick ", |
163 | "GPS_Roll ", //30 |
165 | "GPS_Roll ", //30 |
164 | "Used_Sats " |
166 | "Used_Sats " |
Line 604... | Line 606... | ||
604 | case 'b': // submit extern control |
606 | case 'b': // submit extern control |
605 | memcpy(&ExternControl, (u8*)&pRxData[0], sizeof(ExternControl)); |
607 | memcpy(&ExternControl, (u8*)&pRxData[0], sizeof(ExternControl)); |
606 | ConfirmFrame = ExternControl.Frame; |
608 | ConfirmFrame = ExternControl.Frame; |
607 | break; |
609 | break; |
Line -... | Line 610... | ||
- | 610 | ||
- | 611 | case 'c': // request for debug data; |
|
- | 612 | Intervall3D = (u32) pRxData[0] * 10; |
|
- | 613 | if(Intervall3D > 0) Request_3DData = TRUE; |
|
- | 614 | break; |
|
608 | 615 | ||
609 | case 'd': // request for debug data; |
616 | case 'd': // request for debug data; |
610 | DebugData_Interval = (u32) pRxData[0] * 10; |
617 | DebugData_Interval = (u32) pRxData[0] * 10; |
611 | if(DebugData_Interval > 0) Request_DebugData = TRUE; |
618 | if(DebugData_Interval > 0) Request_DebugData = TRUE; |
Line 690... | Line 697... | ||
690 | { |
697 | { |
691 | SendOutData('D', NC_ADDRESS, 1,(u8 *)&DebugOut, sizeof(DebugOut)); |
698 | SendOutData('D', NC_ADDRESS, 1,(u8 *)&DebugOut, sizeof(DebugOut)); |
692 | DebugData_Timer = SetDelay(DebugData_Interval); |
699 | DebugData_Timer = SetDelay(DebugData_Interval); |
693 | Request_DebugData = FALSE; |
700 | Request_DebugData = FALSE; |
694 | } |
701 | } |
- | 702 | ||
- | 703 | if(((Intervall3D>0 && CheckDelay(Data3D_Timer)) || Request_3DData) && txd_complete) |
|
- | 704 | { |
|
- | 705 | SendOutData('C', NC_ADDRESS, 1,(u8 *)&Data3D, sizeof(Data3D)); |
|
- | 706 | Data3D_Timer = SetDelay(Intervall3D); |
|
- | 707 | Request_3DData = FALSE; |
|
- | 708 | } |
|
- | 709 | ||
695 | if(Request_ExternalControl && txd_complete) |
710 | if(Request_ExternalControl && txd_complete) |
696 | { |
711 | { |
697 | SendOutData('G', NC_ADDRESS, 1, (u8 *)&ExternControl, sizeof(ExternControl)); |
712 | SendOutData('G', NC_ADDRESS, 1, (u8 *)&ExternControl, sizeof(ExternControl)); |
698 | Request_ExternalControl = FALSE; |
713 | Request_ExternalControl = FALSE; |
699 | } |
714 | } |