Skip to content

Commit

Permalink
Cosmetic - Use c++ list initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bresch committed Jul 11, 2019
1 parent 9b04468 commit 019e613
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ class FlightTaskAuto : public FlightTask
uORB::SubscriptionPollable<vehicle_status_s> *_sub_vehicle_status{nullptr};

State _current_state{State::none};
float _target_acceptance_radius = 0.0f; /**< Acceptances radius of the target */
int _mission_gear = landing_gear_s::GEAR_KEEP;
float _target_acceptance_radius{0.0f}; /**< Acceptances radius of the target */
int _mission_gear{landing_gear_s::GEAR_KEEP};

float _yaw_sp_prev = NAN;
float _yaw_sp_prev{NAN};
bool _yaw_sp_aligned{false};

ObstacleAvoidance _obstacle_avoidance; /**< class adjusting setpoints according to external avoidance module's input */
Expand All @@ -124,7 +124,7 @@ class FlightTaskAuto : public FlightTask

private:
matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */
bool _yaw_lock = false; /**< if within acceptance radius, lock yaw to current yaw */
bool _yaw_lock{false}; /**< if within acceptance radius, lock yaw to current yaw */
uORB::SubscriptionPollable<position_setpoint_triplet_s> *_sub_triplet_setpoint{nullptr};

matrix::Vector3f
Expand All @@ -136,11 +136,10 @@ class FlightTaskAuto : public FlightTask
matrix::Vector2f _closest_pt; /**< closest point to the vehicle position on the line previous - target */

map_projection_reference_s _reference_position{}; /**< Structure used to project lat/lon setpoint into local frame. */
float _reference_altitude = NAN; /**< Altitude relative to ground. */
hrt_abstime _time_stamp_reference = 0; /**< time stamp when last reference update occured. */
float _reference_altitude{NAN}; /**< Altitude relative to ground. */
hrt_abstime _time_stamp_reference{0}; /**< time stamp when last reference update occured. */

WeatherVane *_ext_yaw_handler =
nullptr; /**< external weathervane library, used to implement a yaw control law that turns the vehicle nose into the wind */
WeatherVane *_ext_yaw_handler{nullptr}; /**< external weathervane library, used to implement a yaw control law that turns the vehicle nose into the wind */


void _limitYawRate(); /**< Limits the rate of change of the yaw setpoint. */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/FlightTasks/tasks/AutoLine/FlightTaskAutoLine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ class FlightTaskAutoLine : public FlightTaskAutoMapper

private:
void _setSpeedAtTarget(); /**< Sets desiered speed at target */
float _speed_at_target = 0.0f;
float _speed_at_target{0.0f};
bool _position_locked{false};
};

0 comments on commit 019e613

Please sign in to comment.