fix #249: report battery levels even if no GPS lock

@professr I noticed you added a "newStatus" observable to the GPS class.
Do you remember why you didn't remove the old GPS status (which seemed
to be dumber).  Is it just because you didn't want to risk breaking
MeshService?  (I assume) In this change I removed the old Observable
and all seems well (just using newStatus everywhere).
This commit is contained in:
geeksville
2020-08-12 15:51:57 -07:00
parent 55dafcbecb
commit 9b25818a50
5 changed files with 11 additions and 11 deletions

View File

@@ -66,10 +66,6 @@ void NEMAGPS::loop()
// expect gps pos lat=37.520825, lon=-122.309162, alt=158
DEBUG_MSG("new NEMA GPS pos lat=%f, lon=%f, alt=%d, hdop=%f, heading=%f\n", latitude * 1e-7, longitude * 1e-7, altitude, dop * 1e-2, heading * 1e-5);
hasValidLocation = (latitude != 0) || (longitude != 0); // bogus lat lon is reported as 0,0
if (hasValidLocation)
notifyObservers(NULL);
}
// Notify any status instances that are observing us