Skip to content

Commit

Permalink
RC_Channel: only enter rc trim function if armed
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Apr 6, 2021
1 parent d41ecc3 commit 2815824
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/RC_Channel/RC_Channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ void RC_Channels::rudder_arm_disarm_check()
}
}

if (now - rudder_arm_timer >= 10000 &&
if (AP::arming().is_armed() &&
now - rudder_arm_timer >= 10000 &&
channel->get_control_in() > 4000) {
// callback so Copter can enable AHRS-trim
rudder_10_second_timer = 0;
Expand Down

0 comments on commit 2815824

Please sign in to comment.