On Sun, 8 Jun 2008 22:49:13 +0200
Georg Lutz <[EMAIL PROTECTED]> wrote:
[..]
> Wie ist das beim WBT-201? Hast Du ein spezielles Progamm unter Linux für
> die Einstellungen?
Zum Auslesen der Tracks unter Linux gibt es uebrigens auch
http://www.steffensiebert.de/soft/python/wintec_tools.html
was aber mit 64 Bit nicht ohne weiteres tut. Wenn man es etwas patched,
geht es wunderbar (diff im Anhang).
Daniel
--- readlog.py 2007-06-06 23:08:21.000000000 +0200
+++ readlogFixed.py 2008-05-11 15:18:46.000000000 +0200
@@ -91,10 +91,10 @@
# 0x08-0x0b: Trackpoint count
# 0x0c-0x0f: Track duration in seconds
# 0x10-0x17: Track length as double
- f.write(struct.pack('l', tracknumber))
- f.write(struct.pack('l', trackvalues[0]))
- f.write(struct.pack('l', trackvalues[1]))
- f.write(struct.pack('l', trackvalues[2]))
+ f.write(struct.pack('i', tracknumber))
+ f.write(struct.pack('i', trackvalues[0]))
+ f.write(struct.pack('i', trackvalues[1]))
+ f.write(struct.pack('i', trackvalues[2]))
f.write(struct.pack('d', trackvalues[3]))
def writeHeader(f, devicename, deviceinfo, trackpointcount, footerpos, trackcount):
@@ -103,7 +103,7 @@
f.write(chr(0x00)+chr(0x00)+chr(0x80)+chr(0x3f))
f.write(chr(0x00)+chr(0x00)+chr(0x80)+chr(0x3f))
f.write(chr(0x41)+chr(0xbf)+chr(0x10)+chr(0x00))
- f.write(struct.pack('l', trackpointcount))
+ f.write(struct.pack('i', trackpointcount))
f.write(chr(0x00)+chr(0x00)+chr(0x00)+chr(0x00))
f.write(devicename)
writeBytes(f, chr(0), 20-len(devicename))
@@ -112,8 +112,8 @@
f.write('YYMM1234567890'+chr(0x00)+chr(0x00))
writeBytes(f, chr(0), 24)
f.write(time.strftime("%Y_%m_%d_%H:%M:%S", time.localtime()) +chr(0))
- f.write(struct.pack('l', footerpos))
- f.write(struct.pack('l', trackcount))
+ f.write(struct.pack('i', footerpos))
+ f.write(struct.pack('i', trackcount))
writeBytes(f, chr(0), 876)
def parseTracklog(data):
_______________________________________________
Talk-de mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk-de