Commits

Craig Swank committed 32889b3

fixed mux in poller.py for bbb

  • Participants
  • Parent commits c9487ee

Comments (0)

Files changed (1)

gadgets/io/poller.py

             self._timeout = -1
 
     def _setup_pin(self, pin):
-        mux = pin['mux']
+        mux = pin.get('mux')
         export = pin['export']
         self._path = self._base_path.format(export, 'value')
-        self._write_to_path('27', self._mux_path.format(mux))
+        if mux:
+            self._write_to_path('27', self._mux_path.format(mux))
         self._write_to_path(str(export), self._export_path)
         self._write_to_path('in', self._base_path.format(export, 'direction'))
         self._write_to_path(self._edge, self._base_path.format(export, 'edge'))