mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +08:00
adapted code for standard vtol to new structure in vtol_att_control_main
This commit is contained in:
@@ -214,16 +214,6 @@ void Standard::update_mc_state()
|
|||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void Standard::process_mc_data()
|
|
||||||
{
|
|
||||||
fill_att_control_output();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Standard::process_fw_data()
|
|
||||||
{
|
|
||||||
fill_att_control_output();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Standard::update_fw_state()
|
void Standard::update_fw_state()
|
||||||
{
|
{
|
||||||
// in fw mode we need the multirotor motors to stop spinning, in backtransition mode we let them spin up again
|
// in fw mode we need the multirotor motors to stop spinning, in backtransition mode we let them spin up again
|
||||||
@@ -242,7 +232,7 @@ void Standard::update_external_state()
|
|||||||
* Prepare message to acutators with data from mc and fw attitude controllers. An mc attitude weighting will determine
|
* Prepare message to acutators with data from mc and fw attitude controllers. An mc attitude weighting will determine
|
||||||
* what proportion of control should be applied to each of the control groups (mc and fw).
|
* what proportion of control should be applied to each of the control groups (mc and fw).
|
||||||
*/
|
*/
|
||||||
void Standard::fill_att_control_output()
|
void Standard::fill_actuator_outputs()
|
||||||
{
|
{
|
||||||
/* multirotor controls */
|
/* multirotor controls */
|
||||||
_actuators_out_0->control[0] = _actuators_mc_in->control[0] * _mc_att_ctl_weight; // roll
|
_actuators_out_0->control[0] = _actuators_mc_in->control[0] * _mc_att_ctl_weight; // roll
|
||||||
|
|||||||
@@ -57,9 +57,7 @@ public:
|
|||||||
|
|
||||||
void update_vtol_state();
|
void update_vtol_state();
|
||||||
void update_mc_state();
|
void update_mc_state();
|
||||||
void process_mc_data();
|
|
||||||
void update_fw_state();
|
void update_fw_state();
|
||||||
void process_fw_data();
|
|
||||||
void update_transition_state();
|
void update_transition_state();
|
||||||
void update_external_state();
|
void update_external_state();
|
||||||
|
|
||||||
@@ -98,7 +96,7 @@ private:
|
|||||||
float _mc_att_ctl_weight; // the amount of multicopter attitude control that should be applied in fixed wing mode while transitioning
|
float _mc_att_ctl_weight; // the amount of multicopter attitude control that should be applied in fixed wing mode while transitioning
|
||||||
float _airspeed_trans_blend_margin;
|
float _airspeed_trans_blend_margin;
|
||||||
|
|
||||||
void fill_att_control_output();
|
void fill_actuator_outputs();
|
||||||
void set_max_mc(unsigned pwm_value);
|
void set_max_mc(unsigned pwm_value);
|
||||||
|
|
||||||
int parameters_update();
|
int parameters_update();
|
||||||
|
|||||||
Reference in New Issue
Block a user