SITL: remove unused variables

This commit is contained in:
Andy Piper 2023-06-14 12:43:52 -04:00 committed by Peter Barker
parent 2e2491f4ff
commit 3224cf19a8
5 changed files with 2 additions and 20 deletions

View File

@ -407,7 +407,7 @@ void Frame::load_frame_params(const char *model_json)
char label_name[20];
for (uint8_t i=0; i<ARRAY_SIZE(per_motor_vars); i++) {
for (uint8_t j=0; j<12; j++) {
sprintf(label_name, "motor%i_%s", j+1, per_motor_vars[i].label);
snprintf(label_name, 20, "motor%i_%s", j+1, per_motor_vars[i].label);
auto v = obj->get(label_name);
if (v.is<picojson::null>()) {
// 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; i<num_motors; i++) {
Vector3f mtorque, mthrust;
motors[i].calculate_forces(input, motor_offset, mtorque, mthrust, vel_air_bf, gyro, air_density, battery->get_voltage(), use_drag);
current += motors[i].get_current();
torque += mtorque;
thrust += mthrust;
// simulate motor rpm

View File

@ -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;

View File

@ -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;
};

View File

@ -48,8 +48,6 @@ private:
void send_packet1();
void send_packet2();
void nmea_printf(const char *fmt, ...);
uint64_t start_us;
};
}

View File

@ -133,7 +133,6 @@ private:
void check_reload_dref(void);
uint32_t xplane_version;
bool have_ref_lat;
};