mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Copter: motor_test: use PWM min and max from RC_Channel
This commit is contained in:
parent
d7ff10163c
commit
96c47dadcb
@ -6,8 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// motor test definitions
|
// motor test definitions
|
||||||
#define MOTOR_TEST_PWM_MIN 800 // min pwm value accepted by the test
|
|
||||||
#define MOTOR_TEST_PWM_MAX 2200 // max pwm value accepted by the test
|
|
||||||
#define MOTOR_TEST_TIMEOUT_SEC 600 // max timeout is 10 minutes (600 seconds)
|
#define MOTOR_TEST_TIMEOUT_SEC 600 // max timeout is 10 minutes (600 seconds)
|
||||||
|
|
||||||
static uint32_t motor_test_start_ms; // system time the motor test began
|
static uint32_t motor_test_start_ms; // system time the motor test began
|
||||||
@ -84,7 +82,7 @@ void Copter::motor_test_output()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sanity check throttle values
|
// sanity check throttle values
|
||||||
if (pwm >= MOTOR_TEST_PWM_MIN && pwm <= MOTOR_TEST_PWM_MAX ) {
|
if (pwm >= RC_Channel::RC_MIN_LIMIT_PWM && pwm <= RC_Channel::RC_MAX_LIMIT_PWM) {
|
||||||
// turn on motor to specified pwm value
|
// turn on motor to specified pwm value
|
||||||
motors->output_test_seq(motor_test_seq, pwm);
|
motors->output_test_seq(motor_test_seq, pwm);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user