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

Minor initialization fixes #11228

Merged
merged 2 commits into from
Jan 17, 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
2 changes: 1 addition & 1 deletion src/modules/mc_pos_control/mc_pos_control_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class MulticopterPositionControl : public ModuleBase<MulticopterPositionControl>
vehicle_trajectory_waypoint_s _traj_wp_avoidance{}; /**< trajectory waypoint */
vehicle_trajectory_waypoint_s _traj_wp_avoidance_desired{}; /**< desired waypoints, inputs to an obstacle avoidance module */
landing_gear_s _landing_gear{};
int8_t _old_landing_gear_position;
int8_t _old_landing_gear_position{landing_gear_s::GEAR_KEEP};

DEFINE_PARAMETERS(
(ParamFloat<px4::params::MPC_TKO_RAMP_T>) _takeoff_ramp_time, /**< time constant for smooth takeoff ramp */
Expand Down
4 changes: 2 additions & 2 deletions src/modules/vmount/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ void OutputBase::_calculate_output_angles(const hrt_abstime &t)

//get the output angles and stabilize if necessary
vehicle_attitude_s vehicle_attitude;
matrix::Eulerf euler;

if (_stabilize[0] || _stabilize[1] || _stabilize[2]) {
orb_copy(ORB_ID(vehicle_attitude), _vehicle_attitude_sub, &vehicle_attitude);
euler = matrix::Quatf(vehicle_attitude.q);
}

matrix::Eulerf euler = matrix::Quatf(vehicle_attitude.q);

for (int i = 0; i < 3; ++i) {
if (_stabilize[i]) {
_angle_outputs[i] = _angle_setpoints[i] - euler(i);
Expand Down