From ccedf98238aacc043888591f53f603bd9377ff74 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 27 Nov 2013 21:57:32 +0900 Subject: [PATCH] Tri: call output_min at end of motors test Minor change to comments --- libraries/AP_Motors/AP_MotorsTri.cpp | 12 ++++++------ libraries/AP_Motors/AP_MotorsTri.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/AP_Motors/AP_MotorsTri.cpp b/libraries/AP_Motors/AP_MotorsTri.cpp index 04f30fd267..fbb86e28a7 100644 --- a/libraries/AP_Motors/AP_MotorsTri.cpp +++ b/libraries/AP_Motors/AP_MotorsTri.cpp @@ -69,7 +69,8 @@ void AP_MotorsTri::output_min() { // set lower limit flag limit.throttle_lower = true; - // fill the motor_out[] array for HIL use + + // set all motors to minimum motor_out[AP_MOTORS_MOT_1] = _rc_throttle->radio_min; motor_out[AP_MOTORS_MOT_2] = _rc_throttle->radio_min; motor_out[AP_MOTORS_MOT_4] = _rc_throttle->radio_min; @@ -114,7 +115,7 @@ void AP_MotorsTri::output_armed() // Every thing is limited limit.throttle_lower = true; - + }else{ int16_t roll_out = (float)_rc_roll->pwm_out * 0.866f; int16_t pitch_out = _rc_pitch->pwm_out / 2; @@ -190,7 +191,7 @@ void AP_MotorsTri::output_disarmed() output_min(); } -// output_disarmed - sends commands to the motors +// output_test - spin each motor for a moment to allow the user to confirm the motor order and spin direction void AP_MotorsTri::output_test() { // Send minimum values to all motors @@ -211,7 +212,6 @@ void AP_MotorsTri::output_test() hal.rcout->write(_motor_to_channel_map[AP_MOTORS_MOT_2], _rc_throttle->radio_min + _min_throttle); hal.scheduler->delay(300); - hal.rcout->write(_motor_to_channel_map[AP_MOTORS_MOT_1], motor_out[AP_MOTORS_MOT_1]); - hal.rcout->write(_motor_to_channel_map[AP_MOTORS_MOT_2], motor_out[AP_MOTORS_MOT_2]); - hal.rcout->write(_motor_to_channel_map[AP_MOTORS_MOT_4], motor_out[AP_MOTORS_MOT_4]); + // Send minimum values to all motors + output_min(); } diff --git a/libraries/AP_Motors/AP_MotorsTri.h b/libraries/AP_Motors/AP_MotorsTri.h index ee0f50392d..e8db16fd47 100644 --- a/libraries/AP_Motors/AP_MotorsTri.h +++ b/libraries/AP_Motors/AP_MotorsTri.h @@ -33,7 +33,7 @@ public: // enable - starts allowing signals to be sent to motors virtual void enable(); - // motor test + // output_test - spin each motor for a moment to allow the user to confirm the motor order and spin direction virtual void output_test(); // output_min - sends minimum values out to the motors