From 3224cf19a836901675a749b91c8f382f7c76cf62 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Wed, 14 Jun 2023 12:43:52 -0400 Subject: [PATCH] SITL: remove unused variables --- libraries/SITL/SIM_Frame.cpp | 4 +--- libraries/SITL/SIM_Helicopter.h | 3 --- libraries/SITL/SIM_LM2755.h | 12 +----------- libraries/SITL/SIM_VectorNav.h | 2 -- libraries/SITL/SIM_XPlane.h | 1 - 5 files changed, 2 insertions(+), 20 deletions(-) diff --git a/libraries/SITL/SIM_Frame.cpp b/libraries/SITL/SIM_Frame.cpp index abddbe6fdb..81fb426190 100644 --- a/libraries/SITL/SIM_Frame.cpp +++ b/libraries/SITL/SIM_Frame.cpp @@ -407,7 +407,7 @@ void Frame::load_frame_params(const char *model_json) char label_name[20]; for (uint8_t i=0; iget(label_name); if (v.is()) { // use default value @@ -553,11 +553,9 @@ void Frame::calculate_forces(const Aircraft &aircraft, Vector3f vel_air_bf = aircraft.get_dcm().transposed() * aircraft.get_velocity_air_ef(); - float current = 0; for (uint8_t i=0; iget_voltage(), use_drag); - current += motors[i].get_current(); torque += mtorque; thrust += mthrust; // simulate motor rpm diff --git a/libraries/SITL/SIM_Helicopter.h b/libraries/SITL/SIM_Helicopter.h index 3b3d24c5e3..4410b19dec 100644 --- a/libraries/SITL/SIM_Helicopter.h +++ b/libraries/SITL/SIM_Helicopter.h @@ -59,14 +59,11 @@ protected: private: float terminal_rotation_rate = 4*radians(360.0f); - float hover_throttle = 0.5f; - float terminal_velocity = 80; float hover_lean = 3.2f; 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 izz = 0.2f; float iyy; float tr_dist = 0.85f; diff --git a/libraries/SITL/SIM_LM2755.h b/libraries/SITL/SIM_LM2755.h index f6f0cd3aa0..d11dbaadaf 100644 --- a/libraries/SITL/SIM_LM2755.h +++ b/libraries/SITL/SIM_LM2755.h @@ -72,12 +72,7 @@ private: uint8_t &_ramp_down_step_time, uint8_t &_timing) : high_level{_high_level}, - low_level{_low_level}, - delay{_delay}, - ramp_up_step_time{_ramp_up_step_time}, - time_high{_time_high}, - ramp_down_step_time{_ramp_down_step_time}, - timing{_timing} + low_level{_low_level} { } void update(); @@ -88,11 +83,6 @@ private: private: uint8_t &high_level; uint8_t &low_level; - uint8_t &delay; - uint8_t &ramp_up_step_time; - uint8_t &time_high; - uint8_t &ramp_down_step_time; - uint8_t &timing; uint8_t output_value; }; diff --git a/libraries/SITL/SIM_VectorNav.h b/libraries/SITL/SIM_VectorNav.h index 2a4ed32f40..436e19cd22 100644 --- a/libraries/SITL/SIM_VectorNav.h +++ b/libraries/SITL/SIM_VectorNav.h @@ -48,8 +48,6 @@ private: void send_packet1(); void send_packet2(); void nmea_printf(const char *fmt, ...); - - uint64_t start_us; }; } diff --git a/libraries/SITL/SIM_XPlane.h b/libraries/SITL/SIM_XPlane.h index a0e44ae9d8..8405143932 100644 --- a/libraries/SITL/SIM_XPlane.h +++ b/libraries/SITL/SIM_XPlane.h @@ -133,7 +133,6 @@ private: void check_reload_dref(void); uint32_t xplane_version; - bool have_ref_lat; };