mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 23:53:33 +08:00
weathervane: use a single parameter to enable
- in auto mode we always run weather vane - in manual model we just use it in position control mode Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
@@ -58,9 +58,7 @@ public:
|
||||
|
||||
bool is_active() {return _is_active;}
|
||||
|
||||
bool manual_enabled() { return _wv_manual_enabled.get(); }
|
||||
|
||||
bool auto_enabled() { return _wv_auto_enabled.get(); }
|
||||
bool weathervane_enabled() { return _wv_enabled.get(); }
|
||||
|
||||
void update(const matrix::Quatf &q_sp_prev, float yaw);
|
||||
|
||||
@@ -75,8 +73,7 @@ private:
|
||||
bool _is_active = true;
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamBool<px4::params::WV_MAN_EN>) _wv_manual_enabled,
|
||||
(ParamBool<px4::params::WV_AUTO_EN>) _wv_auto_enabled,
|
||||
(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
|
||||
|
||||
@@ -40,20 +40,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enable weathervane for manual position control mode.
|
||||
* Enable weathervane.
|
||||
*
|
||||
* @boolean
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(WV_MAN_EN, 0);
|
||||
|
||||
/**
|
||||
* Enable weathervane for auto.
|
||||
*
|
||||
* @boolean
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(WV_AUTO_EN, 0);
|
||||
PARAM_DEFINE_INT32(WV_EN, 0);
|
||||
|
||||
/**
|
||||
* Weather-vane roll angle to yawrate.
|
||||
|
||||
Reference in New Issue
Block a user