use nvapi::sys::i2c;
use crate::{
- a770, asus_aura_usb, corsair_lighting_pro, corsair_vengeance, cpu_temperature, intel_arc, rgb,
+ /*a770,*/ asus_aura_usb, corsair_lighting_pro, corsair_vengeance, cpu_temperature,
+ intel_arc, rgb,
};
const RGB_FUSION2_GPU_REG_COLOR: u8 = 0x40;
pub struct MachineJiji {
ram: Vec<corsair_vengeance::Controller>,
b650e_device: asus_aura_usb::Device,
- a770: a770::A770,
- gpu_devices: intel_arc::Devices,
+ // a770: a770::A770,
+ // gpu_devices: intel_arc::Devices,
+ gpus: Vec<nvapi::PhysicalGpu>,
}
impl MachineJiji {
corsair_vengeance::Controller::new(0x1B),
],
b650e_device: asus_aura_usb::Device::new(&api, asus_aura_usb::Motherboard::Asus650e)?,
- a770: a770::A770::new()?,
- gpu_devices: unsafe { intel_arc::GetDevices() },
+ // a770: a770::A770::new()?,
+ // gpu_devices: unsafe { intel_arc::GetDevices() },
+ gpus: nvapi::PhysicalGpu::enumerate()?,
})
}
}
controller.set_color(&color);
}
self.b650e_device.set_color(&color);
- if let Err(error) = self.a770.set_color(color.red, color.green, color.blue) {
- error!("Unable to set color: {:?}", error);
- }
+ // if let Err(error) = self.a770.set_color(color.red, color.green, color.blue) {
+ // error!("Unable to set color: {:?}", error);
+ // }
}
fn get_gpu_tmp(&self) -> f32 {
- unsafe { intel_arc::GetTemperature(self.gpu_devices, 0) as f32 }
+ // unsafe { intel_arc::GetTemperature(self.gpu_devices, 0) as f32 }
+ self.gpus[0].thermal_settings(None).unwrap()[0]
+ .current_temperature
+ .0 as f32
}
fn get_cpu_tmp(&self) -> f32 {
}
}
-impl Drop for MachineJiji {
- fn drop(&mut self) {
- unsafe {
- intel_arc::FreeDevices(self.gpu_devices);
- }
- }
-}
+// impl Drop for MachineJiji {
+// fn drop(&mut self) {
+// unsafe {
+// intel_arc::FreeDevices(self.gpu_devices);
+// }
+// }
+// }
pub struct MachineLyssMetal {
crosshair_device: asus_aura_usb::Device,