only set time valid if at least 1 sat in view #501
@ -28,6 +28,7 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
- Fixed transition for dual power lane assemblies: When going from dual side submode to single side
|
||||
submode, perform logical commanding first, similarly to when going to OFF mode.
|
||||
- GPS time is only set to valid if at least one satellite is in view.
|
||||
|
||||
## Changed
|
||||
|
||||
|
@ -302,7 +302,10 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
||||
// TIME is set for every message, no need for a counter
|
||||
bool timeValid = false;
|
||||
if (TIME_SET == (TIME_SET & gps.set)) {
|
||||
// To prevent totally incorrect times from being declared valid.
|
||||
if(gpsSet.satInView.isValid() and gpsSet.satInView.value >= 1) {
|
||||
timeValid = true;
|
||||
}
|
||||
timeval time = {};
|
||||
#if LIBGPS_VERSION_MINOR <= 17
|
||||
gpsSet.unixSeconds.value = std::floor(gps.fix.time);
|
||||
|
Loading…
Reference in New Issue
Block a user