From 9429b1a5498e0e1ea68d5e53245c897dda52e5aa Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Thu, 29 Mar 2018 20:08:58 -0700 Subject: [PATCH] Client-side Python libraries may automatically reconnect - moved WATCH_* options to their own file to deduplicate definition - defaults behavior is to exit-on-failure - activated by calling to `gps.gps(..., reconnect=True)` - refactors stream(...) function to deduplicate processing - added dictionary methods to 'class dictwrapper' Signed-off-by: Gary E. Miller --- gps/watch_options.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gps/watch_options.py diff --git a/gps/watch_options.py b/gps/watch_options.py new file mode 100644 index 00000000..7c1fde15 --- /dev/null +++ b/gps/watch_options.py @@ -0,0 +1,16 @@ +# WATCH options - controls what data is streamed, and how it's converted +WATCH_ENABLE = 0x000001 # enable streaming +WATCH_DISABLE = 0x000002 # disable watching +WATCH_JSON = 0x000010 # JSON output +WATCH_NMEA = 0x000020 # output in NMEA +WATCH_RARE = 0x000040 # output of packets in hex +WATCH_RAW = 0x000080 # output of raw packets + +WATCH_SCALED = 0x000100 # scale output to floats +WATCH_TIMING = 0x000200 # timing information +WATCH_DEVICE = 0x000800 # watch specific device +WATCH_SPLIT24 = 0x001000 # split AIS Type 24s +WATCH_PPS = 0x002000 # enable PPS JSON + +WATCH_NEWSTYLE = 0x010000 # force JSON streaming +WATCH_OLDSTYLE = 0x020000 # force old-style streaming