mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Begin implementing virtual devices for testing and stuff
This commit is contained in:
@@ -15,7 +15,6 @@ use rog_anime::usb::{get_anime_type, pkt_for_flush, pkts_for_init};
|
||||
use rog_anime::{ActionData, AnimeDataBuffer, AnimePacketType, AnimeType};
|
||||
use rog_platform::hid_raw::HidRaw;
|
||||
use rog_platform::supported::AnimeSupportedFunctions;
|
||||
use rog_platform::usb_raw::USBRaw;
|
||||
|
||||
use self::config::{AnimeConfig, AnimeConfigCached};
|
||||
use crate::error::RogError;
|
||||
@@ -30,7 +29,7 @@ impl GetSupported for CtrlAnime {
|
||||
}
|
||||
|
||||
pub struct CtrlAnime {
|
||||
node: USBRaw,
|
||||
node: HidRaw,
|
||||
anime_type: AnimeType,
|
||||
cache: AnimeConfigCached,
|
||||
config: AnimeConfig,
|
||||
@@ -43,8 +42,8 @@ pub struct CtrlAnime {
|
||||
impl CtrlAnime {
|
||||
#[inline]
|
||||
pub fn new(config: AnimeConfig) -> Result<CtrlAnime, Box<dyn Error>> {
|
||||
let node = USBRaw::new(0x193b)?;
|
||||
let anime_type = get_anime_type()?;
|
||||
let node = HidRaw::new("193b")?;
|
||||
let anime_type = get_anime_type().unwrap_or(AnimeType::GA401);
|
||||
|
||||
info!("Device has an AniMe Matrix display");
|
||||
let mut cache = AnimeConfigCached::default();
|
||||
|
||||
Reference in New Issue
Block a user