Subversion Repositories NaviCtrl

Rev

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

Rev 495 Rev 496
Line 187... Line 187...
187
DebugOut_t DebugOut;
187
DebugOut_t DebugOut;
188
ExternControl_t ExternControl;
188
ExternControl_t ExternControl;
189
UART_VersionInfo_t UART_VersionInfo;
189
UART_VersionInfo_t UART_VersionInfo;
190
NaviData_t NaviData;
190
NaviData_t NaviData;
191
Data3D_t Data3D;
191
Data3D_t Data3D;
192
WPL_Store_t WPL_Store;
-
 
-
 
192
 
193
u16 Echo; // 2 bytes recieved will be sent back as echo
193
u16 Echo; // 2 bytes recieved will be sent back as echo
Line 194... Line 194...
194
 
194
 
195
u32 UART1_DebugData_Timer = 0;
195
u32 UART1_DebugData_Timer = 0;
196
u32 UART1_DebugData_Interval = 0;       // in ms
196
u32 UART1_DebugData_Interval = 0;       // in ms
Line 523... Line 523...
523
                        case 'x'://  Read Waypoint from List
523
                        case 'x'://  Read Waypoint from List
524
                                UART1_Request_ReadPoint = SerialMsg.pData[0];
524
                                UART1_Request_ReadPoint = SerialMsg.pData[0];
525
                                break;
525
                                break;
Line 526... Line 526...
526
 
526
 
527
                        case 'i':// Store WP List to file
-
 
528
 
527
                        case 'i':// Store WP List to file
529
                                memcpy((u8*)&WPL_Store, SerialMsg.pData, sizeof(WPL_Store));
528
                                memcpy((u8*)&WPL_Store, SerialMsg.pData, sizeof(WPL_Store_t));
530
                                WPL_Store.Name[11] = 0; // make sure the string is terminated
-
 
531
 
529
                                WPL_Store.Name[11] = 0; // make sure the name string is terminated
532
                                WPL_Answer.Index = WPL_Store.Index; // echo Index
-
 
533
                                WPL_Answer.Status = WPL_ERROR; // set bad state by default
-
 
534
 
-
 
535
                                if(WPL_Store.Index != 0) // valid index
-
 
536
                                {
-
 
537
                                        if(WPL_Store.Type == WPL_STORE_TYPE_REL)
-
 
538
                                        {
-
 
539
                                                if(PointList_Move(1, &(NaviData.HomePosition)))
-
 
540
                                                {      
-
 
541
                                                        WPL_Answer.Status = PointList_SaveToFile(&WPL_Store);
-
 
542
                                                }
-
 
543
                                        }
-
 
544
                                        else
-
 
545
                                        {
530
                                WPL_Answer.Index = WPL_Store.Index; // echo Index
546
                                                WPL_Answer.Status = PointList_SaveToFile(&WPL_Store);
-
 
547
                                        }      
-
 
548
                                }
531
                                WPL_Answer.Status = PointList_SaveToFile(&WPL_Store);
549
                                UART1_Request_WPLStore = TRUE;
-
 
550
 
532
                                UART1_Request_WPLStore = TRUE;
Line 551... Line 533...
551
                                break;
533
                                break;
552
 
534