Parameter update - Rename variables in lib

using paramter_update.py script
This commit is contained in:
bresch
2019-04-03 15:38:50 +02:00
committed by Matthias Grob
parent ec5da55107
commit b14446f0e5
40 changed files with 245 additions and 231 deletions
+3 -3
View File
@@ -67,7 +67,7 @@ float WeatherVane::get_weathervane_yawrate()
float roll_sp = -asinf(body_z_sp(1));
float roll_exceeding_treshold = 0.0f;
float min_roll_rad = math::radians(_wv_min_roll.get());
float min_roll_rad = math::radians(_param_wv_roll_min.get());
if (roll_sp > min_roll_rad) {
roll_exceeding_treshold = roll_sp - min_roll_rad;
@@ -77,6 +77,6 @@ float WeatherVane::get_weathervane_yawrate()
}
return math::constrain(roll_exceeding_treshold * _wv_gain.get(), -math::radians(_wv_max_yaw_rate.get()),
math::radians(_wv_max_yaw_rate.get()));
return math::constrain(roll_exceeding_treshold * _param_wv_gain.get(), -math::radians(_param_wv_yrate_max.get()),
math::radians(_param_wv_yrate_max.get()));
}
+5 -5
View File
@@ -58,7 +58,7 @@ public:
bool is_active() {return _is_active;}
bool weathervane_enabled() { return _wv_enabled.get(); }
bool weathervane_enabled() { return _param_wv_en.get(); }
void update(const matrix::Quatf &q_sp_prev, float yaw);
@@ -73,10 +73,10 @@ private:
bool _is_active = true;
DEFINE_PARAMETERS(
(ParamBool<px4::params::WV_EN>) _wv_enabled,
(ParamFloat<px4::params::WV_ROLL_MIN>) _wv_min_roll,
(ParamFloat<px4::params::WV_GAIN>) _wv_gain,
(ParamFloat<px4::params::WV_YRATE_MAX>) _wv_max_yaw_rate
(ParamBool<px4::params::WV_EN>) _param_wv_en,
(ParamFloat<px4::params::WV_ROLL_MIN>) _param_wv_roll_min,
(ParamFloat<px4::params::WV_GAIN>) _param_wv_gain,
(ParamFloat<px4::params::WV_YRATE_MAX>) _param_wv_yrate_max
)
};