62,620
社区成员
发帖
与我相关
我的任务
分享

缓存40度之前的温度
public void openAndCloseFans(float curTempreture){
if (curTempreture < 40.0){
close(1,2,3);
}else if (curTempreture > 50.0){
close(2);
open(1,3);
}else{
if (isClosed(1))
open(2);
}else{
close(2);
}
}
}
---------------------------------------------
温度 | < 40 | 40 ~ 50 | > 50 |
---------------------------------------------
上升过程| 关1,2,3 | 开2,关1,3 | 开1,3,关2 |
---------------------------------------------
下降过程| 关1,2,3 | 开1,3,关2 | 开1,3,关2 |
不是很简单么?