Rev 41 | Rev 151 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 41 | Rev 92 | ||
---|---|---|---|
Line 78... | Line 78... | ||
78 | WPIndex = 0; |
78 | WPIndex = 0; |
79 | WPNumber = 0; |
79 | WPNumber = 0; |
80 | NaviData.WaypointNumber = WPNumber; |
80 | NaviData.WaypointNumber = WPNumber; |
81 | NaviData.WaypointIndex = WPIndex; |
81 | NaviData.WaypointIndex = WPIndex; |
Line 82... | Line -... | ||
82 | - | ||
83 | 82 | ||
84 | for(i = 0; i < WPLISTLEN; i++) |
83 | for(i = 0; i < WPLISTLEN; i++) |
85 | { |
84 | { |
- | 85 | WPList[i].Position.Status = INVALID; |
|
- | 86 | WPList[i].Position.Latitude = 0; |
|
- | 87 | WPList[i].Position.Longitude = 0; |
|
- | 88 | WPList[i].Position.Altitude = 0; |
|
- | 89 | WPList[i].Heading = -1; |
|
- | 90 | WPList[i].ToleranceRadius = 0; // in meters, if the MK is within that range around the target, then the next target is triggered |
|
- | 91 | WPList[i].HoldTime = 0; // in seconds, if the was once in the tolerance area around a WP, this time defines the delay before the next WP is triggered |
|
86 | WPList[i].Position.Status = INVALID; |
92 | WPList[i].Event_Flag = 0; // future implementation |
87 | } |
93 | } |
88 | return TRUE; |
94 | return TRUE; |
Line 89... | Line 95... | ||
89 | } |
95 | } |
Line 123... | Line 129... | ||
123 | { |
129 | { |
124 | WPIndex++; // goto next |
130 | WPIndex++; // goto next |
125 | NaviData.WaypointIndex = WPIndex; |
131 | NaviData.WaypointIndex = WPIndex; |
126 | return(&(WPList[WPIndex])); // return pointer to this waypoint |
132 | return(&(WPList[WPIndex])); // return pointer to this waypoint |
127 | } |
133 | } |
128 | else return NULL; |
134 | else return(NULL); |
129 | } |
135 | } |
Line -... | Line 136... | ||
- | 136 | ||
- | 137 | Waypoint_t* WPList_GetAt(u8 index) |
|
- | 138 | { |
|
- | 139 | if(index < WPNumber) return(&(WPList[index])); // return pointer to this waypoint |
|
- | 140 | else return(NULL); |