cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

Cockpit finds itself when looking for other GCSs controlling the vehicle

Open rafaellehmkuhl opened this issue 3 months ago • 2 comments

This happens when the user refreshes Cockpit. If Cockpit refreshes in less than 2 seconds, the detect-other-gcs-controlling-the-vehicle-through-mavlink-manual-control routine will kick in and find itself from before the refresh, and disable the joystick forwarding.

That behavior was reported already by @Williangalvani and @vshie.

Image

rafaellehmkuhl avatar Sep 26 '25 14:09 rafaellehmkuhl

I think output should be preemptively disabled for a couple of seconds at startup, during which the presence of MANUAL_CONTROL, RC_CHANNELS_OVERRIDE, RC_CHANNELS, and HIL_RC_INPUTS_RAW messages should be checked for, and if none are found within the time since it's been opened then it can assume it's good to go.

It could also continually check for the message types it's not sending, which could allow auto-disabling its output when an external controller is acting (which could be lovely for temporary programmatic control), although that's maybe a safety concern so may need an opt-in enable toggle in the settings 🤷‍♂️

ES-Alexander avatar Nov 17 '25 12:11 ES-Alexander

I think output should be preemptively disabled for a couple of seconds at startup, during which the presence of MANUAL_CONTROL, RC_CHANNELS_OVERRIDE, RC_CHANNELS, and HIL_RC_INPUTS_RAW messages should be checked for, and if none are found within the time since it's been opened then it can assume it's good to go.

It's what it does today, but it only looks for MANUAL_CONTROL messages.

It could also continually check for the message types it's not sending, which could allow auto-disabling its output when an external controller is acting (which could be lovely for temporary programmatic control), although that's maybe a safety concern so may need an opt-in enable toggle in the settings 🤷‍♂️

It does make sense, yes. And opt-in for sure 😄

rafaellehmkuhl avatar Nov 17 '25 14:11 rafaellehmkuhl