Skip to content

Commit

Permalink
navigator: fix save mission state. (#12468)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToppingXu authored and julianoes committed Oct 14, 2019
1 parent 04ea849 commit 35e0554
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/navigator/mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ Mission::save_mission_state()
if (mission_state.dataman_id == _mission.dataman_id && mission_state.count == _mission.count) {
/* navigator may modify only sequence, write modified state only if it changed */
if (mission_state.current_seq != _current_mission_index) {
mission_state.current_seq = _current_mission_index;
mission_state.timestamp = hrt_absolute_time();

if (dm_write(DM_KEY_MISSION_STATE, 0, DM_PERSIST_POWER_ON_RESET, &mission_state,
Expand Down

0 comments on commit 35e0554

Please sign in to comment.