--- /dev/null
+use crate::{corsair_vengeance, cpu_temperature, rgb};
+
+use super::Machine;
+
+pub struct Mshroom {
+ ram: Vec<corsair_vengeance::Controller>,
+}
+
+impl Mshroom {
+ pub fn new() -> anyhow::Result<Self> {
+ let machine = Self {
+ ram: vec![
+ corsair_vengeance::Controller::new(0x19),
+ corsair_vengeance::Controller::new(0x1B),
+ ],
+ };
+
+ Ok(machine)
+ }
+}
+
+impl Machine for Mshroom {
+ fn set_color_1(&mut self, color: &rgb::Rgb) -> anyhow::Result<()> {
+ for controller in &self.ram {
+ controller.set_color(color);
+ }
+ Ok(())
+ }
+
+ fn set_color_2(&mut self, color: &rgb::Rgb) -> anyhow::Result<()> {
+ Ok(())
+ } // No color 2.
+
+ fn get_gpu_tmp(&self) -> f32 {
+ // unsafe { intel_arc::GetTemperature(self.gpu_devices, 0) as f32 }
+ // self.gpus[0].thermal_settings(None).unwrap()[0]
+ // .current_temperature
+ // .0 as f32
+ 0.
+ }
+
+ fn get_cpu_tmp(&self) -> f32 {
+ cpu_temperature::read()
+ }
+}
machine::lyss_metal2::MachineLyssMetal2::new()
.expect("Unable to create MachineLyssMetal2"),
),
+ settings::MachineName::Mshroom => {
+ Box::new(machine::mshroom::Mshroom::new().expect("Unable to create Mshroom"))
+ }
};
let mut kernel = [0f32; consts::KERNEL_SIZE_SAMPLES];
Jiji,\r
LyssMetal,\r
LyssMetal2,\r
+ Mshroom,\r
}\r
\r
#[derive(Debug, Deserialize, Serialize)]\r
impl Settings {\r
fn default() -> Self {\r
Settings {\r
- machine_name: MachineName::Jiji,\r
+ machine_name: MachineName::Mshroom,\r
cold_color_1: Rgb {\r
red: 0,\r
green: 255,\r