mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Handle no GPS fix
This commit is contained in:
@@ -42,6 +42,12 @@ namespace ChrisKaczor.HomeMonitor.Weather.Models
|
||||
LightLevel = decimal.Parse(messageValues[@"tl"]);
|
||||
Latitude = decimal.Parse(messageValues[@"glt"]);
|
||||
Longitude = decimal.Parse(messageValues[@"gln"]);
|
||||
|
||||
var gpsFix = int.Parse(messageValues[@"gf"]);
|
||||
|
||||
if (gpsFix == 0)
|
||||
return;
|
||||
|
||||
Altitude = decimal.Parse(messageValues[@"ga"]);
|
||||
SatelliteCount = int.Parse(messageValues[@"gs"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user