Update readme, slash configs

This commit is contained in:
Luke D. Jones
2025-01-12 17:36:10 +13:00
parent 2123f369ad
commit 128bc3fce1
113 changed files with 1545 additions and 1305 deletions

View File

@@ -23,7 +23,7 @@ pub const FAN_CURVE_ZBUS_PATH: &str = "/xyz/ljones";
pub struct FanCurveConfig {
pub profiles: FanCurveProfiles,
#[serde(skip)]
pub current: u8,
pub current: u8
}
impl StdConfig for FanCurveConfig {
@@ -47,7 +47,7 @@ impl StdConfigLoad for FanCurveConfig {}
#[derive(Debug, Clone)]
pub struct CtrlFanCurveZbus {
config: Arc<Mutex<FanCurveConfig>>,
platform: RogPlatform,
platform: RogPlatform
}
// Non-zbus-derive impl
@@ -69,7 +69,7 @@ impl CtrlFanCurveZbus {
for this in [
ThrottlePolicy::Balanced,
ThrottlePolicy::Performance,
ThrottlePolicy::Quiet,
ThrottlePolicy::Quiet
] {
// For each profile we need to switch to it before we
// can read the existing values from hardware. The ACPI method used
@@ -93,7 +93,7 @@ impl CtrlFanCurveZbus {
return Ok(Self {
config: Arc::new(Mutex::new(config)),
platform,
platform
});
}
@@ -108,7 +108,7 @@ impl CtrlFanCurveZbus {
async fn set_fan_curves_enabled(
&mut self,
profile: ThrottlePolicy,
enabled: bool,
enabled: bool
) -> zbus::fdo::Result<()> {
self.config
.lock()
@@ -130,7 +130,7 @@ impl CtrlFanCurveZbus {
&mut self,
profile: ThrottlePolicy,
fan: FanCurvePU,
enabled: bool,
enabled: bool
) -> zbus::fdo::Result<()> {
self.config
.lock()
@@ -149,7 +149,7 @@ impl CtrlFanCurveZbus {
/// Get the fan-curve data for the currently active ThrottlePolicy
async fn fan_curve_data(
&mut self,
profile: ThrottlePolicy,
profile: ThrottlePolicy
) -> zbus::fdo::Result<Vec<CurveData>> {
let curve = self
.config
@@ -166,7 +166,7 @@ impl CtrlFanCurveZbus {
async fn set_fan_curve(
&mut self,
profile: ThrottlePolicy,
curve: CurveData,
curve: CurveData
) -> zbus::fdo::Result<()> {
self.config
.lock()
@@ -256,7 +256,7 @@ impl CtrlTask for CtrlFanCurveZbus {
.profiles
.write_profile_curve_to_platform(
profile.into(),
&mut find_fan_curve_node().unwrap(),
&mut find_fan_curve_node().unwrap()
)
.map_err(|e| warn!("write_profile_curve_to_platform, {}", e))
.ok();