Skip to content

Commit 12ce9d1

Browse files
committed
hal bridge -add pins for macros, change mdi command pin names
There is a distiction between macros and MDI command in Guis. Now how can call both - upto the gui to decide how to procede
1 parent 670c000 commit 12ce9d1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/hal/user_comps/hal_bridge.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,15 @@ def init_hal(self):
9393

9494
for i in self.INFO.MDI_COMMAND_DICT:
9595
LOG.debug('{} {}'.format(i,self.INFO.MDI_COMMAND_DICT.get(i)))
96-
self[i] = QHAL.newpin('macro-cmd-{}'.format(i),QHAL.HAL_BIT, QHAL.HAL_IN)
96+
self[i] = QHAL.newpin('ini-mdi-cmd-{}'.format(i),QHAL.HAL_BIT, QHAL.HAL_IN)
9797
self[i].pinValueChanged.connect(self.runMacroChanged)
9898

99+
for i in self.INFO.INI_MACROS:
100+
name = i.split()[0]
101+
LOG.debug('{} {}'.format(name,i))
102+
self[name] = QHAL.newpin('ini-macro-cmd-{}'.format(name),QHAL.HAL_BIT, QHAL.HAL_IN)
103+
self[name].pinValueChanged.connect(self.runMacroChanged)
104+
99105
QHAL.setUpdateRate(100)
100106
h.ready()
101107

0 commit comments

Comments
 (0)