Skip to content

Commit

Permalink
Client-side Python libraries may automatically reconnect
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
teyrana authored and garyemiller committed Mar 30, 2018
1 parent 70824d3 commit 9429b1a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions gps/watch_options.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9429b1a

Please sign in to comment.