Disable fan auto mode by default for Thermostat v2.2
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
069e178966
commit
83d5c28a67
|
@ -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 {
|
||||||
|
// 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