summaryrefslogtreecommitdiff
path: root/gpsfake
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-25 05:45:19 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-25 05:45:19 -0500
commit968c44824192a437f957b7d74cb4a8c54b782ff4 (patch)
tree7130b57aeadc453866599fe2c1b721fd77085a68 /gpsfake
parenta701759ea555821922cac75bd849c562a901a041 (diff)
downloadgpsd-968c44824192a437f957b7d74cb4a8c54b782ff4.tar.gz
Dump platform ID and delay parameters before doing test runs.
Diffstat (limited to 'gpsfake')
-rwxr-xr-xgpsfake7
1 files changed, 5 insertions, 2 deletions
diff --git a/gpsfake b/gpsfake
index 63da8bd8..9058b8fa 100755
--- a/gpsfake
+++ b/gpsfake
@@ -9,7 +9,7 @@
# This file is Copyright (c) 2010 by the GPSD project
# BSD terms apply: see the file COPYING in the distribution root for details.
-import sys, os, time, getopt, socket, random, pty
+import sys, os, time, getopt, socket, random, pty, platform
import gps, gps.fake as gpsfake # The "as" pacifies pychecker
class Baton:
@@ -94,7 +94,7 @@ def fakehook(linenumber, fakegps):
if __name__ == '__main__':
try:
- (options, arguments) = getopt.getopt(sys.argv[1:], "1bc:D:fghilm:no:pP:r:s:Stuvx")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "1bc:D:fghilm:no:pP:r:s:StTuvx")
except getopt.GetoptError, msg:
print "gpsfake: " + str(msg)
raise SystemExit, 1
@@ -152,6 +152,9 @@ if __name__ == '__main__':
slow = True
elif (switch == '-t'):
tcp = True
+ elif (switch == '-T'):
+ sys.stdout.write("%s: WRITE_PAD = %.f CLOSE_DELAY = %.2f\n" % (platform.platform(), gpsfake.WRITE_PAD, gpsfake.CLOSE_DELAY))
+ raise SystemExit,0
elif (switch == '-u'):
udp = True
elif (switch == '-v'):