|
|
|
@ -94,10 +94,8 @@ void Copter::motor_test_output()
@@ -94,10 +94,8 @@ void Copter::motor_test_output()
|
|
|
|
|
|
|
|
|
|
// mavlink_motor_test_check - perform checks before motor tests can begin
|
|
|
|
|
// return true if tests can continue, false if not
|
|
|
|
|
bool Copter::mavlink_motor_test_check(mavlink_channel_t chan, bool check_rc) |
|
|
|
|
bool Copter::mavlink_motor_test_check(const GCS_MAVLINK &gcs_chan, bool check_rc) |
|
|
|
|
{ |
|
|
|
|
GCS_MAVLINK_Copter &gcs_chan = gcs().chan(chan-MAVLINK_COMM_0); |
|
|
|
|
|
|
|
|
|
// check board has initialised
|
|
|
|
|
if (!ap.initialised) { |
|
|
|
|
gcs_chan.send_text(MAV_SEVERITY_CRITICAL,"Motor Test: Board initialising"); |
|
|
|
@ -128,7 +126,7 @@ bool Copter::mavlink_motor_test_check(mavlink_channel_t chan, bool check_rc)
@@ -128,7 +126,7 @@ bool Copter::mavlink_motor_test_check(mavlink_channel_t chan, bool check_rc)
|
|
|
|
|
|
|
|
|
|
// mavlink_motor_test_start - start motor test - spin a single motor at a specified pwm
|
|
|
|
|
// returns MAV_RESULT_ACCEPTED on success, MAV_RESULT_FAILED on failure
|
|
|
|
|
MAV_RESULT Copter::mavlink_motor_test_start(mavlink_channel_t chan, uint8_t motor_seq, uint8_t throttle_type, uint16_t throttle_value, |
|
|
|
|
MAV_RESULT Copter::mavlink_motor_test_start(const GCS_MAVLINK &gcs_chan, uint8_t motor_seq, uint8_t throttle_type, uint16_t throttle_value, |
|
|
|
|
float timeout_sec, uint8_t motor_count) |
|
|
|
|
{ |
|
|
|
|
if (motor_count == 0) { |
|
|
|
@ -142,7 +140,7 @@ MAV_RESULT Copter::mavlink_motor_test_start(mavlink_channel_t chan, uint8_t moto
@@ -142,7 +140,7 @@ MAV_RESULT Copter::mavlink_motor_test_start(mavlink_channel_t chan, uint8_t moto
|
|
|
|
|
The RC calibrated check can be skipped if direct pwm is |
|
|
|
|
supplied |
|
|
|
|
*/ |
|
|
|
|
if (!mavlink_motor_test_check(chan, throttle_type != 1)) { |
|
|
|
|
if (!mavlink_motor_test_check(gcs_chan, throttle_type != 1)) { |
|
|
|
|
return MAV_RESULT_FAILED; |
|
|
|
|
} else { |
|
|
|
|
// start test
|
|
|
|
|