Subversion Repositories NaviCtrl

Rev

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

Rev 776 Rev 784
Line 525... Line 525...
525
 
525
 
526
                        case 's'://  new target position
526
                        case 's'://  new target position
527
                                pPoint = (Point_t*)SerialMsg.pData;
527
                                pPoint = (Point_t*)SerialMsg.pData;
528
                                if(pPoint->Position.Status == NEWDATA)
528
                                if(pPoint->Position.Status == NEWDATA)
-
 
529
                                {
529
                                {
530
                                        u32 start = 0;
530
                                        //if(!(FC.StatusFlags & FC_STATUS_FLY)) PointList_Clear(); // flush the list
531
                                        //if(!(FC.StatusFlags & FC_STATUS_FLY)) PointList_Clear(); // flush the list
531
                                        //pPoint->Index = 1; // must be one after empty list
532
                                        //pPoint->Index = 1; // must be one after empty list
532
                                        PointList_SetAt(pPoint);
533
                                        PointList_SetAt(pPoint);
533
                                        if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE);
534
                                        if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE);
534
//                                      GPS_pWaypoint = PointList_WPBegin(); // updates POI index
-
 
-
 
535
//                                      GPS_pWaypoint = PointList_WPBegin(); // updates POI index
Line 535... Line 536...
535
 
536
if(pPoint->Index) start = pPoint->Index-1;
536
 
537
 
537
if(CurrentlyFlyingWaypoints)
538
if(CurrentlyFlyingWaypoints)
538
 {
539
 {
539
  GPS_pWaypoint = PointList_WPBegin();  
540
  GPS_pWaypoint = PointList_WPBegin(start);    
540
  NewWaypointsReceived = 0;                     // Only an update 
541
  NewWaypointsReceived = 0;                     // Only an update 
541
 }
542
 }
542
                                        BeepTime = 50;
543
                                        BeepTime = 50;
Line 600... Line 601...
600
                                        pPoint = (Point_t*)SerialMsg.pData;
601
                                        pPoint = (Point_t*)SerialMsg.pData;
601
                                        UART1_AboTimeOut = SetDelay(ABO_TIMEOUT);
602
                                        UART1_AboTimeOut = SetDelay(ABO_TIMEOUT);
602
                                        if((pPoint->Position.Status == INVALID) && (pPoint->Index == 0))
603
                                        if((pPoint->Position.Status == INVALID) && (pPoint->Index == 0))
603
                                        {
604
                                        {
604
                                                PointList_Clear();
605
                                                PointList_Clear();
605
                                                GPS_pWaypoint = PointList_WPBegin();
606
                                                GPS_pWaypoint = PointList_WPBegin(0);
606
                                                UART1_Request_WritePoint = 0; // return new point count
607
                                                UART1_Request_WritePoint = 0; // return new point count
607
                                                NewWaypointsReceived = 1;
608
                                                NewWaypointsReceived = 1;
608
                                        }
609
                                        }
609
                                        else
610
                                        else
610
                                        {  // update WP in list at index
611
                                        {  // update WP in list at index