Compare commits
No commits in common. "main" and "v0.1.5" have entirely different histories.
5 changed files with 9 additions and 30 deletions
|
@ -176,7 +176,6 @@ class Application(models.AppInterface):
|
|||
systimecfg.set_system_timezone(tz, self.cfg.cmd_set_timezone)
|
||||
|
||||
def start(self):
|
||||
"""Starte die Anwendung"""
|
||||
logging.info('Starting application')
|
||||
self._running = True
|
||||
self.io.start()
|
||||
|
@ -186,7 +185,6 @@ class Application(models.AppInterface):
|
|||
self.grpc_server.start()
|
||||
|
||||
def stop(self):
|
||||
"""Stoppe die Anwendung"""
|
||||
logging.info('Stopping application')
|
||||
self._running = False
|
||||
self.grpc_server.stop(None)
|
||||
|
|
|
@ -238,7 +238,7 @@ class _MCP23017Device:
|
|||
Beispiel: ``0x27/B0`` (MCP23017 mit I2C-Adresse 0x27, Pin B0)
|
||||
|
||||
Um den Zustand eines Geräts zu invertieren, einfach ``/!``
|
||||
an den Konfigurationsstring anfügen: ``0x27/B0/!``
|
||||
an den Konfiguraionsstring anfügen: ``0x27/B0/!``
|
||||
|
||||
:param cfg_str: Konfigurationsstring
|
||||
:return: Neues ``_MCP23017Device``-Objekt
|
||||
|
|
|
@ -96,10 +96,6 @@ class Job:
|
|||
)
|
||||
|
||||
def validate(self, app: 'AppInterface'):
|
||||
"""
|
||||
Prüfe, ob der Task gültige Daten enthält
|
||||
(Zonen existieren, Bewässerungszeit > 0)
|
||||
"""
|
||||
if not self.zones:
|
||||
raise util.InvalidInputException('No zones set')
|
||||
if self.duration < 1:
|
||||
|
|
|
@ -129,20 +129,9 @@ class StoppableThread(threading.Thread):
|
|||
pass
|
||||
|
||||
def run_cycle(self):
|
||||
"""
|
||||
Führe einen Durchlauf des Threads aus.
|
||||
|
||||
Diese Funktion darf nicht blockieren, sonst kann der
|
||||
Thread nicht gestoppt werden.
|
||||
"""
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Führe die ``run_cycle()``-Funktion in
|
||||
Endlosschleife aus, mit einer durch das
|
||||
``interval``-Attribut bestimmten Verzögerung zwischen
|
||||
den Durchläufen.
|
||||
"""
|
||||
try:
|
||||
self.setup()
|
||||
|
||||
|
@ -157,10 +146,6 @@ class StoppableThread(threading.Thread):
|
|||
sys.excepthook(*sys.exc_info())
|
||||
|
||||
def stop(self):
|
||||
"""
|
||||
Stoppe den Thread und warte bis er beendet. Dies dauert
|
||||
maximal ``interval`` + Durchlaufzeit von ``run_cycle()``.
|
||||
"""
|
||||
self._stop_signal.set()
|
||||
try:
|
||||
self.join()
|
||||
|
|
Loading…
Add table
Reference in a new issue