Fix ally power config

This commit is contained in:
Luke D. Jones
2024-09-03 12:45:07 +12:00
parent 27ed95bd3e
commit c5c46738ee
2 changed files with 6 additions and 8 deletions

View File

@@ -275,13 +275,11 @@ impl CtrlKbdLed {
pub(super) fn fix_ally_power(&mut self) -> Result<(), RogError> { pub(super) fn fix_ally_power(&mut self) -> Result<(), RogError> {
if self.led_type == AuraDeviceType::Ally { if self.led_type == AuraDeviceType::Ally {
if let LEDNode::Rog(_, hid_raw) = &self.led_node { if let LEDNode::Rog(_, hid_raw) = &self.led_node {
if let Some(fix) = self.config.ally_fix.as_mut() { if self.config.ally_fix.is_none() {
if !*fix { let msg = [0x5d, 0xbd, 0x01, 0xff, 0xff, 0xff, 0xff];
let msg = [0x5d, 0xbd, 0x01, 0xff, 0xff, 0xff, 0xff]; hid_raw.write_bytes(&msg)?;
hid_raw.write_bytes(&msg)?; info!("Reset Ally power settings to base");
info!("Reset Ally power settings to base"); self.config.ally_fix = Some(true);
}
*fix = true;
} }
self.config.write(); self.config.write();
} }

View File

@@ -2,7 +2,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-08-30 09:32+0000\n" "POT-Creation-Date: 2024-08-30 23:16+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"