Skip to content

Commit

Permalink
Update GpsDelegate.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Jun 13, 2024
1 parent 38a6194 commit eda8bad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Shiny.Locations/GpsDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public async Task OnReading(GpsReading reading)
{
await this.semaphore.WaitAsync().ConfigureAwait(false);

this.MostRecentReading = reading;

var fireReading = false;
if (this.LastReading == null)
{
Expand Down Expand Up @@ -63,13 +65,27 @@ public async Task OnReading(GpsReading reading)


GpsReading? lastReading;
/// <summary>
/// This is the last GPS reading before OnReading is raised
/// </summary>
public GpsReading? LastReading
{
get => this.lastReading;
set => this.Set(ref this.lastReading, value);
}


GpsReading? mostRecentReading;
/// <summary>
/// This is the most recent reading from the GPS outside of the filters
/// If you are gettings this as of OnReading, it will be the current incoming reading
/// </summary>
public GpsReading? MostRecentReading
{
get => this.mostRecentReading;
set => this.Set(ref this.mostRecentReading, value);
}

Distance? minDistance;
public Distance? MinimumDistance
{
Expand Down

0 comments on commit eda8bad

Please sign in to comment.