mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Adjust dbus sleep for aura crate
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
use rog_aura::AnimatrixDbusWriter;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut writer = AnimatrixDbusWriter::new()?;
|
||||
const PANE1_PREFIX: [u8; 7] = [0x5e, 0xc0, 0x02, 0x01, 0x00, 0x73, 0x02];
|
||||
const PANE2_PREFIX: [u8; 7] = [0x5e, 0xc0, 0x02, 0x74, 0x02, 0x73, 0x02];
|
||||
|
||||
let mut send_buffer = [vec![0; 640], vec![0; 640]];
|
||||
fn main() {
|
||||
let mut writer = AnimatrixDbusWriter::new().unwrap();
|
||||
|
||||
loop {
|
||||
writer.write_image(&send_buffer)?;
|
||||
for brightness in 0..0xFF {
|
||||
let mut buffers = [vec![brightness; 640], vec![brightness; 640]];
|
||||
buffers[0][..7].copy_from_slice(&PANE1_PREFIX);
|
||||
buffers[0][..7].copy_from_slice(&PANE2_PREFIX);
|
||||
|
||||
//std::thread::sleep(std::time::Duration::from_millis(60));
|
||||
writer.write_image(&buffers).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user