402,13 → 402,47 |
|
case 's':// new target position |
pPoint = (Point_t*)SerialMsg.pData; |
BeepTime = 300; |
if(pPoint->Position.Status == NEWDATA) |
{ |
PointList_Clear(); // empty List |
pPoint->Index = 1; // must be one after empty list |
PointList_Append(pPoint); |
GPS_pWaypoint = PointList_WPBegin(); |
if(pPoint->Type == POINT_TYPE_POI) |
{ |
PointList_Clear(); // empty List |
pPoint->Index = 1; // must be one after empty list |
POICount = 0; |
PointList_Append(pPoint); |
PointCount = 2; |
BeepTime = 50; |
} |
else |
if(pPoint->Type == POINT_TYPE_WP) |
{ |
PointList_Clear(); // empty List |
PointCount = 1; |
pPoint->Index = 2; // No. 1 could be the POI |
WPCount = 0; |
PointList_Append(pPoint); |
PointCount = 2; |
BeepTime = 50; |
GPS_pWaypoint = PointList_WPBegin(); |
} |
else |
if(pPoint->Type == POINT_TYPE_BOTH) |
{ |
PointList_Clear(); // empty List |
pPoint->Index = 1; |
pPoint->Type = POINT_TYPE_POI; |
PointList_Append(pPoint); |
pPoint->Index = 2; |
pPoint->Type = POINT_TYPE_WP; |
PointList_Append(pPoint); |
BeepTime = 50; |
GPS_pWaypoint = PointList_WPBegin(); |
} |
else |
{ |
PointList_Clear(); // empty List |
GPS_pWaypoint = PointList_WPBegin(); |
} |
} |
break; |
|