Rev 436 | Rev 759 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 436 | Rev 744 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | DebugOut_t DebugOut; |
54 | DebugOut_t DebugOut; |
55 | UART_VersionInfo_t UART_VersionInfo; |
55 | UART_VersionInfo_t UART_VersionInfo; |
Line 56... | Line 56... | ||
56 | 56 | ||
57 | uint16_t DebugData_Timer; |
57 | uint16_t DebugData_Timer; |
- | 58 | uint16_t DebugData_Interval = 0; // in 1ms |
|
Line 58... | Line 59... | ||
58 | uint16_t DebugData_Interval = 0; // in 1ms |
59 | uint16_t Display_Interval = 0; // in 1 ms |
Line 59... | Line 60... | ||
59 | 60 | ||
60 | Waypoint_t FollowMe; |
61 | Waypoint_t FollowMe; |
Line 424... | Line 425... | ||
424 | PcAccess = 255; |
425 | PcAccess = 255; |
425 | break; |
426 | break; |
Line 426... | Line 427... | ||
426 | 427 | ||
427 | case 'h':// request for display columns |
428 | case 'h':// request for display columns |
- | 429 | PcAccess = 255; |
|
- | 430 | if((pRxData[0] & 0x80) == 0x00) // old format |
|
- | 431 | { |
|
- | 432 | DisplayLine = 2; |
|
- | 433 | Display_Interval = 0; |
|
- | 434 | } |
|
- | 435 | else // new format |
|
428 | PcAccess = 255; |
436 | { |
- | 437 | RemoteKeys |= ~pRxData[0]; |
|
429 | RemoteKeys |= pRxData[0]; |
438 | Display_Interval = (unsigned int)pRxData[1] * 10; |
430 | if(RemoteKeys) DisplayLine = 0; |
439 | DisplayLine = 4; |
- | 440 | Request_Display = TRUE; |
|
431 | Request_Display = TRUE; |
441 | } |
Line 432... | Line 442... | ||
432 | break; |
442 | break; |
433 | 443 | ||
434 | case 'l':// request for display columns |
444 | case 'l':// request for display columns |
Line 485... | Line 495... | ||
485 | if(Request_VerInfo && txd_complete) |
495 | if(Request_VerInfo && txd_complete) |
486 | { |
496 | { |
487 | SendOutData('V', FM_ADDRESS, 1, (uint8_t *) &UART_VersionInfo, sizeof(UART_VersionInfo)); |
497 | SendOutData('V', FM_ADDRESS, 1, (uint8_t *) &UART_VersionInfo, sizeof(UART_VersionInfo)); |
488 | Request_VerInfo = FALSE; |
498 | Request_VerInfo = FALSE; |
489 | } |
499 | } |
- | 500 | if( ((DebugData_Interval && CheckDelay(DebugData_Timer)) || Request_Display) && txd_complete) |
|
- | 501 | { |
|
490 | if(Request_Display && txd_complete) |
502 | if(DisplayLine > 3)// new format |
491 | { |
503 | { |
492 | LCD_PrintMenu(); |
504 | LCD_PrintMenu(); |
493 | SendOutData('H', FM_ADDRESS, 2, &DisplayLine, sizeof(DisplayLine), &DisplayBuff[DisplayLine * 20], 20); |
505 | SendOutData('H', FM_ADDRESS, 1, (uint8_t *)DisplayBuff, 80); |
- | 506 | } |
|
494 | DisplayLine++; |
507 | else // old format |
- | 508 | { |
|
- | 509 | LCD_printfxy(0,0,"!!! INCOMPATIBLE !!!"); |
|
- | 510 | SendOutData('H', FC_ADDRESS, 2, &DisplayLine, sizeof(DisplayLine), (uint8_t *)DisplayBuff, 20); |
|
495 | if(DisplayLine >= 4) DisplayLine = 0; |
511 | if(DisplayLine++ > 3) DisplayLine = 0; |
- | 512 | } |
|
496 | Request_Display = FALSE; |
513 | Request_Display = FALSE; |
497 | } |
514 | } |
498 | if(Request_Display1 && txd_complete) |
515 | if(Request_Display1 && txd_complete) |
499 | { |
516 | { |
500 | LCD_PrintMenu(); |
517 | LCD_PrintMenu(); |