fix #397 from @a-f-G-U-C - bogus GPS positions during locking could be reported
btw - from my read of the NMEA, the lowest value that means 'has a valid position' is 1 not 2. But I only know this because you pointed me at it ;-) Thanks!
This commit is contained in:
@@ -299,8 +299,8 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *unused)
|
||||
p->decoded.which_payload = SubPacket_position_tag;
|
||||
|
||||
Position &pos = p->decoded.position;
|
||||
// !zero or !zero lat/long means valid
|
||||
if (gps->latitude != 0 || gps->longitude != 0) {
|
||||
|
||||
if (gps->hasLock()) {
|
||||
if (gps->altitude != 0)
|
||||
pos.altitude = gps->altitude;
|
||||
pos.latitude_i = gps->latitude;
|
||||
|
||||
Reference in New Issue
Block a user