Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a12166615 | ||
|
|
d0fd799aeb |
No files matched your search
@@ -1 +1 @@
|
||||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.1"
|
||||
+10
-6
@@ -62,7 +62,8 @@ class Transport:
|
||||
deadline = time.monotonic() + timeout
|
||||
while (left := deadline - time.monotonic()) > 0:
|
||||
resp = self.dev.read(left)
|
||||
if resp and resp[0] == pkt[0] and resp[1] == pkt[1]:
|
||||
# Replies carry the target as an index (0x08 -> 0, 0x09 -> 1) and echo the command.
|
||||
if resp and resp[0] == pkt[0] & 0x07 and resp[1] == pkt[1]:
|
||||
return resp
|
||||
raise DeviceError(f"no response to {pkt[:4].hex(' ')}")
|
||||
|
||||
@@ -256,11 +257,14 @@ class DeviceService:
|
||||
self._h = _Handles(transport, notify, Keyboard(transport, target), receiver)
|
||||
self._set(receiver=True, wireless=wireless, error="")
|
||||
if receiver:
|
||||
try:
|
||||
self._set(receiver_firmware=receiver.firmware(), serial=self._paired_serial())
|
||||
receiver.set_mode(bragi.MODE_SOFTWARE)
|
||||
except DeviceError as e:
|
||||
log.warning("receiver init: %s", e)
|
||||
# Software mode first: the receiver refuses the pairing list in hardware mode.
|
||||
for step in (lambda: receiver.set_mode(bragi.MODE_SOFTWARE),
|
||||
lambda: self._set(receiver_firmware=receiver.firmware()),
|
||||
lambda: self._set(serial=self._paired_serial())):
|
||||
try:
|
||||
step()
|
||||
except DeviceError as e:
|
||||
log.warning("receiver init: %s", e)
|
||||
self._init_keyboard()
|
||||
return True
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Louis <[email protected]>
|
||||
pkgname=k65studio
|
||||
pkgver=0.1.0
|
||||
pkgver=0.1.1
|
||||
pkgrel=1
|
||||
pkgdesc="Beleuchtung, Spielmodus, Akku und Profile für die Corsair K65 PLUS Wireless"
|
||||
arch=('any')
|
||||
|
||||
Reference in new issue
Block a user