Further into my testing of my UGPSBB, I'm having a difficult time capture the return ACK NMEA sentences from the GPS. I'm attempting to make sure that the GPS completes the commands before I move on, and while I could use a delay loop, it'd be nice to check for a successful ACK instead.
Reading through the Adafruit GPS library, there is already a class to wait for the ACK (boolean Adafruit_GPS::waitForSentence(char *wait4me, uint8_t max)), so I'm trying to use that to test the exit code of GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA) as such (and I have defined the status code as "$PMTK001,314,3*36")
- Code: Select all | TOGGLE FULL SIZE
Serial.println("Attempting to set NMEA output");
} while (!GPS.waitForSentence(PMTK_SET_NMEA_OK));
Serial.println("NMEA Output set");
Probably not the best way to do it, but the ACK is never caught, so I'm wondering if it's coming back too fast to be caught? I noticed a comment in the Adafruit GPS library to that effect.
//return waitForSentence(PMTK_STANDBY_SUCCESS); // don't seem to be fast enough to catch the message, or something else just is not working
If the library can't catch the ACKs fast enough, anyone have any suggestions as to how to catch them? This might be completely academic, but now I want to know!