d1ff5c495be11b28a0864113de251aa222a2f441
1 use crate::{a770
, corsair_vengeance
, rgb
, sensors_jiji
, winring0
, AsusAuraUSB
};
4 fn set_color(&mut self, color
: &rgb
::RGB
);
5 fn get_gpu_tmp(&self) -> f32;
6 fn get_cpu_tmp(&self) -> f32;
9 pub struct MachineJiji
{
10 ram
: Vec
<corsair_vengeance
::Controller
>,
11 b650e_device
: AsusAuraUSB
::Device
,
13 sensors
: sensors_jiji
::Sensors
,
17 pub fn new() -> Self {
18 let api
= hidapi
::HidApi
::new().unwrap();
19 let machine
= MachineJiji
{
21 corsair_vengeance
::Controller
::new(0x19),
22 corsair_vengeance
::Controller
::new(0x1B),
24 b650e_device
: AsusAuraUSB
::Device
::new(&api
, AsusAuraUSB
::Motherboard
::Asus650e
),
25 a770
: a770
::A770
::new(),
26 sensors
: sensors_jiji
::Sensors
::new(),
28 machine
.b650e_device
.set_fixed_mode();
33 impl Machine
for MachineJiji
{
34 fn set_color(&mut self, color
: &rgb
::RGB
) {
35 for controller
in &self.ram
{
36 controller
.set_color(&color
);
38 self.b650e_device
.set_color(&color
);
39 self.a770
.set_color(color
.red
, color
.green
, color
.blue
);
41 fn get_gpu_tmp(&self) -> f32 {
42 self.sensors
.read_gpu_temp()
45 fn get_cpu_tmp(&self) -> f32 {
46 self.sensors
.read_cpu_temp()
50 struct MachineLyssMetal {}