Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pybot/drivers/pnp.py
diff options
context:
space:
mode:
Diffstat (limited to 'pybot/drivers/pnp.py')
-rw-r--r--pybot/drivers/pnp.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/pybot/drivers/pnp.py b/pybot/drivers/pnp.py
index 3457126..24d6dcd 100644
--- a/pybot/drivers/pnp.py
+++ b/pybot/drivers/pnp.py
@@ -1,11 +1,8 @@
RD_VERSION = 0x00
-f1 = {
- 'name': 'getVersion',
- 'call': RD_VERSION,
- 'params': 0,
- 'read': 3
-}
+def getVersion(dev):
+ dev.send([RD_VERSION])
+ raw = dev.read(3)
+ return raw[1] + raw[2] * 256
-FUNCTIONS = [f1]