alienrgb 0.1.0

A library for Alienware RGB Controller device communication
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use alienrgb::{AnimationSub, Commands, Elc};

fn main() {
    let animation_id: u16 = std::env::var("ANIMATION_ID")
        .unwrap_or("1".to_owned())
        .parse()
        .unwrap_or(1);
    let mut elc = Elc::new();
    play(&mut elc, animation_id).unwrap();
}

fn play(elc: &mut Elc, id: u16) -> Result<(), rusb::Error> {
    let command = Commands::Animation(AnimationSub::Play, id);
    let status = elc.execute(&command)?;
    println!("{command:#?}:\n{status:#?}");
    Ok(())
}