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

Merge fly view and joystick custom actions in a single backend #11207

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

DonLakeFlyer
Copy link
Contributor

@DonLakeFlyer DonLakeFlyer commented Mar 6, 2024

Currently the Fly View and Joysticks have support for defining and executing arbitrary mavlink commands. Right now those are two different systems which work differently and use different file formats/location. This pull combines the two into a single backend which works the same way for both.

Changes:

  • Custom action json files are always loaded from the CustomActions directory of the normal QGC save path.
  • The Fly View loads the file named FlyViewCustomActions.json
  • The Joysticks load the file named JoystickCustomActions.json
  • None of the above things are configurable
  • The existence of the files are optional
  • Updated the user guide docs to explain how it works as well as the file format for the json file

Change in function from before:

  • There is no longer a setting to turn off Fly View custom actions. If you don't want them don't put the file there.
  • There is no longer a setting to specify the Fly View custom actions file
  • The thinking is that was unnecessary additional complexity which doesn't add much benefit

ToDo:

  • Warn the user who was doing it the old way that it has changed and they will need to update their files/locations.

Related to #11205

@DonLakeFlyer DonLakeFlyer marked this pull request as draft March 6, 2024 21:00
@DonLakeFlyer
Copy link
Contributor Author

DonLakeFlyer commented Mar 6, 2024

@nexton-winjeel FYI: As to whether to change to not allow filename setting is a problem?

@nexton-winjeel
Copy link
Contributor

nexton-winjeel commented Mar 6, 2024

FYI: As to whether to change to not allow filename setting is a problem?

@DonLakeFlyer: It won't break anything, but it will be an annoyance. The reason we have the ability to select different files from the UI was so that we can use the one GCS setup for multiple vehicle configs, and quickly swap between custom actions if we change the active vehicle.

@DonLakeFlyer
Copy link
Contributor Author

Hmm, that's a reasonable use case. I'll put back the ability to switch files.

@DonLakeFlyer
Copy link
Contributor Author

Updates:

  • You can pick the Fly View and Joystick action file from Fly View Settings
  • User is warned about needing to redo their custom actions settings
Screenshot 2024-03-07 at 10 34 32 AM

@DonLakeFlyer
Copy link
Contributor Author

@nexton-winjeel Can you help with testing this?

The custom actions files are now hardwired to be loaded from the CustomActions save path location. The files uses can be set from Fly View Settings.
@nexton-winjeel
Copy link
Contributor

@nexton-winjeel Can you help with testing this?

@DonLakeFlyer: I pulled the Linux AppImage from https://github.com/mavlink/qgroundcontrol/actions/runs/8197777789/artifacts/1308087842. Confirmed:

  • can load and use custom JSON for Fly View;
  • can load and use custom JSON for Joystick;
  • can change custom JSON at runtime for Fly View; and
  • can change custom JSON at runtime for Joystick.

One thing I did note: The description field is now required, whereas previously it was optional. The description field isn't used by the Joystick side, so may force users to enter an unused field in their custom files.

@DonLakeFlyer
Copy link
Contributor Author

The description field isn't used by the Joystick side, so may force users to enter an unused field in their custom files.

Yeah, that's slightly odd. But I wanted the files to be shareable between joystick and fly. Seems useful to just use a single file for both.

@DonLakeFlyer DonLakeFlyer marked this pull request as ready for review March 8, 2024 17:17
@DonLakeFlyer DonLakeFlyer merged commit 9c3105b into master Mar 8, 2024
12 checks passed
@DonLakeFlyer DonLakeFlyer deleted the CustomActions branch March 8, 2024 17:17
@ivanzivotic
Copy link
Contributor

@DonLakeFlyer thanks for this update. Just a note, I think there is a mistake in the docs/en/SUMMARY.md path, causing the docs website to break when trying to open the custom actions tab. Namely, there is an extra '(' at the link start and missing 's' in the filename before the .md extension

@DonLakeFlyer
Copy link
Contributor Author

@ivanzivotic Thanks for letting me know: #11246

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.

3 participants