Rev 151 | Rev 171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 151 | Rev 152 | ||
---|---|---|---|
Line 115... | Line 115... | ||
115 | // rewind to the begin of the list, and returns the first waypoint |
115 | // rewind to the begin of the list, and returns the first waypoint |
116 | Waypoint_t* WPList_Begin(void) |
116 | Waypoint_t* WPList_Begin(void) |
117 | { |
117 | { |
118 | WPIndex = 0; // reset list index |
118 | WPIndex = 0; // reset list index |
119 | NaviData.WaypointIndex = WPIndex + 1; |
119 | NaviData.WaypointIndex = WPIndex + 1; |
- | 120 | if(WPNumber > 0) |
|
- | 121 | { |
|
- | 122 | NaviData.WaypointIndex = WPIndex + 1; |
|
120 | if(WPNumber > 0) return(&(WPList[WPIndex])); // if list is not empty return pointer to first waypoint in the list |
123 | return(&(WPList[WPIndex])); // if list is not empty return pointer to first waypoint in the list |
- | 124 | } |
|
- | 125 | else |
|
- | 126 | { |
|
- | 127 | NaviData.WaypointIndex = 0; |
|
121 | else return NULL; // else return NULL |
128 | return NULL; // else return NULL |
- | 129 | } |
|
Line 122... | Line 130... | ||
122 | 130 | ||
Line 123... | Line 131... | ||
123 | } |
131 | } |
124 | 132 |