-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge fly view and joystick custom actions in a single backend
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.
- Loading branch information
1 parent
9075aec
commit d799372
Showing
25 changed files
with
332 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Custom Mavlink Action | ||
|
||
Both the Fly View and Joysticks support the ability execute arbitrary mavlink commands to the active vehicle. In the Fly View these will show up in the Toolstrip Action list. With Joysticks you can assign then to button presses. | ||
|
||
## Custom Actions File | ||
|
||
The custom actions available are defined in a JSON file. The format of that file is as follows: | ||
|
||
''' | ||
{ | ||
"version": 1, | ||
"fileType": "CustomActions", | ||
"actions": | ||
[ | ||
{ | ||
"label": "First Command", | ||
"description": "This is the first command", | ||
"mavCmd": 10, | ||
"compId": 100, | ||
"param1": 1, | ||
"param2": 2, | ||
... | ||
}, | ||
{ | ||
"label": "Second Command", | ||
"description": "This is the second command", | ||
"mavCmd": 20, | ||
... | ||
} | ||
] | ||
} | ||
''' | ||
|
||
Fields: | ||
* actions (required) - An array of json objects, one for each command | ||
* label (required) - The user visible short description for the command. This is used as the button text for the Fly View - Actions command list. For Joysticks, this is the command you select from the dropdown. For Joysticks, make sure your name doesn't conflict with the built in names. | ||
* description (required) - This is a longer description of the command used in the Fly View - Action list. This is not used by joysticks. | ||
* mavCmd (required) - The command id of the mavlink command you want to send. | ||
* compId (options) - The component id for where you want to send the command to. If not specified `MAV_COMP_ID_AUTOPILOT1` is used. | ||
* param1 thru param7 (optional) - The parameters for the command. Parameters which are not specified will default to 0.0 | ||
|
||
Custom action files should be located in the CustomActions directory of the QGC save location. For example on Linux that would be `~/Documents/QGroundControl/CustomActions` or `~/Documents/QGroundControl Daily/CustomActions`. The Fly View and Joysticks each have there own custom actions files: | ||
* Fly View - FlyViewCustomActions.json | ||
* Joystick - JoystickCustomActions.json | ||
|
||
When you start up QGC it will load these files if they exist and make the commands available for use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.