Tämä sivusto toimii paremmin JavaScriptillä.
Etusivu
Tutki
Apua
Rekisteröidy
Kirjaudu sisään
michal
/
craftbeerpi3
peilaus alkaen
https://github.com/Manuel83/craftbeerpi3
Tarkkaile
1
Äänestä
0
Fork
0
Koodi
Ongelmat
0
Julkaisut
2
Wiki
Activity
Selaa lähdekoodia
Add actor_power to Controller
tags/3.1_alpha
Manuel83
8 vuotta sitten
vanhempi
167a0bb8f8
commit
26da7c66bc
2 muutettua tiedostoa
jossa
9 lisäystä
ja
0 poistoa
Jaettu näkymä
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
modules/base_plugins/hysteresis/__init__.py
+6
-0
modules/core/controller.py
+ 3
- 0
modules/base_plugins/hysteresis/__init__.py
Näytä tiedosto
@@ -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
Näytä tiedosto
@@ -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):
Write
Preview
Loading…
Peruuta
Tallenna