Setting up physical toggle button on GCS for setting servo high or low in cockpit version 1.17.2

Hello everyone,
I’m facing an issue with an engine on/off toggle on my USV.
Setup: Pixhawk 6X, BlueOS, Cockpit.
The Problem: I am configuring a USV using ArduRover/ArduSub and BlueOS Cockpit. I have an engine on/off function mapped to a button. In Mission Planner, this works perfectly using an Auxiliary Function (do set servo). However, in Cockpit, i dont see any option how to replicate the same setup. Please provide the step-by-step mapping in the BlueOS Cockpit ‘Actuators’ tab and the specific servo_opin and RCx_OPTION parameters needed to ensure the Cockpit joystick button correctly toggles the servo output for engine ignition/kill

How do I correctly map a Cockpit button to a servo output in the new Actuator framework? Are there specific SERVOx_FUNCTION or RCx_OPTION settings that Cockpit requires to ‘see’ the toggle?

Hi @Tushar, welcome to the forum :slight_smile:

Are you trying to decide between them, or somehow use both or something? Some of the control options available are currently quite different between the different firmware variants, so it’s important to know which type you’re using. For reference, USVs typically use ArduRover, since it has dedicated boat support.

  1. I’m not aware of any ‘Actuators’ tab in either BlueOS or Cockpit - perhaps you’re referring to the PWM Outputs tab in the BlueOS Vehicle Setup page?
  2. RCx_OPTION parameters are for radio control, which is irrelevant for the MAVLink-based joystick control that Cockpit normally uses.
  3. A servo-style output is not binary - what states are you hoping to toggle between?
    • Do you need a single joystick button to toggle between those states, or is it sufficient to set different states with different buttons?
      • ArduSub has built in joystick button handling that can do this for min<->center or max<->center toggling
      • If those states aren’t what you need (or you’re using ArduRover) you’ll need to set up DO_SET_SERVO MAVLink commands via custom Cockpit Actions, which you can then assign to your joystick buttons
        • Direct external control of a servo pin (e.g. via MAVLink) can be configured by disabling it for use by the autopilot (i.e. SERVOn_FUNCTION = Disabled (0))
        • One-button toggling with this approach is possible, but likely quite awkward to set up