From 4af616f19ebf117cd4721e8a5138a3aaf12e7731 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 14 Apr 2022 16:00:51 -0300 Subject: [PATCH] Sub: tweak default parameters for joystick buttons --- ArduSub/Parameters.cpp | 2 +- ArduSub/joystick.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ArduSub/Parameters.cpp b/ArduSub/Parameters.cpp index 452a591f63..5d46e7df57 100644 --- a/ArduSub/Parameters.cpp +++ b/ArduSub/Parameters.cpp @@ -730,11 +730,11 @@ void Sub::load_parameters() AP_Param::set_default_by_name("MNT_JSTICK_SPD", 100); AP_Param::set_default_by_name("BRD_RTC_TYPE", 3); AP_Param::set_default_by_name("BARO_PROBE_EXT", 768); + AP_Param::set_by_name("MNT_RC_IN_PAN", 7); AP_Param::set_by_name("MNT_RC_IN_TILT", 8); // We should ignore this parameter since ROVs are neutral buoyancy AP_Param::set_by_name("MOT_THST_HOVER", 0.5); - #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIGATOR AP_Param::set_default_by_name("BARO_PROBE_EXT", 0); AP_Param::set_default_by_name("BATT_MONITOR", 4); diff --git a/ArduSub/joystick.cpp b/ArduSub/joystick.cpp index d77268e7d4..2fc7675b9b 100644 --- a/ArduSub/joystick.cpp +++ b/ArduSub/joystick.cpp @@ -675,7 +675,7 @@ JSButton* Sub::get_button(uint8_t index) void Sub::default_js_buttons() { JSButton::button_function_t defaults[16][2] = { - {JSButton::button_function_t::k_none, JSButton::button_function_t::k_none}, + {JSButton::button_function_t::k_shift, JSButton::button_function_t::k_none}, {JSButton::button_function_t::k_mode_manual, JSButton::button_function_t::k_none}, {JSButton::button_function_t::k_mode_depth_hold, JSButton::button_function_t::k_none}, {JSButton::button_function_t::k_mode_stabilize, JSButton::button_function_t::k_none}, @@ -686,8 +686,8 @@ void Sub::default_js_buttons() {JSButton::button_function_t::k_mount_center, JSButton::button_function_t::k_none}, {JSButton::button_function_t::k_input_hold_set, JSButton::button_function_t::k_none}, - {JSButton::button_function_t::k_mount_tilt_down, JSButton::button_function_t::k_mount_pan_left}, - {JSButton::button_function_t::k_mount_tilt_up, JSButton::button_function_t::k_mount_pan_right}, + {JSButton::button_function_t::k_mount_tilt_up, JSButton::button_function_t::k_servo_2_max_momentary}, + {JSButton::button_function_t::k_mount_tilt_down, JSButton::button_function_t::k_servo_2_min_momentary}, {JSButton::button_function_t::k_gain_inc, JSButton::button_function_t::k_trim_pitch_dec}, {JSButton::button_function_t::k_gain_dec, JSButton::button_function_t::k_trim_pitch_inc},