This commit is contained in:
zvecr
2022-09-26 18:09:36 +01:00
parent 76a45a4e24
commit 1dbb4c0f96
12 changed files with 359 additions and 8 deletions
+9 -1
View File
@@ -7,7 +7,7 @@ from milc import cli
from qmk.keyboard import render_layout
from qmk.xap.common import get_xap_keycodes
from xap_client import XAPClient, XAPEventType, XAPSecureStatus
from xap_client import XAPClient, XAPEventType, XAPSecureStatus, XAPConfigRgblight
KEYCODE_MAP = get_xap_keycodes('latest')
@@ -187,6 +187,14 @@ class XAPShell(cmd.Cmd):
print('^C')
return False
def do_dump(self, line):
ret = self.device.transaction(b'\x06\x03\x03')
ret = XAPConfigRgblight.from_bytes(ret)
print(ret)
ret = self.device.int_transaction(b'\x06\x03\x02')
print(f'XAPEffectRgblight(enabled={bin(ret)})')
@cli.argument('-v', '--verbose', arg_only=True, action='store_true', help='Turns on verbose output.')
@cli.argument('-d', '--device', help='device to select - uses format <pid>:<vid>.')