sforkowany z mirror/meshtastic-firmware
RAK815 GPS WIP
rodzic
e12c057c31
commit
efd8b70089
|
@ -16,7 +16,11 @@ HardwareSerial *GPS::_serial_gps = &Serial1;
|
||||||
HardwareSerial *GPS::_serial_gps = NULL;
|
HardwareSerial *GPS::_serial_gps = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GPS_I2C_ADDRESS
|
||||||
|
uint8_t GPS::i2cAddress = GPS_I2C_ADDRESS;
|
||||||
|
#else
|
||||||
uint8_t GPS::i2cAddress = 0;
|
uint8_t GPS::i2cAddress = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool timeSetFromGPS; // We try to set our time from GPS each time we wake from sleep
|
bool timeSetFromGPS; // We try to set our time from GPS each time we wake from sleep
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,15 @@ bool UBloxGPS::setup()
|
||||||
assert(ok);
|
assert(ok);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
ok = ublox.setUART1Output(COM_TYPE_UBX, 500); // Use native API
|
if (_serial_gps) {
|
||||||
assert(ok);
|
ok = ublox.setUART1Output(COM_TYPE_UBX, 500); // Use native API
|
||||||
|
assert(ok);
|
||||||
|
}
|
||||||
|
if (i2cAddress) {
|
||||||
|
ublox.setI2COutput(COM_TYPE_UBX, 500);
|
||||||
|
assert(ok);
|
||||||
|
}
|
||||||
|
|
||||||
ok = ublox.setNavigationFrequency(1, 500); // Produce 4x/sec to keep the amount of time we stall in getPVT low
|
ok = ublox.setNavigationFrequency(1, 500); // Produce 4x/sec to keep the amount of time we stall in getPVT low
|
||||||
assert(ok);
|
assert(ok);
|
||||||
// ok = ublox.setAutoPVT(false); // Not implemented on NEO-6M
|
// ok = ublox.setAutoPVT(false); // Not implemented on NEO-6M
|
||||||
|
|
Ładowanie…
Reference in New Issue