使用 JavaScript能使本网站更好的工作。
首页
探索
帮助
注册
登录
michal
/
craftbeerpi3
镜像自地址
https://github.com/Manuel83/craftbeerpi3
关注
1
点赞
0
派生
0
代码
工单
0
版本发布
2
百科
动态
浏览代码
Add actor_power to Controller
tags/3.1_alpha
Manuel83
8 年前
父节点
167a0bb8f8
当前提交
26da7c66bc
共有
2 个文件被更改
,包括
9 次插入
和
0 次删除
分列视图
Diff 选项
显示统计
下载 Patch 文件
下载 Diff 文件
+3
-0
modules/base_plugins/hysteresis/__init__.py
+6
-0
modules/core/controller.py
+ 3
- 0
modules/base_plugins/hysteresis/__init__.py
查看文件
@@ -29,6 +29,9 @@ class Hysteresis(KettleController):
:return:
'''
while self.is_running():
self.actor_power(50)
if self.get_temp() < self.get_target_temp() - int(self.on):
self.heater_on(100)
elif self.get_temp() >= self.get_target_temp() - int(self.off):
+ 6
- 0
modules/core/controller.py
查看文件
@@ -17,6 +17,12 @@ class ActorController(object):
self.api.switch_actor_off(int(id))
@cbpi.try_catch(None)
def actor_power(self, power, id=None):
if id is None:
id = self.heater
self.api.actor_power(int(id), power)
class SensorController(object):
撰写
预览
正在加载...
取消
保存