Skip to content

Commit

Permalink
Incorporated changes from other PR
Browse files Browse the repository at this point in the history
Changes from vshymanskyy#642
  • Loading branch information
jrlanoisTA2023 committed Jan 12, 2024
1 parent df79cf4 commit c3a225e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/TinyGsmClientSIM808.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ class TinyGsmSim808 : public TinyGsmSim800, public TinyGsmGPS<TinyGsmSim808>, pu
*/
protected:
// enable GPS
bool enableGPSImpl() {
bool enableGPSImpl(GpsStartMode startMode = GPS_START_AUTO) { // From https://github.com/vshymanskyy/TinyGSM/pull/642
sendAT(GF("+CGNSPWR=1"));
if (waitResponse() != 1) { return false; }
switch (startMode) {
case GPS_START_COLD: sendAT(GF("+CGPSRST="), 0); break;
case GPS_START_HOT: sendAT(GF("+CGPSRST="), 1); break;
case GPS_START_WARM: sendAT(GF("+CGPSRST="), 2); break;
default: return true;
}
if (waitResponse() != 1) { return false; }
return true;
}

Expand Down

0 comments on commit c3a225e

Please sign in to comment.