mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Reformat with trailing comma
This commit is contained in:
@@ -10,7 +10,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
usb_node = Some(node);
|
||||
println!("Looked for keyboard controller 0x{}: Found", id);
|
||||
}
|
||||
Err(err) => println!("Looked for keyboard controller: {err}")
|
||||
Err(err) => println!("Looked for keyboard controller: {err}"),
|
||||
}
|
||||
|
||||
if usb_node.is_none() {
|
||||
@@ -24,7 +24,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
let x_stable = 2107;
|
||||
@@ -72,7 +72,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
node.write_bytes(&packet)?;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
];
|
||||
node.write_bytes(&packet)?;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
usb_node = Some(node);
|
||||
println!("Looked for keyboard controller 0x{}: Found", id);
|
||||
}
|
||||
Err(err) => println!("Looked for keyboard controller: {err}")
|
||||
Err(err) => println!("Looked for keyboard controller: {err}"),
|
||||
}
|
||||
|
||||
if usb_node.is_none() {
|
||||
@@ -24,31 +24,31 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
// node.write_bytes(&[0x5a, 0xd1, 0x0a, 0x01])?; // TODO: need to CHECK
|
||||
println!("Set mouse mode for 10 seconds");
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x03
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x03,
|
||||
])?;
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x0f, 0x20
|
||||
0x5a, 0xd1, 0x0f, 0x20,
|
||||
])?;
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x00
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x00,
|
||||
])?;
|
||||
sleep(Duration::from_secs(10));
|
||||
|
||||
println!("Set wasd mode for 10 seconds");
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x02
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x02,
|
||||
])?;
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x0f, 0x20
|
||||
0x5a, 0xd1, 0x0f, 0x20,
|
||||
])?;
|
||||
sleep(Duration::from_secs(10));
|
||||
|
||||
println!("Set back to gamepad mode");
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x01
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x01,
|
||||
])?;
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x0f, 0x20
|
||||
0x5a, 0xd1, 0x0f, 0x20,
|
||||
])?;
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -10,7 +10,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
usb_node = Some(node);
|
||||
println!("Looked for keyboard controller 0x{}: Found", id);
|
||||
}
|
||||
Err(err) => println!("Looked for keyboard controller: {err}")
|
||||
Err(err) => println!("Looked for keyboard controller: {err}"),
|
||||
}
|
||||
|
||||
if usb_node.is_none() {
|
||||
@@ -22,13 +22,13 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
// node.write_bytes(&[0x5a, 0xd1, 0x0a, 0x01])?; // TODO: need to CHECK
|
||||
println!("Set mouse mode for 10 seconds");
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x03
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x03,
|
||||
])?;
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x0f, 0x20
|
||||
0x5a, 0xd1, 0x0f, 0x20,
|
||||
])?;
|
||||
node.write_bytes(&[
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x00
|
||||
0x5a, 0xd1, 0x01, 0x01, 0x00,
|
||||
])?;
|
||||
// sleep(Duration::from_secs(10));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user