Prior to this change, the device check was sending a vendor specific
command with wIndex and wValue both set to 0 every 50 ms. On some
systems, this was causing issues with the joystick flapping the state,
and reporting weird values from the stick, and generally sluggish
response.
This change uses the updated libx52 library which uses the hotplug
notification to determine if the device is connected, and should resolve
the issues seen.
Fixes#33
Prior to this change, if the clock thread is disabled, then
disconnecting and reconnecting the X52 device would cause the daemon to
not detect the transition. As a result, the daemon would stay in a state
where it thinks the device is still connected, and therefore, not
actually apply any of the saved configuration, until it received a
SIGHUP to refresh the configuration.
This change adds a routine that sends a dummy vendor command. This
vendor command does nothing on my X52 Pro (VID 06a3, PID 0762), but
serves as a check to see if the daemon can send vendor commands to the
device. If the device is indeed disconnected, then that is a sufficient
indicator to disable the update thread and re-enable the acquisition
thread.