From 14bdfe2889ef98c28bd913ecdc73b4db19caf8c6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Jun 2015 08:04:51 +1000 Subject: [PATCH] SITL: started to use C++11 variable initialisation --- libraries/SITL/SIM_Helicopter.cpp | 12 +----------- libraries/SITL/SIM_Helicopter.h | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/libraries/SITL/SIM_Helicopter.cpp b/libraries/SITL/SIM_Helicopter.cpp index e135dbfb18..1557d8bfcf 100644 --- a/libraries/SITL/SIM_Helicopter.cpp +++ b/libraries/SITL/SIM_Helicopter.cpp @@ -26,17 +26,7 @@ constructor */ Helicopter::Helicopter(const char *home_str, const char *frame_str) : - Aircraft(home_str, frame_str), - terminal_rotation_rate(4*radians(360.0)), - hover_throttle(0.65f), - terminal_velocity(40.0f), - hover_lean(8.0f), - yaw_zero(0.1f), - rotor_rot_accel(radians(20)), - roll_rate_max(radians(1400)), - pitch_rate_max(radians(1400)), - yaw_rate_max(radians(1400)), - rsc_setpoint(0.8f) + Aircraft(home_str, frame_str) { mass = 2.13f; diff --git a/libraries/SITL/SIM_Helicopter.h b/libraries/SITL/SIM_Helicopter.h index d436052b8a..5ee3085b35 100644 --- a/libraries/SITL/SIM_Helicopter.h +++ b/libraries/SITL/SIM_Helicopter.h @@ -39,16 +39,16 @@ public: } private: - float terminal_rotation_rate; - float hover_throttle; - float terminal_velocity; - float hover_lean; - float yaw_zero; - float rotor_rot_accel; - float roll_rate_max; - float pitch_rate_max; - float yaw_rate_max; - float rsc_setpoint; + float terminal_rotation_rate = 4*radians(360.0f); + float hover_throttle = 0.65f; + float terminal_velocity = 40; + float hover_lean = 8.0f; + float yaw_zero = 0.1f; + float rotor_rot_accel = radians(20); + float roll_rate_max = radians(1400); + float pitch_rate_max = radians(1400); + float yaw_rate_max = radians(1400); + float rsc_setpoint = 0.8f; float thrust_scale; float tail_thrust_scale; };