Merge pull request #21 from djix123/master

Add support for stopping logging
This commit is contained in:
Tony DiCola 2014-08-06 14:51:16 -07:00
commit 6cdde45623
2 changed files with 10 additions and 2 deletions

View File

@ -314,7 +314,13 @@ boolean Adafruit_GPS::waitForSentence(char *wait4me, uint8_t max) {
boolean Adafruit_GPS::LOCUS_StartLogger(void) {
sendCommand(PMTK_LOCUS_STARTLOG);
recvdflag = false;
return waitForSentence(PMTK_LOCUS_LOGSTARTED);
return waitForSentence(PMTK_LOCUS_STARTSTOPACK);
}
boolean Adafruit_GPS::LOCUS_StopLogger(void) {
sendCommand(PMTK_LOCUS_STOPLOG);
recvdflag = false;
return waitForSentence(PMTK_LOCUS_STARTSTOPACK);
}
boolean Adafruit_GPS::LOCUS_ReadStatus(void) {

View File

@ -50,7 +50,8 @@ All text above must be included in any redistribution
// such as the awesome http://www.hhhh.org/wiml/proj/nmeaxor.html
#define PMTK_LOCUS_STARTLOG "$PMTK185,0*22"
#define PMTK_LOCUS_LOGSTARTED "$PMTK001,185,3*3C"
#define PMTK_LOCUS_STOPLOG "$PMTK185,1*23"
#define PMTK_LOCUS_STARTSTOPACK "$PMTK001,185,3*3C"
#define PMTK_LOCUS_QUERY_STATUS "$PMTK183*38"
#define PMTK_LOCUS_ERASE_FLASH "$PMTK184,1*22"
#define LOCUS_OVERLAP 0
@ -121,6 +122,7 @@ class Adafruit_GPS {
boolean waitForSentence(char *wait, uint8_t max = MAXWAITSENTENCE);
boolean LOCUS_StartLogger(void);
boolean LOCUS_StopLogger(void);
boolean LOCUS_ReadStatus(void);
uint16_t LOCUS_serial, LOCUS_records;