input: pxrc: new driver for PhoenixRC Flight Controller Adapter
Subsystems (4)
Marcus Folkesson
maintainerPATCH v2 1/1 input: pxrc: new driver for PhoenixRC Flight Controller Adapter
This driver let you plug in your RC controller to the adapter and use it as input device in various RC simulators.
Signed-off-by Marcus Folkesson <[email protected]>
---
v2:
- Change module license to GPLv2 to match SPDX tag
Documentation/input/devices/pxrc.rst | 57 ++++++++ drivers/input/joystick/Kconfig | 9 ++ drivers/input/joystick/Makefile | 1 + drivers/input/joystick/pxrc.c | 254 +++++++++++++++++++++++++++++++++++ 4 files changed, 321 insertions(+) create mode 100644 Documentation/input/devices/pxrc.rst create mode 100644 drivers/input/joystick/pxrc.c
Documentation/input/devices/pxrc.rst new file +57 -0
@@ -0,0 +1,57 @@ +======================================================= +pxrc - PhoenixRC Flight Controller Adapter +======================================================= + +:Author: Marcus Folkesson <[email protected]> + +This driver let you use your own RC controller plugged into the +adapter that comes with PhoenixRC [1]_ or other compatible adapters. + +The adapter supports 7 analog channels and 1 digital input switch. + +Notes +===== + +Many RC controllers is able to configure which stick goes to which channel. +This is also configurable in most simulators, so a matching is not necessary. + +The driver is generating the following input event for analog channels: + ++---------+----------------+ +| Channel | Event | ++=========+================+ +| 1 | ABS_X | ++---------+----------------+ +| 2 | ABS_Y | ++---------+----------------+ +| 3 | ABS_RX | ++---------+----------------+ +| 4 | ABS_RY | ++---------+----------------+ +| 5 | ABS_TILT_X | ++---------+----------------+ +| 6 | ABS_TILT_Y | ++---------+----------------+ +| 7 | ABS_THROTTLE | ++---------+----------------+ + +The digital input switch is generated as an `BTN_A` event. + +Manual Testing +============== + +To test this driver's functionality you may use `input-event` which is part of +the `input layer utilities` suite [2]_. + +For example:: + + > modprobe pxrc + > input-events <devnr> + +To print all input events from input `devnr`. + +References +========== + +.. [1] http://www.phoenix-sim.com/ +.. [2] https://www.kraxel.org/cgit/input/
drivers/input/joystick/Kconfig +9 -0
@@ -351,4 +351,13 @@ config JOYSTICK_PSXPAD_SPI_FF To drive rumble motor a dedicated power supply is required. +config JOYSTICK_PXRC + tristate "PhoenixRC Flight Controller Adapter" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you want to use the PhoenixRC Flight Controller Adapter. + + To compile this driver as a module, choose M here: the + module will be called pxrc. endif
drivers/input/joystick/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_JOYSTICK_JOYDUMP) += joydump.o obj-$(CONFIG_JOYSTICK_MAGELLAN) += magellan.o obj-$(CONFIG_JOYSTICK_MAPLE) += maplecontrol.o obj-$(CONFIG_JOYSTICK_PSXPAD_SPI) += psxpad-spi.o +obj-$(CONFIG_JOYSTICK_PXRC) += pxrc.o obj-$(CONFIG_JOYSTICK_SIDEWINDER) += sidewinder.o obj-$(CONFIG_JOYSTICK_SPACEBALL) += spaceball.o obj-$(CONFIG_JOYSTICK_SPACEORB) += spaceorb.o
drivers/input/joystick/pxrc.c new file +254 -0
254 lines not on this page · raw message
Signature · 1 line
2.15.1