smallneuron 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {smallneuron-1.0.1/src/smallneuron.egg-info → smallneuron-1.0.2}/PKG-INFO +1 -1
- {smallneuron-1.0.1 → smallneuron-1.0.2}/pyproject.toml +1 -1
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/smallneuron.py +28 -26
- {smallneuron-1.0.1 → smallneuron-1.0.2/src/smallneuron.egg-info}/PKG-INFO +1 -1
- {smallneuron-1.0.1 → smallneuron-1.0.2}/.gitignore +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/LICENSE +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/README.md +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/example.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/setup.cfg +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/__init__.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/build +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/gpio_h3.c +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/gpio_h3.h +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/gpio_h3.so +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/logger.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/sndummy.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/sngpio.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/snhttp.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/sninput.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/snmqtt.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/snserial.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron/sntimer.py +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron.egg-info/SOURCES.txt +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron.egg-info/dependency_links.txt +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron.egg-info/top_level.txt +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron_pelainux.egg-info/PKG-INFO +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron_pelainux.egg-info/SOURCES.txt +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron_pelainux.egg-info/dependency_links.txt +0 -0
- {smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron_pelainux.egg-info/top_level.txt +0 -0
|
@@ -309,9 +309,7 @@ class SnWatcher():
|
|
|
309
309
|
except Exception as e:
|
|
310
310
|
log.error(e)
|
|
311
311
|
log.error(traceback.format_exc())
|
|
312
|
-
|
|
313
|
-
exit(1)
|
|
314
|
-
|
|
312
|
+
|
|
315
313
|
log.debug("SnWatcher.run done")
|
|
316
314
|
return True
|
|
317
315
|
log.debug("SnWatcher.run fail")
|
|
@@ -319,30 +317,34 @@ class SnWatcher():
|
|
|
319
317
|
|
|
320
318
|
def _check(self, args):
|
|
321
319
|
log.debug("SnWatcher._check loop start",args)
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
self.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
320
|
+
try:
|
|
321
|
+
[bridge,args,mode, period] = args
|
|
322
|
+
while not self.stop:
|
|
323
|
+
resp=bridge.check(**args)
|
|
324
|
+
|
|
325
|
+
# Si la respuesta no es un dict
|
|
326
|
+
# creamos uno con la respuesta como data
|
|
327
|
+
if type(resp) != dict:
|
|
328
|
+
data=resp
|
|
329
|
+
resp={"data":data}
|
|
330
|
+
|
|
331
|
+
if self.event_pattern == None or re.search(self.event_pattern, resp["data"]) != None:
|
|
332
|
+
self.em.putEvent(self.event, dict(self.event_args,**resp))
|
|
333
|
+
log.info("SnWatcher trigger", self.event_args)
|
|
334
|
+
if mode=="match":
|
|
335
|
+
log.debug("SnWatcher._check loop exit, match")
|
|
336
|
+
return
|
|
337
|
+
|
|
338
|
+
if mode=="noloop" :
|
|
339
|
+
log.debug("SnWatcher._check loop exit, noloop")
|
|
337
340
|
return
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
log.debug("SnWatcher._check loop exit, stop")
|
|
341
|
+
|
|
342
|
+
# default mode is loop
|
|
343
|
+
sleep(period)
|
|
344
|
+
log.debug("SnWatcher._check loop exit, stop")
|
|
345
|
+
except Exception as e:
|
|
346
|
+
log.error(e)
|
|
347
|
+
log.error(traceback.format_exc())
|
|
346
348
|
|
|
347
349
|
def stop(self):
|
|
348
350
|
self.stop=True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{smallneuron-1.0.1 → smallneuron-1.0.2}/src/smallneuron_pelainux.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|