Releasing a hat button did not lead to _executeButtonAction being called with BUTTON_UP. This adds the hat buttons to lastBbuttonValues, such that the button-up transitions for hat buttons are recorded.
- Allows operator to close/open the gripper using a button assigned
- Rename Gripper Grab/Release into Close/Open for clarity
- Add comments regarding Gripper functionality
In case when you would like to bind some MAV commands
to some joystick's buttons, you can now create a json file
which will be parsed at runtime.
It is usefull when you need to send a custom command from the joystick.
But this command is not supported by the firmware, or not relevant to be included to QGC.
Example:
Create a file JoystickMavCommands.json and place it with a binary:
"commands": [
{
"id": 31010,
"name": "Enable Autonomy",
"param1": 1.0
}
]
After executing the QGC, you will be able to bind "Enable Autonomy" to a button,
by clicking to the button, MAV_CMD_USER_1 (31010) with param1 1.0 will be sent.
If there is no json file, nothing will happen.
This fixes a pure virtual method call exception during exit when a joystick
is connected.
The problem was that ~Joystick() waited for the thread to exit, while the
thread called the virtual method _close(). But at this point the destructor
of the derived class (JoystickSDL in my case) was already called.
To resolve the problem a separate stop() method is added that is called
before deleting the object.
Support up to 64 buttons, not limit to 16
Send a single button command and not a stream of commands at 25Hz
Send button commands through signals (it's coming from a different thread)
Hide gimbal support through analog channels (there are no MAVLink messages to handle it)
Some digital joysticks have already this correction
Add habilit to add or removecircle correction
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>