smallneuron 2.4.16__tar.gz → 2.4.18__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.
Files changed (29) hide show
  1. {smallneuron-2.4.16/src/smallneuron.egg-info → smallneuron-2.4.18}/PKG-INFO +1 -1
  2. {smallneuron-2.4.16 → smallneuron-2.4.18}/example.py +1 -0
  3. {smallneuron-2.4.16 → smallneuron-2.4.18}/pyproject.toml +1 -1
  4. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/smallneuron.py +6 -1
  5. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/sninput.py +5 -5
  6. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/snwatcher.py +2 -2
  7. {smallneuron-2.4.16 → smallneuron-2.4.18/src/smallneuron.egg-info}/PKG-INFO +1 -1
  8. {smallneuron-2.4.16 → smallneuron-2.4.18}/.gitignore +0 -0
  9. {smallneuron-2.4.16 → smallneuron-2.4.18}/LICENSE +0 -0
  10. {smallneuron-2.4.16 → smallneuron-2.4.18}/README.md +0 -0
  11. {smallneuron-2.4.16 → smallneuron-2.4.18}/setup.cfg +0 -0
  12. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/__init__.py +0 -0
  13. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/build +0 -0
  14. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/gpio_h3.c +0 -0
  15. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/gpio_h3.h +0 -0
  16. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/gpio_h3.so +0 -0
  17. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/logger.py +0 -0
  18. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/sndummy.py +0 -0
  19. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/sngpio.py +0 -0
  20. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/snmqtt.py +0 -0
  21. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/snserial.py +0 -0
  22. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron/sntimer.py +0 -0
  23. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron.egg-info/SOURCES.txt +0 -0
  24. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron.egg-info/dependency_links.txt +0 -0
  25. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron.egg-info/top_level.txt +0 -0
  26. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron_pelainux.egg-info/PKG-INFO +0 -0
  27. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron_pelainux.egg-info/SOURCES.txt +0 -0
  28. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron_pelainux.egg-info/dependency_links.txt +0 -0
  29. {smallneuron-2.4.16 → smallneuron-2.4.18}/src/smallneuron_pelainux.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smallneuron
3
- Version: 2.4.16
3
+ Version: 2.4.18
4
4
  Summary: Small Neuron Workflow
5
5
  Author-email: Andres Artigas <andres@artigas.cl>
6
6
  License-Expression: MIT
@@ -8,6 +8,7 @@ from snmqtt import SnMqtt
8
8
  from sntkinter import SnTkinter
9
9
  from snserial import SnSerial, serial
10
10
 
11
+
11
12
  ##########################
12
13
  # system core and bridges definitions
13
14
  #
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "smallneuron"
7
- version = "2.4.16"
7
+ version = "2.4.18"
8
8
  license = "MIT"
9
9
  description = "Small Neuron Workflow"
10
10
  readme = "README.md"
@@ -191,7 +191,12 @@ class EventManager:
191
191
  tooltip = 'labeltooltip="' + ttfmt(desc) + '" tooltip="' + ttfmt(desc) + '"'
192
192
 
193
193
  if bold_event == event and state_from == self.prevState and state_to == self.currentState:
194
- args = " " + json.dumps(self.currentArgs).replace('"', '\\"')
194
+ args="ERR"
195
+ try :
196
+ args = " " + json.dumps(self.currentArgs).replace('"', '\\"')
197
+ except:
198
+ pass
199
+
195
200
  f.write(
196
201
  '"%s" -> "%s" [ label = "%s" fontcolor="red" %s ]\n'
197
202
  % (state_from, state_to, event + args, tooltip)
@@ -55,9 +55,9 @@ class SnInput:
55
55
 
56
56
  #log.debug("SnInput read pid:", threading.get_native_id())
57
57
  while True:
58
- log.debug("open")
58
+ #log.debug("open")
59
59
  with open(FIFO) as fifo:
60
- log.debug("open")
60
+ #log.debug("open")
61
61
  data = fifo.read()
62
62
  log.debug("read:", data)
63
63
  if len(data) != 0:
@@ -66,11 +66,11 @@ class SnInput:
66
66
  data = data.strip()
67
67
  p = data.find(" ")
68
68
  if p == -1:
69
- log.info("SnInput event:", data)
69
+ #log.info("SnInput event:", data)
70
70
  self.eventManager.putEvent(data)
71
71
  else:
72
- log.debug("SnInput event:",data[:p])
73
- log.debug("SnInput args:",data[p:])
72
+ #log.debug("SnInput event:",data[:p])
73
+ #log.debug("SnInput args:",data[p:])
74
74
  try:
75
75
  args = json.loads(data[p:])
76
76
  self.eventManager.putEvent(data[:p], args)
@@ -83,10 +83,10 @@ class SnWatcher():
83
83
  if self.event_pattern == None or re.search(self.event_pattern, resp["value"]) != None:
84
84
  self.em.putEvent(self.event, dict(self.event_params,**resp),self.event_valid_until)
85
85
  if mode=="match":
86
- log.debug( "Watcher MATCH trigger, tid ",threading.get_native_id(), self.event_params)
86
+ log.debug( f'Watcher MATCH trigger, tid {threading.get_native_id()}, params {self.event_params}, pattern {self.event_pattern}, value {resp["value"]}' )
87
87
  break
88
88
  else:
89
- log.debug( "Watcher LOOP trigger , tid ",threading.get_native_id(), self.event_params)
89
+ log.debug( f'Watcher LOOP trigger, tid {threading.get_native_id()}, params {self.event_params}, pattern {self.event_pattern}, value {resp["value"]}' )
90
90
 
91
91
  if mode=="noloop" :
92
92
  log.debug( "Watcher NOLOOP end, tid ",threading.get_native_id())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smallneuron
3
- Version: 2.4.16
3
+ Version: 2.4.18
4
4
  Summary: Small Neuron Workflow
5
5
  Author-email: Andres Artigas <andres@artigas.cl>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes