mavlink: waypoint manager fixes, mission saving on reboot

This commit is contained in:
Anton Babushkin
2014-06-09 16:10:24 +02:00
parent 4ad435b483
commit cad0877f67
4 changed files with 233 additions and 234 deletions
+2 -4
View File
@@ -603,14 +603,12 @@ Navigator::task_main()
warnx("Could not clear geofence");
}
#if 0 // *** UNTESTED... Anton, this is for you
/* Get the last offboard mission id */
persistent_system_state_t sys_state;
if (dm_read(DM_KEY_SYSTEM_STATE, 0, &sys_state, sizeof(sys_state)) == sizeof(sys_state)) {
if ((sys_state.current_offboard_waypoint_id >= 0) && (sys_state.current_offboard_waypoint_id <= 1))
_mission.set_offboard_dataman_id(sys_state.current_offboard_waypoint_id);
if ((sys_state.offboard_waypoint_id >= 0) && (sys_state.offboard_waypoint_id <= 1))
_mission.set_offboard_dataman_id(sys_state.offboard_waypoint_id);
}
#endif
/*
* do subscriptions