Skip to content

Commit

Permalink
navigator: fix vehicle_status update (#12364)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored Jun 29, 2019
1 parent 5857cf4 commit 4b778fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion src/modules/navigator/navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ class Navigator : public ModuleBase<Navigator>, public ModuleParams

// update subscriptions
void params_update();
void vehicle_status_update();

/**
* Publish a new position setpoint triplet for position controllers
Expand Down
13 changes: 1 addition & 12 deletions src/modules/navigator/navigator_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,6 @@ Navigator::~Navigator()
orb_unsubscribe(_local_pos_sub);
}

void
Navigator::vehicle_status_update()
{
if (_vstatus_sub.update(&_vstatus)) {
/* in case the commander is not be running */
_vstatus.arming_state = vehicle_status_s::ARMING_STATE_STANDBY;
}
}

void
Navigator::params_update()
{
Expand Down Expand Up @@ -156,8 +147,6 @@ Navigator::run()
_geofence.loadFromFile(GEOFENCE_FILENAME);
}

/* copy all topics first time */
vehicle_status_update();
params_update();

/* wakeup source(s) */
Expand Down Expand Up @@ -218,7 +207,7 @@ Navigator::run()
params_update();
}

vehicle_status_update();
_vstatus_sub.update(&_vstatus);
_land_detected_sub.update(&_land_detected);
_position_controller_status_sub.update();
_home_pos_sub.update(&_home_pos);
Expand Down

0 comments on commit 4b778fd

Please sign in to comment.