simulator: rename parameter variable according to convention

This commit is contained in:
Matthias Grob
2020-05-11 15:59:56 +02:00
parent 88c21337fa
commit 7b41ce4711
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -286,7 +286,7 @@ private:
DEFINE_PARAMETERS(
(ParamFloat<px4::params::SIM_BAT_DRAIN>) _param_sim_bat_drain, ///< battery drain interval
(ParamFloat<px4::params::SIM_BAT_MIN_PCT>) _battery_min_percentage, //< minimum battery percentage
(ParamFloat<px4::params::SIM_BAT_MIN_PCT>) _param_bat_min_pct, //< minimum battery percentage
(ParamFloat<px4::params::SIM_GPS_NOISE_X>) _param_sim_gps_noise_x,
(ParamBool<px4::params::SIM_GPS_BLOCK>) _param_sim_gps_block,
(ParamBool<px4::params::SIM_ACCEL_BLOCK>) _param_sim_accel_block,
+1 -1
View File
@@ -369,7 +369,7 @@ void Simulator::handle_message_hil_sensor(const mavlink_message_t *msg)
float ibatt = -1.0f; // no current sensor in simulation
battery_percentage = math::max(battery_percentage, _battery_min_percentage.get() / 100.f);
battery_percentage = math::max(battery_percentage, _param_bat_min_pct.get() / 100.f);
float vbatt = math::gradual(battery_percentage, 0.f, 1.f, _battery.empty_cell_voltage(), _battery.full_cell_voltage());
vbatt *= _battery.cell_count();