From 9e354f56085b22b8ad137aa9644f91115c993047 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 15 Feb 2024 13:35:47 -0300 Subject: [PATCH] adding surface tracking add button function --- src/libs/joystick/protocols/mavlink-manual-control.ts | 2 ++ src/libs/vehicle/ardupilot/ardusub.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/libs/joystick/protocols/mavlink-manual-control.ts b/src/libs/joystick/protocols/mavlink-manual-control.ts index 9bf6eb4f7..d26bbf6c4 100644 --- a/src/libs/joystick/protocols/mavlink-manual-control.ts +++ b/src/libs/joystick/protocols/mavlink-manual-control.ts @@ -39,6 +39,7 @@ export enum MAVLinkButtonFunction { mode_circle = 'Mode circle', // 10 mode_guided = 'Mode guided', // 11 mode_acro = 'Mode acro', // 12 + mode_surftrack = 'Mode SurfTrack', // 13 mount_center = 'Mount center', // 21 mount_tilt_up = 'Mount tilt up', // 22 mount_tilt_down = 'Mount tilt down', // 23 @@ -235,6 +236,7 @@ const mavlinkManualControlButtonFunctions: { [key in MAVLinkButtonFunction]: MAV [MAVLinkButtonFunction.mode_circle]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mode_circle, 'Mode circle'), [MAVLinkButtonFunction.mode_guided]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mode_guided, 'Mode guided'), [MAVLinkButtonFunction.mode_acro]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mode_acro, 'Mode acro'), + [MAVLinkButtonFunction.mode_surftrack]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mode_surftrack, 'Mode SurfTrack'), [MAVLinkButtonFunction.mount_center]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mount_center, 'Mount center'), [MAVLinkButtonFunction.mount_tilt_up]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mount_tilt_up, 'Mount tilt up'), [MAVLinkButtonFunction.mount_tilt_down]: new MAVLinkManualControlButtonAction(MAVLinkButtonFunction.mount_tilt_down, 'Mount tilt down'), diff --git a/src/libs/vehicle/ardupilot/ardusub.ts b/src/libs/vehicle/ardupilot/ardusub.ts index 88e48cafd..22a4b7bd5 100644 --- a/src/libs/vehicle/ardupilot/ardusub.ts +++ b/src/libs/vehicle/ardupilot/ardusub.ts @@ -26,6 +26,8 @@ export enum CustomMode { CIRCLE = 7, // Automatically return to surface, pilot maintains horizontal control SURFACE = 9, + // maintain distance from the bottom surface + SURFACE_TRACK = 21, // Automatic position hold with manual override, with automatic throttle POSHOLD = 16, // Pass-through input with no stabilization