From cafc58e49f203b8c2dccee184d11aff3f3239fbc Mon Sep 17 00:00:00 2001 From: s3lph Date: Sun, 14 May 2023 06:13:09 +0200 Subject: [PATCH] feat: add support for air530 gps module --- src/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 95cfcae..8442d58 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -567,6 +567,11 @@ void readNmeaRmc() { // L80-R: Send GPS module into standby mode Serial.println("$PMTK161,0*28"); Serial.flush(); +#endif +#if defined(GPSM_AIR530) + // AIR530: Send GPS module into low-power mode + Serial.println("$PGKC051,1*36"); + Serial.flush(); #endif char buf[16]; char *bptr = buf; @@ -719,6 +724,11 @@ void setup() { // L80-R: Disable all NMEA sentences except for GPRMC Serial.println("$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"); Serial.flush(); +#elif defined(GPSM_AIR530) + Serial.begin(9600); + // AIR530: Disable all NMEA sentences except for GPRMC + Serial.println("$PGKC242,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*36"); + Serial.flush(); #else // Assume NMEA-0183 default baud rate of 4800 Serial.begin(4800); @@ -804,4 +814,9 @@ void loop() { lcd.backlight(); lcd.display(); } +#if defined(GPSM_AIR530) + // Wake AIR530 + Serial.println(); + Serial.flush(); +#endif }