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

Allow setting the value of data-lake variables with joystick buttons #1656

Merged

Conversation

rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Feb 4, 2025

This works for both boolean and floating buttons, so one can use trigger/bumper buttons as well.

Fix #1657

@rafaellehmkuhl rafaellehmkuhl force-pushed the joystick-in-the-data-lake branch from 2ed4d66 to cd4cd55 Compare February 4, 2025 19:07
@ES-Alexander
Copy link
Contributor

I haven't had a chance to test yet, but if this triggers on both press and release of buttons, it could be relevant to #1475 :-)

@rafaellehmkuhl
Copy link
Member Author

I haven't had a chance to test yet, but if this triggers on both press and release of buttons, it could be relevant to #1475 :-)

Totally doable with this new architecture. The one reading the variable has full control on the implementation.

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature is awesome and the code looks fine.

  • I was able to assign a button to a variable and its pressing was reflected on the data-lake variable value, as you can see on the spikes (graphic on the left).

  • The association was also available to the axis, though, I wasn't able to see the value from an analog axis reflected on the variable.
    I successfully assigned the same variable to the axis 2, but moving it generated only zeros. (The graphic sliding on its X axis is axis 2 adding zeros on the data-lake variable.)

Should the association be available to the analog axis too?

Screenshare.-.2025-02-05.11_17_56.AM.mp4

@rafaellehmkuhl
Copy link
Member Author

rafaellehmkuhl commented Feb 5, 2025

  • I was able to assign a button to a variable and its pressing was reflected on the data-lake variable value, as you can see on the spikes (graphic on the left).

On which data-lake variable? If it's the cockpit-memory-usage or the application-fps, it is normal, as the data-lake uses system resources, as expected.

  • The association was also available to the axis, though, I wasn't able to see the value from an analog axis reflected on the variable.
    I successfully assigned the same variable to the axis 2, but moving it generated only zeros. (The graphic sliding on its X axis is axis 2 adding zeros on the data-lake variable.)

Should the association be available to the analog axis too?

No, this PR is meant only to add the feature to buttons for now, but a new one extending it to axis is on progress.

@ES-Alexander
Copy link
Contributor

I haven't had a chance to test yet, but if this triggers on both press and release of buttons, it could be relevant to #1475 :-)

Totally doable with this new architecture. The one reading the variable has full control on the implementation.

Nice!
I expect #1539 could make this more practical to users, along with options 3/4 and the subsequent comments in #1538.

@rafaellehmkuhl
Copy link
Member Author

rafaellehmkuhl commented Feb 5, 2025

I haven't had a chance to test yet, but if this triggers on both press and release of buttons, it could be relevant to #1475 :-)

Totally doable with this new architecture. The one reading the variable has full control on the implementation.

Nice! I expect #1539 could make this more practical to users, along with options 3/4 and the subsequent comments in #1538.

I actually have this functionality ready in another branch. I'm just waiting for this PR and another one (that will open after this one) to open the one that adds triggers.

I didn't want to put everything in the same to make the review easier/faster and also to make all changes clear in the changelog.

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you said that there is another PR coming very soon that binds axes to data-lake variables, it's ok to keep this function enabled on this merge.

@rafaellehmkuhl rafaellehmkuhl merged commit a6d3a66 into bluerobotics:master Feb 6, 2025
11 checks passed
@rafaellehmkuhl rafaellehmkuhl deleted the joystick-in-the-data-lake branch February 6, 2025 16:03
@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-needed Change needs to be documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow joystick buttons to be used in the data-lake
3 participants