Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navigator fix vehicle_status update #12364

Merged
merged 1 commit into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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