summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD6
-rwxr-xr-xfixcontroller.py7
4 files changed, 12 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8d6115411f5..fe5f0f9f47e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = xbox-generic-controller
pkgdesc = Fix for generic XBox-like USB gamepads that are recognized but not functional
- pkgver = 0.1.0
+ pkgver = 0.1.1
pkgrel = 1
url = https://gitlab.com/ryanobeirne/xbox-generic-controller
arch = any
@@ -9,12 +9,13 @@ pkgbase = xbox-generic-controller
depends = python>=3
depends = python-pyusb
depends = xboxdrv
+ depends = python-systemd
source = xbox-generic-controller.conf
source = 50_xbox-generic-controller.rules
source = fixcontroller.py
sha256sums = bdc54ef5b9728751f89f08039c69141f7515b9df723cbda1df0239c5109d249b
sha256sums = ecb8c515f1b88fe4986eec098bd6863c459c39fd569d759884936e39d22d586b
- sha256sums = e9f41812137b2cdcf60bc47cc59a5ef5f23e3c467fa6f841b5d20f9abe30797a
+ sha256sums = b618d4286f7c70e2f02fce495cc7ba34ac31ad4a3350dd45387a81313bcad78d
pkgname = xbox-generic-controller
diff --git a/.gitignore b/.gitignore
index e9648f0f430..994124e386e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
pkg/
src/
+xbox-generic-controller-*.tar.*z \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index aa1608506f3..c7cd7e02904 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Ryan O'Beirne <ryanobeirne@gmail.com>
pkgname=xbox-generic-controller
-pkgver=0.1.0
+pkgver=0.1.1
pkgrel=1
pkgdesc="Fix for generic XBox-like USB gamepads that are recognized but not functional"
arch=("any")
url="https://gitlab.com/ryanobeirne/xbox-generic-controller"
license=('MIT')
-depends=("systemd" "python>=3" "python-pyusb" "xboxdrv")
+depends=("systemd" "python>=3" "python-pyusb" "xboxdrv" "python-systemd")
source=(
$pkgname.conf
@@ -18,7 +18,7 @@ source=(
sha256sums=(
bdc54ef5b9728751f89f08039c69141f7515b9df723cbda1df0239c5109d249b
ecb8c515f1b88fe4986eec098bd6863c459c39fd569d759884936e39d22d586b
- e9f41812137b2cdcf60bc47cc59a5ef5f23e3c467fa6f841b5d20f9abe30797a
+ b618d4286f7c70e2f02fce495cc7ba34ac31ad4a3350dd45387a81313bcad78d
)
package() {
diff --git a/fixcontroller.py b/fixcontroller.py
index 24e48edaf30..54cf89d335c 100755
--- a/fixcontroller.py
+++ b/fixcontroller.py
@@ -3,10 +3,13 @@
# https://gist.github.com/dnmodder/de2df973323b7c6acf45f40dc66e8db3
import usb.core
+import systemd.journal
dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)
if dev is None:
- raise ValueError('Device not found')
+ systemd.journal.send('XBox generic controller not found', SYSLOG_IDENTIFIER='xbox-generic-controller')
+ raise ValueError('Device not found')
else:
- dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)
+ dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)
+ systemd.journal.send('XBox generic controller found and fixed', SYSLOG_IDENTIFIER='xbox-generic-controller')