projects
/
temp2RGB.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove A770 for MachineJiji
[temp2RGB.git]
/
src
/
machine.rs
diff --git
a/src/machine.rs
b/src/machine.rs
index
9d150db
..
ac60e72
100644
(file)
--- a/
src/machine.rs
+++ b/
src/machine.rs
@@
-2,7
+2,8
@@
use log::error;
use nvapi::sys::i2c;
use crate::{
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;
};
const RGB_FUSION2_GPU_REG_COLOR: u8 = 0x40;
@@
-19,8
+20,9
@@
pub trait Machine {
pub struct MachineJiji {
ram: Vec<corsair_vengeance::Controller>,
b650e_device: asus_aura_usb::Device,
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 {
}
impl MachineJiji {
@@
-32,8
+34,9
@@
impl MachineJiji {
corsair_vengeance::Controller::new(0x1B),
],
b650e_device: asus_aura_usb::Device::new(&api, asus_aura_usb::Motherboard::Asus650e)?,
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()?,
})
}
}
})
}
}
@@
-44,13
+47,16
@@
impl Machine for MachineJiji {
controller.set_color(&color);
}
self.b650e_device.set_color(&color);
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 {
}
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 {
}
fn get_cpu_tmp(&self) -> f32 {
@@
-58,13
+64,13
@@
impl Machine for MachineJiji {
}
}
}
}
-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,
pub struct MachineLyssMetal {
crosshair_device: asus_aura_usb::Device,