mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 06:43:33 +08:00
Create system state entry in dataman - ATTN Anton
Create persistent system state id for data manager to store system state that will persist across resets.
This commit is contained in:
@@ -603,6 +603,15 @@ 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);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* do subscriptions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user