Fix time=0 bug for fixed_position nodes (#2789)

This commit is contained in:
Ben Meadors 2023-09-12 15:54:50 -05:00 committed by GitHub
parent e1839e33f2
commit c608f0ba81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,10 +338,8 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus)
pos = ConvertToPosition(node->position);
}
// Finally add a fresh timestamp and battery level reading
// I KNOW this is redundant with refreshLocalMeshNode() above, but these are
// inexpensive nonblocking calls and can be refactored in due course
pos.time = getValidTime(RTCQualityGPS);
// Add a fresh timestamp
pos.time = getValidTime(RTCQualityFromNet);
// In debug logs, identify position by @timestamp:stage (stage 4 = nodeDB)
LOG_DEBUG("onGPSChanged() pos@%x, time=%u, lat=%d, lon=%d, alt=%d\n", pos.timestamp, pos.time, pos.latitude_i,