Support fan PWM settings #73
|
@ -54,7 +54,9 @@ impl FanCtrl {
|
||||||
FanCtrl {
|
FanCtrl {
|
||||||
fan,
|
fan,
|
||||||
available,
|
available,
|
||||||
fan_auto: true,
|
// do not enable auto mode by default,
|
||||||
|
// but allow to turn it on on customer's own risk
|
||||||
|
|||||||
|
fan_auto: hwrev.fan_auto_mode_available(),
|
||||||
k_a: DEFAULT_K_A,
|
k_a: DEFAULT_K_A,
|
||||||
k_b: DEFAULT_K_B,
|
k_b: DEFAULT_K_B,
|
||||||
k_c: DEFAULT_K_C,
|
k_c: DEFAULT_K_C,
|
||||||
|
@ -142,6 +144,12 @@ impl HWRev {
|
||||||
pub fn fan_available(&self) -> bool {
|
pub fn fan_available(&self) -> bool {
|
||||||
self.major == 2 && self.minor == 2
|
self.major == 2 && self.minor == 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn fan_auto_mode_available(&self) -> bool {
|
||||||
sb10q
commented
This poorly chosen name suggests that auto mode is not available at all. Rename to fan_default_auto or similar. This poorly chosen name suggests that auto mode is not available at all.
Rename to fan_default_auto or similar.
|
|||||||
|
// see https://github.com/sinara-hw/Thermostat/issues/115 and
|
||||||
|
// https://git.m-labs.hk/M-Labs/thermostat/issues/69#issuecomment-6464 for explanation
|
||||||
|
self.fan_available() && self.minor != 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
|
Loading…
Reference in New Issue
at user's own risk