Subversion Repositories NaviCtrl

Rev

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

Rev 492 Rev 494
Line 100... Line 100...
100
u8 UART1_Request_ReadPoint              = 0;
100
u8 UART1_Request_ReadPoint              = 0;
101
u8 UART1_Request_Data3D             = FALSE;
101
u8 UART1_Request_Data3D             = FALSE;
102
u8 UART1_Request_MotorData          = FALSE;
102
u8 UART1_Request_MotorData          = FALSE;
103
u8 UART1_Request_Echo               = FALSE;
103
u8 UART1_Request_Echo               = FALSE;
104
u8 UART1_Request_ParameterId    = 0;
104
u8 UART1_Request_ParameterId    = 0;
-
 
105
u8 UART1_Request_WPLStore               = FALSE;
105
u8 UART1_Request_Parameter              = FALSE;
106
u8 UART1_Request_Parameter              = FALSE;
106
u8 UART1_Request_SystemTime             = FALSE;
107
u8 UART1_Request_SystemTime             = FALSE;
107
u8 UART1_DisplayKeys                    = 0;
108
u8 UART1_DisplayKeys                    = 0;
108
u8 UART1_DisplayLine                    = 0;
109
u8 UART1_DisplayLine                    = 0;
109
u8 UART1_ConfirmFrame                   = 0;
110
u8 UART1_ConfirmFrame                   = 0;
Line 179... Line 180...
179
DebugOut_t DebugOut;
180
DebugOut_t DebugOut;
180
ExternControl_t ExternControl;
181
ExternControl_t ExternControl;
181
UART_VersionInfo_t UART_VersionInfo;
182
UART_VersionInfo_t UART_VersionInfo;
182
NaviData_t NaviData;
183
NaviData_t NaviData;
183
Data3D_t Data3D;
184
Data3D_t Data3D;
-
 
185
WPL_Store_t WPL_Store;
184
u16 Echo; // 2 bytes recieved will be sent back as echo
186
u16 Echo; // 2 bytes recieved will be sent back as echo
Line 185... Line 187...
185
 
187
 
186
u32 UART1_DebugData_Timer = 0;
188
u32 UART1_DebugData_Timer = 0;
187
u32 UART1_DebugData_Interval = 0;       // in ms
189
u32 UART1_DebugData_Interval = 0;       // in ms
Line 513... Line 515...
513
 
515
 
514
                        case 'x'://  Read Waypoint from List
516
                        case 'x'://  Read Waypoint from List
515
                                UART1_Request_ReadPoint = SerialMsg.pData[0];
517
                                UART1_Request_ReadPoint = SerialMsg.pData[0];
Line -... Line 518...
-
 
518
                                break;
-
 
519
 
-
 
520
                        case 'i':// Store WP List to file
-
 
521
                                {
-
 
522
                                        memcpy((u8*)&WPL_Store, SerialMsg.pData, sizeof(WPL_Store));
-
 
523
                                        WPL_Store.Name[11] = 0; // make sure the string is terminated
-
 
524
                                        WPL_Store.reserved[0] = 0;
-
 
525
                                        if(WPL_Store.Index != 0)
-
 
526
                                        {
-
 
527
                                                if(WPL_Store.Type == WPL_STORE_TYPE_REL)
-
 
528
                                                {
-
 
529
                                                        if(PointList_Move(1, &(GPSData.Position)))
-
 
530
                                                        {
-
 
531
                                                                WPL_Store.reserved[0] = PointList_SaveToFile(WPL_Store.Index, WPL_Store.Name);
-
 
532
                                                        }
-
 
533
                                                }
-
 
534
                                                else
-
 
535
                                                {
-
 
536
                                                        WPL_Store.reserved[0] = PointList_SaveToFile(WPL_Store.Index, WPL_Store.Name);
-
 
537
                                                }      
-
 
538
                                        }
-
 
539
                                        UART1_Request_WPLStore = TRUE;
-
 
540
                                }
-
 
541
                                break;
516
                                break;
542
 
517
 
543
 
518
                        case 'j':// Set/Get NC-Parameter
544
                        case 'j':// Set/Get NC-Parameter
519
                                switch(SerialMsg.pData[0])
545
                                switch(SerialMsg.pData[0])
520
                                {
546
                                {
Line 1012... Line 1038...
1012
 
1038
 
1013
                MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'K', NC_ADDRESS, 2, &motorindex1, sizeof(motorindex1),(u8 *)&Motor[motorindex1], sizeof(Motor_t));
1039
                MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'K', NC_ADDRESS, 2, &motorindex1, sizeof(motorindex1),(u8 *)&Motor[motorindex1], sizeof(Motor_t));
1014
            UART1_MotorData_Timer = SetDelay(UART1_MotorData_Interval);
1040
            UART1_MotorData_Timer = SetDelay(UART1_MotorData_Interval);
1015
                UART1_Request_MotorData = FALSE;
1041
                UART1_Request_MotorData = FALSE;
-
 
1042
        }
-
 
1043
        else if(UART1_Request_WPLStore)
-
 
1044
        {
-
 
1045
                MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'I', NC_ADDRESS, 2,(u8 *)&(WPL_Store.Index), 1, (u8 *)&(WPL_Store.reserved[0]), 1 );
-
 
1046
                UART1_Request_WPLStore = FALSE;                
1016
        }
1047
        }
1017
        else if((((NMEA_Interval > 0) && CheckDelay(NMEA_Timer))) && (UART1_tx_buffer.Locked == FALSE))
1048
        else if((((NMEA_Interval > 0) && CheckDelay(NMEA_Timer))) && (UART1_tx_buffer.Locked == FALSE))
1018
        {
1049
        {
1019
                CreateNmeaGGA();
1050
                CreateNmeaGGA();
1020
                Send_NMEA_RMC = TRUE;   // das muss noch da hinter
1051
                Send_NMEA_RMC = TRUE;   // das muss noch da hinter