From 6ebef3fe6b9b1638fbca70bdf68378593b82764e Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 21 Sep 2021 22:18:25 +0100 Subject: [PATCH] Rover: move from AUX_FUNC::SAVE_TRIM to AUX_FUNC::TRIM_TO_CURRENT_SERVO_RC --- Rover/RC_Channel.cpp | 4 ++-- Rover/system.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Rover/RC_Channel.cpp b/Rover/RC_Channel.cpp index 430f747f5a..80a8f2ccea 100644 --- a/Rover/RC_Channel.cpp +++ b/Rover/RC_Channel.cpp @@ -45,7 +45,7 @@ void RC_Channel_Rover::init_aux_function(const aux_func_t ch_option, const AuxSw case AUX_FUNC::WALKING_HEIGHT: case AUX_FUNC::RTL: case AUX_FUNC::SAILBOAT_TACK: - case AUX_FUNC::SAVE_TRIM: + case AUX_FUNC::TRIM_TO_CURRENT_SERVO_RC: case AUX_FUNC::SAVE_WP: case AUX_FUNC::SIMPLE: case AUX_FUNC::SMART_RTL: @@ -230,7 +230,7 @@ bool RC_Channel_Rover::do_aux_function(const aux_func_t ch_option, const AuxSwit break; // save steering trim - case AUX_FUNC::SAVE_TRIM: + case AUX_FUNC::TRIM_TO_CURRENT_SERVO_RC: if (!rover.g2.motors.have_skid_steering() && rover.arming.is_armed() && (rover.control_mode != &rover.mode_loiter) && (rover.control_mode != &rover.mode_hold) && ch_flag == AuxSwitchPos::HIGH) { diff --git a/Rover/system.cpp b/Rover/system.cpp index b2ba4673d4..97367e1294 100644 --- a/Rover/system.cpp +++ b/Rover/system.cpp @@ -131,6 +131,7 @@ void Rover::init_ardupilot() // initialise rc channels rc().convert_options(RC_Channel::AUX_FUNC::ARMDISARM_UNUSED, RC_Channel::AUX_FUNC::ARMDISARM); + rc().convert_options(RC_Channel::AUX_FUNC::SAVE_TRIM, RC_Channel::AUX_FUNC::TRIM_TO_CURRENT_SERVO_RC); rc().init(); rover.g2.sailboat.init();