From f5648a825994af4f31a8b0eb7ac2ce9baf7aeee1 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Tue, 31 Oct 2017 10:23:31 -0400 Subject: [PATCH] Sub: clear roll/pitch trim when setting neutral controls --- ArduSub/joystick.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduSub/joystick.cpp b/ArduSub/joystick.cpp index a402908339..ace614359a 100644 --- a/ArduSub/joystick.cpp +++ b/ArduSub/joystick.cpp @@ -600,6 +600,10 @@ void Sub::set_neutral_controls() } hal.rcin->set_overrides(channels, 10); + + // Clear pitch/roll trim settings + pitchTrim = 0; + rollTrim = 0; } void Sub::clear_input_hold()