corvus2 gps still doesn't work WIP

This commit is contained in:
Kevin Hester
2020-10-13 14:43:28 +08:00
parent 965c2bda8d
commit ca77d48b20
5 changed files with 27 additions and 20 deletions

View File

@@ -36,10 +36,15 @@ bool GPS::setup()
return ok;
}
// Allow defining the polarity of the WAKE output. default is active high
#ifndef GPS_WAKE_ACTIVE
#define GPS_WAKE_ACTIVE 1
#endif
void GPS::wake()
{
#ifdef PIN_GPS_WAKE
digitalWrite(PIN_GPS_WAKE, 1);
digitalWrite(PIN_GPS_WAKE, GPS_WAKE_ACTIVE);
pinMode(PIN_GPS_WAKE, OUTPUT);
#endif
}
@@ -47,7 +52,7 @@ void GPS::wake()
void GPS::sleep() {
#ifdef PIN_GPS_WAKE
digitalWrite(PIN_GPS_WAKE, 0);
digitalWrite(PIN_GPS_WAKE, GPS_WAKE_ACTIVE ? 0 : 1);
pinMode(PIN_GPS_WAKE, OUTPUT);
#endif
}

View File

@@ -102,7 +102,7 @@ bool NMEAGPS::whileIdle()
// First consume any chars that have piled up at the receiver
while (_serial_gps->available() > 0) {
int c = _serial_gps->read();
// DEBUG_MSG("%c", c);
DEBUG_MSG("%c", c);
isValid |= reader.encode(c);
}