Dear all,
I have a question about ArduCopter code. In the following code segment, the comment says it is checking “if throttle below deadzone”, but the code is checking whether “target_climb_rate” is negative. Are these two things equal?
In ArduCopter/mode_althold.cpp:
case AltHold_Landed:
// set motors to spin-when-armed if throttle below deadzone, otherwise full range (but motors will only spin at min throttle)
if (target_climb_rate < 0.0f) {
motors->set_desired_spool_state(AP_Motors::DESIRED_SPIN_WHEN_ARMED);
} else {
motors->set_desired_spool_state(AP_Motors::DESIRED_THROTTLE_UNLIMITED);
Thank you so much.