Rev 489 | Rev 491 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 489 | Rev 490 | ||
---|---|---|---|
Line 488... | Line 488... | ||
488 | { |
488 | { |
489 | pPoint = (Point_t*)SerialMsg.pData; |
489 | pPoint = (Point_t*)SerialMsg.pData; |
Line 490... | Line 490... | ||
490 | 490 | ||
491 | if((pPoint->Position.Status == INVALID) && (pPoint->Index == 0)) |
491 | if((pPoint->Position.Status == INVALID) && (pPoint->Index == 0)) |
- | 492 | { |
|
492 | { |
493 | //PointList_SaveToFile(1); // save to file before clearing the list |
493 | PointList_Clear(); |
494 | PointList_Clear(); |
494 | GPS_pWaypoint = PointList_WPBegin(); |
495 | GPS_pWaypoint = PointList_WPBegin(); |
495 | UART1_Request_WritePoint = 0; // return new point count |
496 | UART1_Request_WritePoint = 0; // return new point count |
496 | } |
497 | } |
497 | else |
498 | else |
498 | { // update WP in list at index |
499 | { // update WP in list at index |
499 | if(pPoint->Index > MaxNumberOfWaypoints) |
500 | if(pPoint->Index > MaxNumberOfWaypoints) |
500 | { |
501 | { |
501 | UART1_Request_WritePoint = 254; |
502 | UART1_Request_WritePoint = 254; |
502 | pPoint->Index = MaxNumberOfWaypoints; |
503 | pPoint->Index = MaxNumberOfWaypoints; |
503 | } |
- | |
504 | else |
504 | } |
505 | UART1_Request_WritePoint = PointList_SetAt(pPoint); |
505 | else UART1_Request_WritePoint = PointList_SetAt(pPoint); |
506 | if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE); |
506 | if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE); |
507 | if(UART1_Request_WritePoint == pPoint->Index) |
507 | if(UART1_Request_WritePoint == pPoint->Index) |
508 | { |
508 | { |
509 | BeepTime = 500; |
509 | BeepTime = 500; |