mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-11 02:13:57 -04:00
AP_Motors: move to a uint32_t motor mask
This commit is contained in:
parent
9405cf9c4e
commit
98e4037868
@ -740,7 +740,7 @@ void AP_MotorsMulticopter::set_throttle_passthrough_for_esc_calibration(float th
|
||||
// output a thrust to all motors that match a given motor mask. This
|
||||
// is used to control tiltrotor motors in forward flight. Thrust is in
|
||||
// the range 0 to 1
|
||||
void AP_MotorsMulticopter::output_motor_mask(float thrust, uint16_t mask, float rudder_dt)
|
||||
void AP_MotorsMulticopter::output_motor_mask(float thrust, uint32_t mask, float rudder_dt)
|
||||
{
|
||||
const int16_t pwm_min = get_pwm_output_min();
|
||||
const int16_t pwm_range = get_pwm_output_max() - pwm_min;
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
// output a thrust to all motors that match a given motor
|
||||
// mask. This is used to control tiltrotor motors in forward
|
||||
// flight. Thrust is in the range 0 to 1
|
||||
virtual void output_motor_mask(float thrust, uint16_t mask, float rudder_dt);
|
||||
virtual void output_motor_mask(float thrust, uint32_t mask, float rudder_dt);
|
||||
|
||||
// get_motor_mask - returns a bitmask of which outputs are being used for motors (1 means being used)
|
||||
// this can be used to ensure other pwm outputs (i.e. for servos) do not conflict
|
||||
@ -204,5 +204,5 @@ protected:
|
||||
}
|
||||
|
||||
// mask of overridden motors (used by quadplane tiltrotors)
|
||||
uint16_t _motor_mask_override;
|
||||
uint32_t _motor_mask_override;
|
||||
};
|
||||
|
@ -351,7 +351,7 @@ void AP_MotorsTri::thrust_compensation(void)
|
||||
/*
|
||||
override tricopter tail servo output in output_motor_mask
|
||||
*/
|
||||
void AP_MotorsTri::output_motor_mask(float thrust, uint16_t mask, float rudder_dt)
|
||||
void AP_MotorsTri::output_motor_mask(float thrust, uint32_t mask, float rudder_dt)
|
||||
{
|
||||
// normal multicopter output
|
||||
AP_MotorsMulticopter::output_motor_mask(thrust, mask, rudder_dt);
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
// mask. This is used to control tiltrotor motors in forward
|
||||
// flight. Thrust is in the range 0 to 1
|
||||
// rudder_dt applys diffential thrust for yaw in the range 0 to 1
|
||||
void output_motor_mask(float thrust, uint16_t mask, float rudder_dt) override;
|
||||
void output_motor_mask(float thrust, uint32_t mask, float rudder_dt) override;
|
||||
|
||||
// return the roll factor of any motor, this is used for tilt rotors and tail sitters
|
||||
// using copter motors for forward flight
|
||||
|
Loading…
Reference in New Issue
Block a user