mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Safely index modes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
/target
|
/target
|
||||||
|
vendor.tar.xz
|
||||||
@@ -5,13 +5,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.11.1] - 2020-11-06
|
||||||
### Changed
|
### Changed
|
||||||
- Use DBUS_NAME instead of DBUS_IFACE when requesting the name
|
- Use DBUS_NAME instead of DBUS_IFACE when requesting the name
|
||||||
- Give different names for the bytearray arguments so that pydbus is not confused
|
- Give different names for the bytearray arguments so that pydbus is not confused
|
||||||
- Add org.freedesktop.DBus.Method.NoReply annotations
|
- Add org.freedesktop.DBus.Method.NoReply annotations
|
||||||
- Remove dbus reply for multizone writes
|
- Remove dbus reply for multizone writes
|
||||||
|
- Move led_writer to a main loop due to strange mpsc behaviour, this combined with
|
||||||
|
mpsc channels offers a more reactive app
|
||||||
|
- Small fix for unreported mode indexing issue
|
||||||
|
|
||||||
## [0.11.0] - 2020-09-05
|
## [0.11.0] - 2020-09-06
|
||||||
### BREAKING CHANGE
|
### BREAKING CHANGE
|
||||||
- Many of the RGB built-in modes have been renamed to match Armory-Crate names,
|
- Many of the RGB built-in modes have been renamed to match Armory-Crate names,
|
||||||
this means that the `/etc/rogcore.conf` needs to be removed so it can be
|
this means that the `/etc/rogcore.conf` needs to be removed so it can be
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -716,7 +716,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog-daemon"
|
name = "rog-daemon"
|
||||||
version = "0.11.0"
|
version = "0.11.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dbus",
|
"dbus",
|
||||||
"dbus-tokio",
|
"dbus-tokio",
|
||||||
|
|||||||
@@ -222,4 +222,5 @@ Mozilla Public License 2 (MPL-2.0)
|
|||||||
- [flukejones](https://github.com/flukejones/), project maintainer.
|
- [flukejones](https://github.com/flukejones/), project maintainer.
|
||||||
- [tuxuser](https://github.com/tuxuser/)
|
- [tuxuser](https://github.com/tuxuser/)
|
||||||
- [aspann](https://github.com/aspann)
|
- [aspann](https://github.com/aspann)
|
||||||
|
- [meumeu](https://github.com/Meumeu)
|
||||||
- Anyone missed? Please contact me
|
- Anyone missed? Please contact me
|
||||||
12
debian/changelog
vendored
12
debian/changelog
vendored
@@ -1,3 +1,15 @@
|
|||||||
|
rog-core (0.11.1) focal; urgency=medium
|
||||||
|
|
||||||
|
* Use DBUS_NAME instead of DBUS_IFACE when requesting the name
|
||||||
|
* Give different names for the bytearray arguments so that pydbus is not confused
|
||||||
|
* Add org.freedesktop.DBus.Method.NoReply annotations
|
||||||
|
* Remove dbus reply for multizone writes
|
||||||
|
* Move led_writer to a main loop due to strange mpsc behaviour, this combined with
|
||||||
|
mpsc channels offers a more reactive app
|
||||||
|
* Small fix for unreported mode indexing issue
|
||||||
|
|
||||||
|
-- Luke Jones <luke@ljones.dev> Thu, 11 Jun 2020 20:57:56 +1200
|
||||||
|
|
||||||
rog-core (0.11.0) focal; urgency=medium
|
rog-core (0.11.0) focal; urgency=medium
|
||||||
|
|
||||||
* BREAKING CHANGE:
|
* BREAKING CHANGE:
|
||||||
|
|||||||
35
reverse_eng/ga401/hid_desc_consumer_GA401IV_GA401IV.md
Normal file
35
reverse_eng/ga401/hid_desc_consumer_GA401IV_GA401IV.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
|
||||||
|
0x09, 0x06, // Usage (Keyboard)
|
||||||
|
0xA1, 0x01, // Collection (Application)
|
||||||
|
0x85, 0x09, // Report ID (9)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x95, 0x08, // Report Count (8)
|
||||||
|
0x05, 0x07, // Usage Page (Kbrd/Keypad)
|
||||||
|
0x19, 0xE0, // Usage Minimum (0xE0)
|
||||||
|
0x29, 0xE7, // Usage Maximum (0xE7)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x25, 0x01, // Logical Maximum (1)
|
||||||
|
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x95, 0x08, // Report Count (8)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x95, 0x05, // Report Count (5)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x05, 0x08, // Usage Page (LEDs)
|
||||||
|
0x19, 0x01, // Usage Minimum (Num Lock)
|
||||||
|
0x29, 0x05, // Usage Maximum (Kana)
|
||||||
|
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0x95, 0x01, // Report Count (1)
|
||||||
|
0x75, 0x03, // Report Size (3)
|
||||||
|
0x91, 0x03, // Output (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0x95, 0xF0, // Report Count (-16)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x05, 0x07, // Usage Page (Kbrd/Keypad)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x29, 0xEF, // Usage Maximum (0xEF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x25, 0x01, // Logical Maximum (1)
|
||||||
|
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0xC0, // End Collection
|
||||||
|
|
||||||
|
// 65 bytes
|
||||||
77
reverse_eng/ga401/hid_desc_keyboad_GA401IV_GA401IV.md
Normal file
77
reverse_eng/ga401/hid_desc_keyboad_GA401IV_GA401IV.md
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
0x06, 0x31, 0xFF, // Usage Page (Vendor Defined 0xFF31)
|
||||||
|
0x09, 0x76, // Usage (0x76)
|
||||||
|
0xA1, 0x01, // Collection (Application)
|
||||||
|
0x85, 0x5A, // Report ID (90)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x05, // Report Count (5)
|
||||||
|
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x3F, // Report Count (63)
|
||||||
|
0xB1, 0x00, // Feature (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0xC0, // End Collection
|
||||||
|
0x05, 0x0C, // Usage Page (Consumer)
|
||||||
|
0x09, 0x01, // Usage (Consumer Control)
|
||||||
|
0xA1, 0x01, // Collection (Application)
|
||||||
|
0x85, 0x02, // Report ID (2)
|
||||||
|
0x19, 0x00, // Usage Minimum (Unassigned)
|
||||||
|
0x2A, 0x3C, 0x02, // Usage Maximum (AC Format)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0x3C, 0x02, // Logical Maximum (572)
|
||||||
|
0x75, 0x10, // Report Size (16)
|
||||||
|
0x95, 0x02, // Report Count (2)
|
||||||
|
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0xC0, // End Collection
|
||||||
|
0x06, 0x31, 0xFF, // Usage Page (Vendor Defined 0xFF31)
|
||||||
|
0x09, 0x79, // Usage (0x79)
|
||||||
|
0xA1, 0x01, // Collection (Application)
|
||||||
|
0x85, 0x5D, // Report ID (93)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x1F, // Report Count (31)
|
||||||
|
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x3F, // Report Count (63)
|
||||||
|
0x91, 0x00, // Output (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x3F, // Report Count (63)
|
||||||
|
0xB1, 0x00, // Feature (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0xC0, // End Collection
|
||||||
|
0x06, 0x31, 0xFF, // Usage Page (Vendor Defined 0xFF31)
|
||||||
|
0x09, 0x80, // Usage (0x80)
|
||||||
|
0xA1, 0x01, // Collection (Application)
|
||||||
|
0x85, 0x5E, // Report ID (94)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x05, // Report Count (5)
|
||||||
|
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x95, 0x3F, // Report Count (63)
|
||||||
|
0xB1, 0x00, // Feature (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0xC0, // End Collection
|
||||||
|
|
||||||
43
reverse_eng/ga401/hid_desc_other_GA401IV_GA401IV.md
Normal file
43
reverse_eng/ga401/hid_desc_other_GA401IV_GA401IV.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
|
||||||
|
0x09, 0x06, // Usage (Keyboard)
|
||||||
|
0xA1, 0x01, // Collection (Application)
|
||||||
|
0x85, 0x01, // Report ID (1)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x95, 0x08, // Report Count (8)
|
||||||
|
0x05, 0x07, // Usage Page (Kbrd/Keypad)
|
||||||
|
0x19, 0xE0, // Usage Minimum (0xE0)
|
||||||
|
0x29, 0xE7, // Usage Maximum (0xE7)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x25, 0x01, // Logical Maximum (1)
|
||||||
|
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x95, 0x01, // Report Count (1)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x95, 0x05, // Report Count (5)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x05, 0x08, // Usage Page (LEDs)
|
||||||
|
0x19, 0x01, // Usage Minimum (Num Lock)
|
||||||
|
0x29, 0x05, // Usage Maximum (Kana)
|
||||||
|
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0x95, 0x01, // Report Count (1)
|
||||||
|
0x75, 0x03, // Report Size (3)
|
||||||
|
0x91, 0x03, // Output (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
|
||||||
|
0x95, 0x06, // Report Count (6)
|
||||||
|
0x75, 0x08, // Report Size (8)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
|
0x05, 0x07, // Usage Page (Kbrd/Keypad)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x2A, 0xFF, 0x00, // Usage Maximum (0xFF)
|
||||||
|
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0x95, 0xC0, // Report Count (-64)
|
||||||
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x05, 0x07, // Usage Page (Kbrd/Keypad)
|
||||||
|
0x19, 0x00, // Usage Minimum (0x00)
|
||||||
|
0x29, 0xEF, // Usage Maximum (0xEF)
|
||||||
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
|
0x25, 0x01, // Logical Maximum (1)
|
||||||
|
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||||
|
0xC0, // End Collection
|
||||||
|
|
||||||
|
// 83 bytes
|
||||||
129
reverse_eng/ga401/lsusb_GA401IV_GA401IV.md
Normal file
129
reverse_eng/ga401/lsusb_GA401IV_GA401IV.md
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
Bus 003 Device 002: ID 0b05:1866 ASUSTek Computer, Inc. N-KEY Device
|
||||||
|
Device Descriptor:
|
||||||
|
bLength 18
|
||||||
|
bDescriptorType 1
|
||||||
|
bcdUSB 2.00
|
||||||
|
bDeviceClass 0
|
||||||
|
bDeviceSubClass 0
|
||||||
|
bDeviceProtocol 0
|
||||||
|
bMaxPacketSize0 64
|
||||||
|
idVendor 0x0b05 ASUSTek Computer, Inc.
|
||||||
|
idProduct 0x1866
|
||||||
|
bcdDevice 0.02
|
||||||
|
iManufacturer 1 ASUSTeK Computer Inc.
|
||||||
|
iProduct 2 N-KEY Device
|
||||||
|
iSerial 0
|
||||||
|
bNumConfigurations 1
|
||||||
|
Configuration Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 2
|
||||||
|
wTotalLength 0x005b
|
||||||
|
bNumInterfaces 3
|
||||||
|
bConfigurationValue 1
|
||||||
|
iConfiguration 0
|
||||||
|
bmAttributes 0xe0
|
||||||
|
Self Powered
|
||||||
|
Remote Wakeup
|
||||||
|
MaxPower 100mA
|
||||||
|
Interface Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 4
|
||||||
|
bInterfaceNumber 0
|
||||||
|
bAlternateSetting 0
|
||||||
|
bNumEndpoints 1
|
||||||
|
bInterfaceClass 3 Human Interface Device
|
||||||
|
bInterfaceSubClass 1 Boot Interface Subclass
|
||||||
|
bInterfaceProtocol 1 Keyboard
|
||||||
|
iInterface 3 (error)
|
||||||
|
HID Device Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 33
|
||||||
|
bcdHID 1.10
|
||||||
|
bCountryCode 0 Not supported
|
||||||
|
bNumDescriptors 1
|
||||||
|
bDescriptorType 34 Report
|
||||||
|
wDescriptorLength 83
|
||||||
|
Report Descriptors:
|
||||||
|
** UNAVAILABLE **
|
||||||
|
Endpoint Descriptor:
|
||||||
|
bLength 7
|
||||||
|
bDescriptorType 5
|
||||||
|
bEndpointAddress 0x81 EP 1 IN
|
||||||
|
bmAttributes 3
|
||||||
|
Transfer Type Interrupt
|
||||||
|
Synch Type None
|
||||||
|
Usage Type Data
|
||||||
|
wMaxPacketSize 0x0040 1x 64 bytes
|
||||||
|
bInterval 1
|
||||||
|
Interface Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 4
|
||||||
|
bInterfaceNumber 1
|
||||||
|
bAlternateSetting 0
|
||||||
|
bNumEndpoints 1
|
||||||
|
bInterfaceClass 3 Human Interface Device
|
||||||
|
bInterfaceSubClass 1 Boot Interface Subclass
|
||||||
|
bInterfaceProtocol 1 Keyboard
|
||||||
|
iInterface 1 ASUSTeK Computer Inc.
|
||||||
|
HID Device Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 33
|
||||||
|
bcdHID 1.10
|
||||||
|
bCountryCode 0 Not supported
|
||||||
|
bNumDescriptors 1
|
||||||
|
bDescriptorType 34 Report
|
||||||
|
wDescriptorLength 65
|
||||||
|
Report Descriptors:
|
||||||
|
** UNAVAILABLE **
|
||||||
|
Endpoint Descriptor:
|
||||||
|
bLength 7
|
||||||
|
bDescriptorType 5
|
||||||
|
bEndpointAddress 0x82 EP 2 IN
|
||||||
|
bmAttributes 3
|
||||||
|
Transfer Type Interrupt
|
||||||
|
Synch Type None
|
||||||
|
Usage Type Data
|
||||||
|
wMaxPacketSize 0x0040 1x 64 bytes
|
||||||
|
bInterval 1
|
||||||
|
Interface Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 4
|
||||||
|
bInterfaceNumber 2
|
||||||
|
bAlternateSetting 0
|
||||||
|
bNumEndpoints 2
|
||||||
|
bInterfaceClass 3 Human Interface Device
|
||||||
|
bInterfaceSubClass 1 Boot Interface Subclass
|
||||||
|
bInterfaceProtocol 1 Keyboard
|
||||||
|
iInterface 1 ASUSTeK Computer Inc.
|
||||||
|
HID Device Descriptor:
|
||||||
|
bLength 9
|
||||||
|
bDescriptorType 33
|
||||||
|
bcdHID 1.10
|
||||||
|
bCountryCode 0 Not supported
|
||||||
|
bNumDescriptors 1
|
||||||
|
bDescriptorType 34 Report
|
||||||
|
wDescriptorLength 167
|
||||||
|
Report Descriptors:
|
||||||
|
** UNAVAILABLE **
|
||||||
|
Endpoint Descriptor:
|
||||||
|
bLength 7
|
||||||
|
bDescriptorType 5
|
||||||
|
bEndpointAddress 0x83 EP 3 IN
|
||||||
|
bmAttributes 3
|
||||||
|
Transfer Type Interrupt
|
||||||
|
Synch Type None
|
||||||
|
Usage Type Data
|
||||||
|
wMaxPacketSize 0x0040 1x 64 bytes
|
||||||
|
bInterval 1
|
||||||
|
Endpoint Descriptor:
|
||||||
|
bLength 7
|
||||||
|
bDescriptorType 5
|
||||||
|
bEndpointAddress 0x04 EP 4 OUT
|
||||||
|
bmAttributes 3
|
||||||
|
Transfer Type Interrupt
|
||||||
|
Synch Type None
|
||||||
|
Usage Type Data
|
||||||
|
wMaxPacketSize 0x0040 1x 64 bytes
|
||||||
|
bInterval 1
|
||||||
|
Device Status: 0x0001
|
||||||
|
Self Powered
|
||||||
7
reverse_eng/ga502/dmi_info
Normal file
7
reverse_eng/ga502/dmi_info
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cat /sys/class/dmi/id/product_name
|
||||||
|
ROG Zephyrus G15 GA502IU_GA502IU
|
||||||
|
cat /sys/class/dmi/id/product_family
|
||||||
|
ROG Zephyrus G15
|
||||||
|
cat /sys/class/dmi/id/board_name
|
||||||
|
GA502IU
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rog-daemon"
|
name = "rog-daemon"
|
||||||
version = "0.11.0"
|
version = "0.11.1"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["Luke <luke@ljones.dev>"]
|
authors = ["Luke <luke@ljones.dev>"]
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ impl Config {
|
|||||||
.unwrap_or_else(|_| panic!("Could not deserialise {}", CONFIG_PATH));
|
.unwrap_or_else(|_| panic!("Could not deserialise {}", CONFIG_PATH));
|
||||||
self = c;
|
self = c;
|
||||||
} else {
|
} else {
|
||||||
self =
|
self = toml::from_str(&buf)
|
||||||
toml::from_str(&buf).expect(&format!("Could not deserialise {}", CONFIG_PATH));
|
.unwrap_or_else(|_| panic!("Could not deserialise {}", CONFIG_PATH));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self
|
self
|
||||||
|
|||||||
@@ -238,14 +238,17 @@ where
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
async fn set_builtin(&self, config: &mut Config, index: usize) -> Result<(), AuraError> {
|
async fn set_builtin(&self, config: &mut Config, index: usize) -> Result<(), AuraError> {
|
||||||
let mode_next = config
|
if let Some(mode) = self.supported_modes.get(index) {
|
||||||
.builtin_modes
|
let mode_next = config
|
||||||
.get_field_from(self.supported_modes[index].into())
|
.builtin_modes
|
||||||
.ok_or(AuraError::NotSupported)?
|
.get_field_from(mode.to_owned().into())
|
||||||
.to_owned();
|
.ok_or(AuraError::NotSupported)?
|
||||||
println!("{:X?}", &mode_next);
|
.to_owned();
|
||||||
self.set_and_save(&mode_next, config).await?;
|
println!("{:X?}", &mode_next);
|
||||||
info!("Switched LED mode to {:#?}", self.supported_modes[index]);
|
self.set_and_save(&mode_next, config).await?;
|
||||||
Ok(())
|
info!("Switched LED mode to {:#?}", self.supported_modes[index]);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
Err(AuraError::NotSupported)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use rog_client::{
|
|||||||
AuraDbusWriter, LED_MSG_LEN,
|
AuraDbusWriter, LED_MSG_LEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
static VERSION: &str = "0.11.0";
|
static VERSION: &str = "0.11.1";
|
||||||
|
|
||||||
#[derive(Debug, Options)]
|
#[derive(Debug, Options)]
|
||||||
struct CLIStart {
|
struct CLIStart {
|
||||||
|
|||||||
Reference in New Issue
Block a user