From 19078738316d7d9285c51f682586f5af382894f5 Mon Sep 17 00:00:00 2001 From: geeksville Date: Thu, 1 Oct 2020 10:03:23 -0700 Subject: [PATCH] gps wip for #376 --- docs/software/gps-todo.txt | 36 ++++++++++++++++++++++++++++++++++++ platformio.ini | 6 ++++-- proto | 2 +- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 docs/software/gps-todo.txt diff --git a/docs/software/gps-todo.txt b/docs/software/gps-todo.txt new file mode 100644 index 000000000..85f233733 --- /dev/null +++ b/docs/software/gps-todo.txt @@ -0,0 +1,36 @@ +gps todo - bug 376 + +handle the various GPS modes + +handle wake and sleep times + +handle maxint parameters + +handle loss of lock at end of wake (gotLocThisTime) + +if not sharing location, don't even power up the GPS + +if we go to sleep without getting a location set hasValidLocation to false + +properly handle time only modes + +force gps sleep when in LightSleep and force wake only once <- confirm + +fix has_gps based on new logic + +add set router mode in python tool - it will also set GPS to stationary +(which will shrink DARK and NB period to zero and + make light_sleep very long) + +gps states + +Active - for gps_attempt_time seconds +Sleeping - for (gps_update_rate or sleep forever) seconds +ForcedSleep - PowerFSM says we don't want to use GPS right now +(no need for sleep forever state) + +gps triggers +GPS_TRIG_FORCE_SLEEP - from powerfsm +GPS_TRIG_FORCE_WAKE - from powerfsm +GPS_SETTINGS - if GPS settings changed, reset params and possibly become active + diff --git a/platformio.ini b/platformio.ini index 8dfc9dc5f..74ed94ab4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -34,8 +34,10 @@ build_flags = -Wno-missing-field-initializers -Isrc -Isrc/mesh -Isrc/gps -Ilib/n ; leave this commented out to avoid breaking Windows ;upload_port = /dev/ttyUSB0 ;monitor_port = /dev/ttyUSB0 -upload_port = /dev/cu.SLAB_USBtoUART -monitor_port = /dev/cu.SLAB_USBtoUART + +; geeksville: I think setting this should not be required - it breaks linux +;upload_port = /dev/cu.SLAB_USBtoUART +;monitor_port = /dev/cu.SLAB_USBtoUART ; the default is esptool ; upload_protocol = esp-prog diff --git a/proto b/proto index d8338eba8..c250aaa45 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit d8338eba8666e3f9f9fe0cb6ee8c2cc47dbcade5 +Subproject commit c250aaa459d7d6727b01b8f4d9f31d315f738d61