diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2013-10-16 01:22:25 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2013-10-16 01:22:25 (GMT) |
commit | 1bd020d21533f928d0c8b6d48ac04d66f6a1aee4 (patch) | |
tree | 3d57253255fe998d7535b3336613178f595a5813 /pybot/drivers/pnp.py | |
parent | 52fd3338d859c3b4084c74ca068d8ee045cae110 (diff) |
Diffstat (limited to 'pybot/drivers/pnp.py')
-rw-r--r-- | pybot/drivers/pnp.py | 11 |
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] |