mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
APMotors6DOF: Add motor reverse parameters for motors 9-12
Fix overruns found in coverity 145496-99
This commit is contained in:
parent
f423e66d0c
commit
20889ff8a9
@ -89,6 +89,34 @@ const AP_Param::GroupInfo AP_Motors6DOF::var_info[] = {
|
|||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO("FV_CPLNG_K", 9, AP_Motors6DOF, _forwardVerticalCouplingFactor, 1.0),
|
AP_GROUPINFO("FV_CPLNG_K", 9, AP_Motors6DOF, _forwardVerticalCouplingFactor, 1.0),
|
||||||
|
|
||||||
|
// @Param: 9_DIRECTION
|
||||||
|
// @DisplayName: Motor normal or reverse
|
||||||
|
// @Description: Used to change motor rotation directions without changing wires
|
||||||
|
// @Values: 1:normal,-1:reverse
|
||||||
|
// @User: Standard
|
||||||
|
AP_GROUPINFO("9_DIRECTION", 10, AP_Motors6DOF, _motor_reverse[8], 1),
|
||||||
|
|
||||||
|
// @Param: 10_DIRECTION
|
||||||
|
// @DisplayName: Motor normal or reverse
|
||||||
|
// @Description: Used to change motor rotation directions without changing wires
|
||||||
|
// @Values: 1:normal,-1:reverse
|
||||||
|
// @User: Standard
|
||||||
|
AP_GROUPINFO("10_DIRECTION", 11, AP_Motors6DOF, _motor_reverse[9], 1),
|
||||||
|
|
||||||
|
// @Param: 11_DIRECTION
|
||||||
|
// @DisplayName: Motor normal or reverse
|
||||||
|
// @Description: Used to change motor rotation directions without changing wires
|
||||||
|
// @Values: 1:normal,-1:reverse
|
||||||
|
// @User: Standard
|
||||||
|
AP_GROUPINFO("11_DIRECTION", 12, AP_Motors6DOF, _motor_reverse[10], 1),
|
||||||
|
|
||||||
|
// @Param: 12_DIRECTION
|
||||||
|
// @DisplayName: Motor normal or reverse
|
||||||
|
// @Description: Used to change motor rotation directions without changing wires
|
||||||
|
// @Values: 1:normal,-1:reverse
|
||||||
|
// @User: Standard
|
||||||
|
AP_GROUPINFO("12_DIRECTION", 13, AP_Motors6DOF, _motor_reverse[11], 1),
|
||||||
|
|
||||||
AP_GROUPEND
|
AP_GROUPEND
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -366,7 +394,7 @@ void AP_Motors6DOF::output_armed_stabilizing_vectored()
|
|||||||
if (forward_coupling_limit < 0) {
|
if (forward_coupling_limit < 0) {
|
||||||
forward_coupling_limit = 0;
|
forward_coupling_limit = 0;
|
||||||
}
|
}
|
||||||
int8_t forward_coupling_direction[] = {-1,-1,1,1,0,0,0,0};
|
int8_t forward_coupling_direction[] = {-1,-1,1,1,0,0,0,0,0,0,0,0};
|
||||||
|
|
||||||
// calculate linear command for each motor
|
// calculate linear command for each motor
|
||||||
// linear factors should be 0.0 or 1.0 for now
|
// linear factors should be 0.0 or 1.0 for now
|
||||||
|
@ -54,7 +54,7 @@ protected:
|
|||||||
void output_armed_stabilizing_vectored_6dof();
|
void output_armed_stabilizing_vectored_6dof();
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
AP_Int8 _motor_reverse[8];
|
AP_Int8 _motor_reverse[AP_MOTORS_MAX_NUM_MOTORS];
|
||||||
AP_Float _forwardVerticalCouplingFactor;
|
AP_Float _forwardVerticalCouplingFactor;
|
||||||
|
|
||||||
float _throttle_factor[AP_MOTORS_MAX_NUM_MOTORS]; // each motors contribution to throttle (climb/descent)
|
float _throttle_factor[AP_MOTORS_MAX_NUM_MOTORS]; // each motors contribution to throttle (climb/descent)
|
||||||
|
Loading…
Reference in New Issue
Block a user