TimeSinceLastDgpsUpdate should be nullable

This commit is contained in:
Morten Nielsen 2020-07-28 19:46:06 -07:00
parent abd5fe56c7
commit fe75ff21f1
2 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ namespace NmeaParser.Messages
if (!double.IsNaN(timeInSeconds))
TimeSinceLastDgpsUpdate = TimeSpan.FromSeconds(timeInSeconds);
else
TimeSinceLastDgpsUpdate = TimeSpan.MaxValue;
TimeSinceLastDgpsUpdate = null;
if (message[13].Length > 0)
DgpsStationId = int.Parse(message[13], CultureInfo.InvariantCulture);
else
@ -116,7 +116,7 @@ namespace NmeaParser.Messages
/// <summary>
/// Time since last DGPS update (ie age of the differential GPS data)
/// </summary>
public TimeSpan TimeSinceLastDgpsUpdate { get; }
public TimeSpan? TimeSinceLastDgpsUpdate { get; }
/// <summary>
/// Differential Reference Station ID

View file

@ -155,7 +155,7 @@ namespace NmeaParser.Messages
if (!double.IsNaN(timeInSeconds))
TimeSinceLastDgpsUpdate = TimeSpan.FromSeconds(timeInSeconds);
else
TimeSinceLastDgpsUpdate = TimeSpan.MaxValue;
TimeSinceLastDgpsUpdate = null;
if (message[11].Length > 0)
DgpsStationId = message[11];
@ -247,7 +247,7 @@ namespace NmeaParser.Messages
/// <summary>
/// Age of differential data - <see cref="TimeSpan.MaxValue"/> if talker ID is GN, additional GNS messages follow with GP and/or GL Age of differential data
/// </summary>
public TimeSpan TimeSinceLastDgpsUpdate { get; }
public TimeSpan? TimeSinceLastDgpsUpdate { get; }
/// <summary>
/// eference station ID1, range 0000-4095 - Null if talker ID is GN, additional GNS messages follow with GP and/or GL Reference station ID