mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Finalise anime matrix stuff. Many fixes
This commit is contained in:
@@ -23,16 +23,16 @@ pub enum AnimatrixCommand {
|
||||
//ReloadLast,
|
||||
}
|
||||
|
||||
pub struct AnimatrixWriter {
|
||||
pub struct AniMeWriter {
|
||||
handle: DeviceHandle<rusb::GlobalContext>,
|
||||
initialised: bool,
|
||||
}
|
||||
|
||||
impl AnimatrixWriter {
|
||||
impl AniMeWriter {
|
||||
#[inline]
|
||||
pub fn new() -> Result<AnimatrixWriter, Box<dyn Error>> {
|
||||
pub fn new() -> Result<AniMeWriter, Box<dyn Error>> {
|
||||
// We don't expect this ID to ever change
|
||||
let mut dev_handle = AnimatrixWriter::get_device(0x0b05, 0x193b).map_err(|err| {
|
||||
let mut dev_handle = AniMeWriter::get_device(0x0b05, 0x193b).map_err(|err| {
|
||||
error!("Could not get device handle: {:?}", err);
|
||||
err
|
||||
})?;
|
||||
@@ -53,7 +53,7 @@ impl AnimatrixWriter {
|
||||
err
|
||||
})?;
|
||||
|
||||
Ok(AnimatrixWriter {
|
||||
Ok(AniMeWriter {
|
||||
handle: dev_handle,
|
||||
initialised: false,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
animatrix_control::{AnimatrixCommand, AnimatrixWriter},
|
||||
animatrix_control::{AniMeWriter, AnimatrixCommand},
|
||||
config::Config,
|
||||
laptops::match_laptop,
|
||||
led_control::{AuraCommand, LedWriter},
|
||||
@@ -69,8 +69,8 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
// Possible Animatrix
|
||||
let mut animatrix_writer = None;
|
||||
if laptop.support_animatrix() {
|
||||
animatrix_writer = Some(AnimatrixWriter::new()?);
|
||||
info!("Device has an AniMatrix display");
|
||||
animatrix_writer = Some(AniMeWriter::new()?);
|
||||
info!("Device has an AniMe Matrix display");
|
||||
}
|
||||
|
||||
// Set up the mutexes
|
||||
|
||||
@@ -8,7 +8,7 @@ use rog_aura::{
|
||||
AuraDbusWriter, LED_MSG_LEN,
|
||||
};
|
||||
|
||||
static VERSION: &str = "0.9.9";
|
||||
static VERSION: &str = "0.10.0";
|
||||
|
||||
#[derive(Debug, Options)]
|
||||
struct CLIStart {
|
||||
|
||||
Reference in New Issue
Block a user