Merge pull request #21 from djix123/master
Add support for stopping logging
This commit is contained in:
commit
6cdde45623
|
|
@ -314,7 +314,13 @@ boolean Adafruit_GPS::waitForSentence(char *wait4me, uint8_t max) {
|
||||||
boolean Adafruit_GPS::LOCUS_StartLogger(void) {
|
boolean Adafruit_GPS::LOCUS_StartLogger(void) {
|
||||||
sendCommand(PMTK_LOCUS_STARTLOG);
|
sendCommand(PMTK_LOCUS_STARTLOG);
|
||||||
recvdflag = false;
|
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) {
|
boolean Adafruit_GPS::LOCUS_ReadStatus(void) {
|
||||||
|
|
|
||||||
|
|
@ -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
|
// such as the awesome http://www.hhhh.org/wiml/proj/nmeaxor.html
|
||||||
|
|
||||||
#define PMTK_LOCUS_STARTLOG "$PMTK185,0*22"
|
#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_QUERY_STATUS "$PMTK183*38"
|
||||||
#define PMTK_LOCUS_ERASE_FLASH "$PMTK184,1*22"
|
#define PMTK_LOCUS_ERASE_FLASH "$PMTK184,1*22"
|
||||||
#define LOCUS_OVERLAP 0
|
#define LOCUS_OVERLAP 0
|
||||||
|
|
@ -121,6 +122,7 @@ class Adafruit_GPS {
|
||||||
|
|
||||||
boolean waitForSentence(char *wait, uint8_t max = MAXWAITSENTENCE);
|
boolean waitForSentence(char *wait, uint8_t max = MAXWAITSENTENCE);
|
||||||
boolean LOCUS_StartLogger(void);
|
boolean LOCUS_StartLogger(void);
|
||||||
|
boolean LOCUS_StopLogger(void);
|
||||||
boolean LOCUS_ReadStatus(void);
|
boolean LOCUS_ReadStatus(void);
|
||||||
|
|
||||||
uint16_t LOCUS_serial, LOCUS_records;
|
uint16_t LOCUS_serial, LOCUS_records;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue