Subversion Repositories NaviCtrl

Rev

Rev 200 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 200 Rev 201
Line 59... Line 59...
59
#include <string.h>
59
#include <string.h>
Line 60... Line 60...
60
 
60
 
61
#include "91x_lib.h"
61
#include "91x_lib.h"
62
#include "config.h"
62
#include "config.h"
63
#include "menu.h"
-
 
64
#include "printf_P.h"
63
#include "menu.h"
65
#include "GPS.h"
64
#include "GPS.h"
66
#include "i2c.h"
65
#include "i2c.h"
67
#include "uart0.h"
66
#include "uart0.h"
68
#include "uart1.h"
67
#include "uart1.h"
Line 95... Line 94...
95
u8 UART1_Request_ReadWaypoint   = 255;
94
u8 UART1_Request_ReadWaypoint   = 255;
96
u8 UART1_Request_Data3D             = FALSE;
95
u8 UART1_Request_Data3D             = FALSE;
97
u8 UART1_Request_Echo               = FALSE;
96
u8 UART1_Request_Echo               = FALSE;
98
u8 UART1_Request_ParameterId    = 0;
97
u8 UART1_Request_ParameterId    = 0;
99
u8 UART1_Request_Parameter              = FALSE;
98
u8 UART1_Request_Parameter              = FALSE;
-
 
99
u8 UART1_DisplayKeys                    = 0;
100
u8 UART1_DisplayLine                    = 0;
100
u8 UART1_DisplayLine                    = 0;
101
u8 UART1_ConfirmFrame                   = 0;
101
u8 UART1_ConfirmFrame                   = 0;
Line 102... Line 102...
102
 
102
 
Line 173... Line 173...
173
u32 UART1_NaviData_Timer = 0;
173
u32 UART1_NaviData_Timer = 0;
174
u32 UART1_NaviData_Interval = 0;        // in ms
174
u32 UART1_NaviData_Interval = 0;        // in ms
175
u32 UART1_Data3D_Timer = 0;
175
u32 UART1_Data3D_Timer = 0;
176
u32 UART1_Data3D_Interval = 0;          // in ms
176
u32 UART1_Data3D_Interval = 0;          // in ms
177
u32 UART1_Display_Timer = 0;
177
u32 UART1_Display_Timer = 0;
178
u32 UART1_Display_Interval = 0;
178
u32 UART1_Display_Interval = 0;         // in ms
Line 179... Line 179...
179
 
179
 
180
/********************************************************/
180
/********************************************************/
181
/*            Initialization the UART1                  */
181
/*            Initialization the UART1                  */
182
/********************************************************/
182
/********************************************************/
Line 528... Line 528...
528
                                        UART1_DisplayLine = 2;
528
                                        UART1_DisplayLine = 2;
529
                                        UART1_Display_Interval = 0;
529
                                        UART1_Display_Interval = 0;
530
                                }
530
                                }
531
                                else
531
                                else
532
                                {
532
                                {
533
                                        RemoteKeys |= ~SerialMsg.pData[0];
533
                                        UART1_DisplayKeys |= ~SerialMsg.pData[0];
534
                                        UART1_Display_Interval = (u32) SerialMsg.pData[1] * 10;
534
                                        UART1_Display_Interval = (u32) SerialMsg.pData[1] * 10;
535
                                        UART1_DisplayLine = 4;
535
                                        UART1_DisplayLine = 4;
536
                                        UART1_AboTimeOut = SetDelay(ABO_TIMEOUT);
536
                                        UART1_AboTimeOut = SetDelay(ABO_TIMEOUT);
537
                                }
537
                                }
538
                                UART1_Request_Display = TRUE;
538
                                UART1_Request_Display = TRUE;
Line 706... Line 706...
706
        */
706
        */
707
        else if( (( (UART1_Display_Interval > 0) && CheckDelay(UART1_Display_Timer)) || UART1_Request_Display) && (UART1_tx_buffer.Locked == FALSE))
707
        else if( (( (UART1_Display_Interval > 0) && CheckDelay(UART1_Display_Timer)) || UART1_Request_Display) && (UART1_tx_buffer.Locked == FALSE))
708
        {
708
        {
709
                if(UART1_DisplayLine > 3)
709
                if(UART1_DisplayLine > 3)
710
                {
710
                {
-
 
711
                        Menu_Update(UART1_DisplayKeys);
711
                        LCD_PrintMenu();
712
                        UART1_DisplayKeys = 0;
712
                        MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'H', NC_ADDRESS, 1, (u8*)DisplayBuff, sizeof(DisplayBuff));
713
                        MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'H', NC_ADDRESS, 1, (u8*)DisplayBuff, sizeof(DisplayBuff));
713
                }
714
                }
714
                else
715
                else
715
                {
716
                {
716
                        UART1_DisplayLine = 2;
717
                        UART1_DisplayLine = 2;
Line 721... Line 722...
721
                UART1_Display_Timer = SetDelay(UART1_Display_Interval);
722
                UART1_Display_Timer = SetDelay(UART1_Display_Interval);
722
                UART1_Request_Display = FALSE;
723
                UART1_Request_Display = FALSE;
723
        }
724
        }
724
        else if(UART1_Request_Display1 && (UART1_tx_buffer.Locked == FALSE))
725
        else if(UART1_Request_Display1 && (UART1_tx_buffer.Locked == FALSE))
725
        {
726
        {
726
                LCD_PrintMenu();
727
                Menu_Update(0);
727
                MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'L', NC_ADDRESS, 3, (u8*)&MenuItem, sizeof(MenuItem), (u8*)&MaxMenuItem, sizeof(MaxMenuItem),(u8*)DisplayBuff, sizeof(DisplayBuff));
728
                MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'L', NC_ADDRESS, 3, (u8*)&MenuItem, sizeof(MenuItem), (u8*)&MaxMenuItem, sizeof(MaxMenuItem),(u8*)DisplayBuff, sizeof(DisplayBuff));
728
                UART1_Request_Display1 = FALSE;
729
                UART1_Request_Display1 = FALSE;
729
        }
730
        }
730
        else if(UART1_Request_VersionInfo && (UART1_tx_buffer.Locked == FALSE))
731
        else if(UART1_Request_VersionInfo && (UART1_tx_buffer.Locked == FALSE))
731
        {
732
        {