Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
fix for rawbg on newer nightscout versions. used double instead of in…
Browse files Browse the repository at this point in the history
…t for sgv and rawbg data.
  • Loading branch information
Bjorn committed Aug 23, 2016
1 parent 8ece5b5 commit e859132
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions FloatingGlucose/Classes/Pebble/GeneratedNsData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ public class Bg
public int trend { get; set; }
public string direction { get; set; }
public long datetime { get; set; }
public int filtered { get; set; }
public int unfiltered { get; set; }
public int noise { get; set; }
public double filtered { get; set; }
public double unfiltered { get; set; }
public double noise { get; set; }
public string bgdelta { get; set; }
public string battery { get; set; }
}

public class Cal
{
public double slope { get; set; }
public int intercept { get; set; }
public double intercept { get; set; }
public double scale { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion FloatingGlucose/Classes/Pebble/PebbleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static async Task<PebbleData> GetNightscoutPebbleDataAsync(string url)
bgs = parsed.bgs.First();
pebbleData.Direction = bgs.direction;
pebbleData.Glucose = Double.Parse(bgs.sgv, NumberStyles.Any, PebbleData.Culture);
pebbleData.Date = DateTimeOffset.FromUnixTimeMilliseconds(bgs.datetime).DateTime;
pebbleData.Date = DateTimeOffset.FromUnixTimeMilliseconds(bgs.Datetime).DateTime;
pebbleData.Delta = Double.Parse(bgs.bgdelta, NumberStyles.Any, PebbleData.Culture);


Expand Down

0 comments on commit e859132

Please sign in to comment.