staldates / av-control

AV control system for St Aldates, using AVX as a base. (Formerly the UI side of the aldatesx project.)
1 stars 1 forks source link

Control cameras using a joystick #23

Closed jamesremuscat closed 7 years ago

jamesremuscat commented 7 years ago

This PR adds the ability to use a connected joystick to control pan, tilt and zoom of cameras.

The joystick device should be specified with the -j or --joystick command-line option to avcontrol.py.

Default mappings from axis values to VISCA speeds are linear and can be overridden by providing map_pan, map_tilt and/or map_zoom functions to the CameraJoystickAdapter constructor. These functions should always return legal VISCA speed values (e.g 1 <= retval <= VISCA_MAX) even when zero pan or tilt is required. It's likely that we'll want to change the defaults to something nonlinear as the default functions make the joystick somewhat sensitive.

Closes #4. Relates to (and possibly obsoletes?) #20.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.3%) to 87.464% when pulling fe61c2a8fb6fe8e4c232161b16eb725430b8ff4e on feature/joystick-control into f05d30ebc593faa815a56506ef036f91cf340baa on develop.