State machine fixes for HIL

This commit is contained in:
Lorenz Meier
2013-10-06 14:18:28 +02:00
parent 90c4664dce
commit d1871bd7bb
5 changed files with 56 additions and 32 deletions
+3 -1
View File
@@ -307,7 +307,9 @@ void check_waypoints_reached(uint64_t now, const struct vehicle_global_position_
{
static uint16_t counter;
if (!global_pos->valid && !local_pos->xy_valid) {
if ((!global_pos->valid && !local_pos->xy_valid) ||
/* no waypoint */
wpm->size == 0) {
/* nothing to check here, return */
return;
}