Lazy probe of GPS (#2781)

* First attempt at lazy config of GPS

* More GPS rework
Break GPS init into smaller, interruptable steps
Move more GPS commands into ubx.h
Combine Setup functions

* Move the rest of UBX messages to ubs.h
This commit is contained in:
Jonathan Bennett
2023-09-10 22:21:14 -05:00
committed by GitHub
parent d6d51bc3f4
commit e1839e33f2
7 changed files with 431 additions and 538 deletions

View File

@@ -209,9 +209,7 @@ void doGPSpowersave(bool on)
uint8_t msglen;
notifyGPSSleep.notifyObservers(NULL);
msglen = gps->makeUBXPacket(0x02, 0x41, 0x08, gps->_message_PMREQ);
for (int i = 0; i < msglen; i++) {
gps->_serial_gps->write(gps->UBXscratch, msglen);
}
gps->_serial_gps->write(gps->UBXscratch, msglen);
} else {
gps->forceWake(1);
gps->_serial_gps->write(0xFF);