Permalink
Browse files

Add dump script to pull PID responses into a json fixture

  • Loading branch information...
1 parent 5dfe703 commit 9ce951ee5e2f845370ce46e27e790d1b63627202 @djs committed Aug 19, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 dump.py
View
23 dump.py
@@ -0,0 +1,23 @@
+import elm
+import obdii
+import sys
+import time
+import json
+
+def main():
+ port = sys.argv[1]
+
+ adapter = elm.Elm(port)
+ data = {}
+ adapter.send_control_command('H1')
+
+ for pid in range(0, 0xe0):
+ response = adapter.send('01%2.2x' % pid)
+ data['%2.2x' % pid] = response
+
+ print json.dumps(data, sort_keys=True, indent=4)
+
+
+
+if __name__ == '__main__':
+ main()

0 comments on commit 9ce951e

Please sign in to comment.