Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub should move away from using firmware-side button press handling #28814

Open
Williangalvani opened this issue Dec 6, 2024 · 0 comments
Open
Labels

Comments

@Williangalvani
Copy link
Contributor

Sub has a lot of functions that are triggered from buttons handled on the firmware side. That is not how most of the vehicles work, and it makes it harder to control it via MAVLink for autonomous functionality, and also requires specific handling on the GCS.
I'm opening this issue to document what can easily be changed and what needs further work.

Here's an idea of how to map things:

Button function MAVLink function
k_none N/A
k_shift N/A
k_arm_toggle MAV_CMD_COMPONENT_ARM_DISARM
k_arm MAV_CMD_COMPONENT_ARM_DISARM
k_disarm MAV_CMD_COMPONENT_ARM_DISARM
k_mode_manual MAV_CMD_DO_SET_MODE
k_mode_stabilize MAV_CMD_DO_SET_MODE
k_mode_depth_hold MAV_CMD_DO_SET_MODE
k_mode_poshold MAV_CMD_DO_SET_MODE
k_mode_auto MAV_CMD_DO_SET_MODE
k_mode_circle MAV_CMD_DO_SET_MODE
k_mode_guided MAV_CMD_DO_SET_MODE
k_mode_acro MAV_CMD_DO_SET_MODE
k_mode_surftrak MAV_CMD_DO_SET_MODE
k_mount_center GIMBAL_MANAGER_SET_PITCHYAW
k_mount_tilt_up GIMBAL_MANAGER_SET_PITCHYAW
k_mount_tilt_down GIMBAL_MANAGER_SET_PITCHYAW
k_camera_trigger DO_AUX_FUNCTION
k_camera_source_toggle
k_mount_pan_right GIMBAL_MANAGER_SET_PITCHYAW
k_mount_pan_left GIMBAL_MANAGER_SET_PITCHYAW
k_lights1_cycle new AUX_FUNCTION
k_lights1_brighter new AUX_FUNCTION
k_lights1_dimmer new AUX_FUNCTION
k_lights2_cycle new AUX_FUNCTION
k_lights2_brighter new AUX_FUNCTION
k_lights2_dimmer new AUX_FUNCTION
k_gain_toggle Handle on GCS?
k_gain_inc Handle on GCS?
k_gain_dec Handle on GCS?
k_trim_roll_inc SET_ATTITUDE_TARGET
k_trim_roll_dec SET_ATTITUDE_TARGET
k_trim_pitch_inc SET_ATTITUDE_TARGET
k_trim_pitch_dec SET_ATTITUDE_TARGET
k_input_hold_set Handle on GCS
k_roll_pitch_toggle Handle on GCS
k_relay_1_on DO_SET_RELAY
k_relay_1_off DO_SET_RELAY
k_relay_1_toggle DO_SET_RELAY
k_relay_2_on DO_SET_RELAY
k_relay_2_off DO_SET_RELAY
k_relay_2_toggle DO_SET_RELAY
k_relay_3_on DO_SET_RELAY
k_relay_3_off DO_SET_RELAY
k_relay_3_toggle DO_SET_RELAY
k_servo_1_inc DO_SET_ACTUATOR
k_servo_1_dec DO_SET_ACTUATOR
k_servo_1_min DO_SET_ACTUATOR
k_servo_1_max DO_SET_ACTUATOR
k_servo_1_center DO_SET_ACTUATOR
k_servo_2_inc DO_SET_ACTUATOR
k_servo_2_dec DO_SET_ACTUATOR
k_servo_2_min DO_SET_ACTUATOR
k_servo_2_max DO_SET_ACTUATOR
k_servo_2_center DO_SET_ACTUATOR
k_servo_3_inc DO_SET_ACTUATOR
k_servo_3_dec DO_SET_ACTUATOR
k_servo_3_min DO_SET_ACTUATOR
k_servo_3_max DO_SET_ACTUATOR
k_servo_3_center DO_SET_ACTUATOR
k_servo_1_min_momentary DO_SET_ACTUATOR
k_servo_1_max_momentary DO_SET_ACTUATOR
k_servo_1_min_toggle DO_SET_ACTUATOR
k_servo_1_max_toggle DO_SET_ACTUATOR
k_servo_2_min_momentary DO_SET_ACTUATOR
k_servo_2_max_momentary DO_SET_ACTUATOR
k_servo_2_min_toggle DO_SET_ACTUATOR
k_servo_2_max_toggle DO_SET_ACTUATOR
k_servo_3_min_momentary DO_SET_ACTUATOR
k_servo_3_max_momentary DO_SET_ACTUATOR
k_servo_3_min_toggle DO_SET_ACTUATOR
k_servo_3_max_toggle DO_SET_ACTUATOR
k_custom_1 N/A
k_custom_2 N/A
k_custom_3 N/A
k_custom_4 N/A
k_custom_5 N/A
k_custom_6 N/A
k_relay_4_on DO_SET_RELAY
k_relay_4_off DO_SET_RELAY
k_relay_4_toggle DO_SET_RELAY
k_relay_1_momentary DO_SET_RELAY
k_relay_2_momentary DO_SET_RELAY
k_relay_3_momentary DO_SET_RELAY
k_relay_4_momentary DO_SET_RELAY
k_script_1
k_script_2
k_script_3
k_script_4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant