Rev 171 | Rev 196 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 171 | Rev 190 | ||
---|---|---|---|
Line 161... | Line 161... | ||
161 | SerialMsg_t SerialMsg; |
161 | SerialMsg_t SerialMsg; |
162 | Waypoint_t * pWaypoint = NULL; |
162 | Waypoint_t * pWaypoint = NULL; |
163 | // if data in the rxd buffer are not locked immediately return |
163 | // if data in the rxd buffer are not locked immediately return |
164 | if((USB_rx_buffer.Locked == FALSE) || (DebugUART != UART1) ) return; |
164 | if((USB_rx_buffer.Locked == FALSE) || (DebugUART != UART1) ) return; |
Line -... | Line 165... | ||
- | 165 | ||
165 | 166 | MKProtocol_DecodeSerialFrameHeader(&USB_rx_buffer, &SerialMsg); // decode serial frame in rxd buffer |
|
Line 166... | Line 167... | ||
166 | MKProtocol_DecodeSerialFrame(&USB_rx_buffer, &SerialMsg); // decode serial frame in rxd buffer |
167 | MKProtocol_DecodeSerialFrameData(&USB_rx_buffer, &SerialMsg); // decode serial frame in rxd buffer |
167 | 168 | ||
168 | if(*SerialMsg.pCmdID != 'z') SerialLinkOkay = 250; // reset SerialTimeout, but not in case of the "ping" |
169 | if(SerialMsg.CmdID != 'z') SerialLinkOkay = 250; // reset SerialTimeout, but not in case of the "ping" |
169 | switch(*SerialMsg.pAddress) // check for Slave Address |
170 | switch(SerialMsg.Address) // check for Slave Address |
170 | { |
171 | { |
171 | case NC_ADDRESS: // own Slave Address |
172 | case NC_ADDRESS: // own Slave Address |
172 | switch(*SerialMsg.pCmdID) |
173 | switch(SerialMsg.CmdID) |
173 | { |
174 | { |
174 | case 'e': // request for the text of the error status |
175 | case 'e': // request for the text of the error status |
Line 235... | Line 236... | ||
235 | } // case NC_ADDRESS |
236 | } // case NC_ADDRESS |
236 | // "break;" is missing here to fall thru to the common commands |
237 | // "break;" is missing here to fall thru to the common commands |
Line 237... | Line 238... | ||
237 | 238 | ||
Line 238... | Line 239... | ||
238 | default: // and any other Slave Address |
239 | default: // and any other Slave Address |
239 | 240 | ||
240 | switch(*SerialMsg.pCmdID) // check CmdID |
241 | switch(SerialMsg.CmdID) // check CmdID |
241 | { |
242 | { |
242 | case 'a':// request for the labels of the analog debug outputs |
243 | case 'a':// request for the labels of the analog debug outputs |
243 | USB_Request_DebugLabel = SerialMsg.pData[0]; |
244 | USB_Request_DebugLabel = SerialMsg.pData[0]; |