mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-29 19:03:52 +00:00
Merge branch 'master' into 2.2-working-changes
This commit is contained in:
commit
f1bcc300d9
@ -5,7 +5,9 @@ extends = arduino_base
|
|||||||
|
|
||||||
build_type = debug ; I'm debugging with ICE a lot now
|
build_type = debug ; I'm debugging with ICE a lot now
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags} -Wno-unused-variable
|
${arduino_base.build_flags}
|
||||||
|
-DSERIAL_BUFFER_SIZE=1024
|
||||||
|
-Wno-unused-variable
|
||||||
-Isrc/platform/nrf52
|
-Isrc/platform/nrf52
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
|
@ -107,6 +107,14 @@ bool NMEAGPS::lookForLocation()
|
|||||||
// At a minimum, use the fixQuality indicator in GPGGA (FIXME?)
|
// At a minimum, use the fixQuality indicator in GPGGA (FIXME?)
|
||||||
fixQual = reader.fixQuality();
|
fixQual = reader.fixQuality();
|
||||||
|
|
||||||
|
#ifndef TINYGPS_OPTION_NO_STATISTICS
|
||||||
|
if (reader.failedChecksum() > lastChecksumFailCount) {
|
||||||
|
LOG_WARN("Warning, %u new GPS checksum failures, for a total of %u.\n", reader.failedChecksum() - lastChecksumFailCount,
|
||||||
|
reader.failedChecksum());
|
||||||
|
lastChecksumFailCount = reader.failedChecksum();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS
|
#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS
|
||||||
fixType = atoi(gsafixtype.value()); // will set to zero if no data
|
fixType = atoi(gsafixtype.value()); // will set to zero if no data
|
||||||
// LOG_DEBUG("FIX QUAL=%d, TYPE=%d\n", fixQual, fixType);
|
// LOG_DEBUG("FIX QUAL=%d, TYPE=%d\n", fixQual, fixType);
|
||||||
@ -174,8 +182,10 @@ bool NMEAGPS::lookForLocation()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Discard incomplete or erroneous readings
|
// Discard incomplete or erroneous readings
|
||||||
if (reader.hdop.value() == 0)
|
if (reader.hdop.value() == 0) {
|
||||||
|
LOG_WARN("BOGUS hdop.value() REJECTED: %d\n", reader.hdop.value());
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
p.latitude_i = toDegInt(loc.lat);
|
p.latitude_i = toDegInt(loc.lat);
|
||||||
p.longitude_i = toDegInt(loc.lng);
|
p.longitude_i = toDegInt(loc.lng);
|
||||||
@ -243,7 +253,8 @@ bool NMEAGPS::hasFlow()
|
|||||||
bool NMEAGPS::whileIdle()
|
bool NMEAGPS::whileIdle()
|
||||||
{
|
{
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
|
// if (_serial_gps->available() > 0)
|
||||||
|
// LOG_DEBUG("GPS Bytes Waiting: %u\n", _serial_gps->available());
|
||||||
// First consume any chars that have piled up at the receiver
|
// First consume any chars that have piled up at the receiver
|
||||||
while (_serial_gps->available() > 0) {
|
while (_serial_gps->available() > 0) {
|
||||||
int c = _serial_gps->read();
|
int c = _serial_gps->read();
|
||||||
|
@ -13,6 +13,7 @@ class NMEAGPS : public GPS
|
|||||||
{
|
{
|
||||||
TinyGPSPlus reader;
|
TinyGPSPlus reader;
|
||||||
uint8_t fixQual = 0; // fix quality from GPGGA
|
uint8_t fixQual = 0; // fix quality from GPGGA
|
||||||
|
uint32_t lastChecksumFailCount = 0;
|
||||||
|
|
||||||
#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS
|
#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS
|
||||||
// (20210908) TinyGps++ can only read the GPGSA "FIX TYPE" field
|
// (20210908) TinyGps++ can only read the GPGSA "FIX TYPE" field
|
||||||
|
Loading…
Reference in New Issue
Block a user