diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-12-17 17:08:27 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-12-17 17:08:27 +0000 |
commit | 03999538fb7c55f59b62266703f3b1c9be339911 (patch) | |
tree | 11d4903965e7fd9ea796d55a68bf41d48a23e5da /gpscat.in | |
parent | 97998c438fdd52790775ed0d63f744f0ec3ce6f0 (diff) | |
download | gpsd-03999538fb7c55f59b62266703f3b1c9be339911.tar.gz |
Fix some Python import problems.
Diffstat (limited to 'gpscat.in')
-rw-r--r-- | gpscat.in | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3,13 +3,13 @@ # Display GPS output. Hexify it if necessary. # import os, sys, termios, select, getopt, curses.ascii -import gps.packet +import gps.packet as sniffer # The spec says 82, but some receivers (TN-200, GSW 2.3.2) output 86 characters NMEA_MAX = 86 # Lowest debug level at which packet getter begins to emit messages, minus one -BASELEVEL = gps.packet.LOG_IO +BASELEVEL = sniffer.LOG_IO highhalf_latch = True @@ -94,8 +94,8 @@ if __name__ == '__main__': buf = "" if not rawmode: - getter = gps.packet.new() - gps.packet.register_report(reporter) + getter = sniffer.new() + sniffer.register_report(reporter) seqno = 0 while True: (fd, event) = poller.poll()[0] @@ -109,7 +109,7 @@ if __name__ == '__main__': seqno += 1 # Don't crap out if the first packet is bad, we might # be seeing an incomplete read from a tty. - if ptype == gps.packet.BAD_PACKET and seqno >= 2: + if ptype == sniffer.BAD_PACKET and seqno >= 2: if debuglevel >= BASELEVEL: sys.stdout.write("gpscat: terminating on bad packet\n") break |