WIP add support for i2C GPS

This commit is contained in:
geeksville
2020-07-10 11:43:14 -07:00
parent 5b07d454b1
commit 1415f2bed7
5 changed files with 45 additions and 17 deletions

View File

@@ -5,6 +5,7 @@
#include <assert.h>
#include <time.h>
// If we have a serial GPS port it will not be null
#ifdef GPS_RX_PIN
HardwareSerial _serial_gps_real(GPS_SERIAL_NUM);
HardwareSerial *GPS::_serial_gps = &_serial_gps_real;
@@ -15,6 +16,8 @@ HardwareSerial *GPS::_serial_gps = &Serial1;
HardwareSerial *GPS::_serial_gps = NULL;
#endif
uint8_t GPS::i2cAddress = 0;
bool timeSetFromGPS; // We try to set our time from GPS each time we wake from sleep
GPS *gps;