UBX-RXM-PMREQ soft-off implemented

This commit is contained in:
code8buster
2023-09-05 00:26:42 -04:00
parent fb23e479ac
commit 134fc75b67
3 changed files with 52 additions and 2 deletions

View File

@@ -204,6 +204,19 @@ void doGPSpowersave(bool on)
notifyGPSSleep.notifyObservers(NULL);
}
#endif
#if !(defined(HAS_PMU) || defined(PIN_GPS_EN) || defined(PIN_GPS_WAKE))
if (!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);
}
} else {
gps->forceWake(1);
gps->_serial_gps->write(0xFF);
}
#endif
}
void doDeepSleep(uint32_t msecToWake)