Skip to content

Conversation

@rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Jul 2, 2025

Opening in draft as there were some suggestions in the RadCam meeting that I'm going to change before opening it for review:

  • From joao: it would be nice to have joystick suggestions by source
  • From joao: show somewhere the suggestions that were already accepted
  • From wilson: add an "accept all suggestions" button (per source)

Fix #1859

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch 2 times, most recently from 2294465 to e54312b Compare July 11, 2025 02:21
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch 2 times, most recently from 783a53d to 13b6142 Compare July 28, 2025 13:18
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch 2 times, most recently from 4572a3b to fc5755d Compare August 12, 2025 20:22
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from fc5755d to cf41b60 Compare August 22, 2025 16:41
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch 2 times, most recently from 8fbdf5c to 1e83f8d Compare September 5, 2025 08:26
@rafaellehmkuhl
Copy link
Member Author

As noticed by @joaoantoniocardoso: we are missing a protocol field in the suggestions. Without it, we are registering based solely on IDs, which could (could?) cause conflicts between different protocols.

@joaoantoniocardoso
Copy link
Member

Hi @rafaellehmkuhl, when I was implementing the API on my extension, I noticed that this implementation is using camelCase convention for the fields, which differs from the external widgets (see ExternalWidgetSetupInfo), and it is using kebab-case for the enum variants, which also differs from the external widgets (see WidgetType or MiniWidgetType).

It would be good if we could agree to stick to a convention for the entire cockpit_extras API.

@joaoantoniocardoso
Copy link
Member

I added the joystick mapping using the current API to the Radcam Manager (current master), and it showed on Cockpit (only when it's running on BlueOS, and not locally, because of some CORS thing).

However, the mapped actions seem to be conflicting with already existing ones, somehow creating this oscillatory behavior when I click them (see it on the graphs):

mapped_buttons_are_fighting_each_other.mp4

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch 2 times, most recently from 10fa754 to 817c625 Compare November 3, 2025 23:09
@rafaellehmkuhl
Copy link
Member Author

Hi @rafaellehmkuhl, when I was implementing the API on my extension, I noticed that this implementation is using camelCase convention for the fields, which differs from the external widgets (see ExternalWidgetSetupInfo), and it is using kebab-case for the enum variants, which also differs from the external widgets (see WidgetType or MiniWidgetType).

It would be good if we could agree to stick to a convention for the entire cockpit_extras API.

Fixed the usage of camelCase in the API. It is all in snake_case now.

The enums will have to stay as they are for historical purposes, otherwise we would break already-stablished APIs.

@joaoantoniocardoso
Copy link
Member

Hi @rafaellehmkuhl, when I was implementing the API on my extension, I noticed that this implementation is using camelCase convention for the fields, which differs from the external widgets (see ExternalWidgetSetupInfo), and it is using kebab-case for the enum variants, which also differs from the external widgets (see WidgetType or MiniWidgetType).
It would be good if we could agree to stick to a convention for the entire cockpit_extras API.

Fixed the usage of camelCase in the API. It is all in snake_case now.

The enums will have to stay as they are for historical purposes, otherwise we would break already-stablished APIs.

Okay, but you could also make a parser that normalizes the old format to a new format, keeping backward compatibility while updating to this new uniform style.

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from 817c625 to 5c90d3c Compare November 5, 2025 14:04
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from 5c90d3c to be5d574 Compare November 14, 2025 21:01
@rafaellehmkuhl rafaellehmkuhl marked this pull request as ready for review November 14, 2025 21:01
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from be5d574 to c4a0434 Compare November 14, 2025 21:04
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from c4a0434 to 823690d Compare November 15, 2025 03:37
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from 823690d to ddad784 Compare November 15, 2025 04:01
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-importing-joystick-maps branch from ddad784 to cae6adb Compare November 15, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow BlueOS extensions to offer mapping for specific joystick buttons

2 participants