Skip to content

Commit

Permalink
Fix for issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeymolen committed Feb 19, 2017
1 parent 14d8453 commit 8fc5c28
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion samples/Sample.NetCore.Autofac/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"version": "1.1.0"
},
"NLog.Extensions.Logging": "1.0.0-rtm-alpha5",
"DavisVantage.WeatherReader": "1.6.0-*",
"DavisVantage.WeatherReader": "1.6.1-*",
"Autofac": "4.2.1",
"Microsoft.Extensions.Configuration.Binder": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/Sample.NetCore/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": "1.1.0"
},
"NLog.Extensions.Logging": "1.0.0-rtm-alpha5",
"DavisVantage.WeatherReader": "1.6.0-*"
"DavisVantage.WeatherReader": "1.6.1-*"
},

"frameworks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ private int GetBarometerValue(byte[] dataBuffer, int byteOffset, bool valueInMet

private decimal GetTemperatureValue(byte[] dataBuffer, int byteOffset, bool valueInMetric)
{
var consoleValue = BitConverter.ToInt16(dataBuffer, byteOffset);
if (consoleValue.Equals(short.MaxValue))
{
throw new Exception("Connection lost with ISS station");
}
var tempFromDataBuffer = (float)BitConverter.ToInt16(dataBuffer, byteOffset) / 10;
return valueInMetric ? MetricConversion.FahrenheitToDegrees(tempFromDataBuffer) : Convert.ToDecimal(tempFromDataBuffer);
}
Expand Down
2 changes: 1 addition & 1 deletion src/DavisVantage.WeatherReader/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.6.0-alpha",
"version": "1.6.1-alpha",
"Title": "DavisVantage.WeatherReader",
"authors": [ "Michael Keymolen" ],
"copyright": "Copyright 2016",
Expand Down
2 changes: 1 addition & 1 deletion test/DavisVantage.WeatherReader.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"testRunner": "xunit",

"dependencies": {
"DavisVantage.WeatherReader": "1.2.0-*",
"DavisVantage.WeatherReader": "1.6.1-*",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"xunit": "2.2.0-beta3-build3402",
"FluentAssertions": "4.15.0"
Expand Down
8 changes: 4 additions & 4 deletions test/DavisVantage.WeatherReader.Tests/project.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@
"lib/netstandard1.1/xunit.runner.utility.dotnet.dll": {}
}
},
"DavisVantage.WeatherReader/1.2.0-alpha": {
"DavisVantage.WeatherReader/1.6.1-alpha": {
"type": "project",
"framework": ".NETStandard,Version=v1.6",
"dependencies": {
Expand Down Expand Up @@ -5444,7 +5444,7 @@
"lib/netstandard1.1/xunit.runner.utility.dotnet.dll": {}
}
},
"DavisVantage.WeatherReader/1.2.0-alpha": {
"DavisVantage.WeatherReader/1.6.1-alpha": {
"type": "project",
"framework": ".NETStandard,Version=v1.6",
"dependencies": {
Expand Down Expand Up @@ -11607,15 +11607,15 @@
"xunit.runner.utility.nuspec"
]
},
"DavisVantage.WeatherReader/1.2.0-alpha": {
"DavisVantage.WeatherReader/1.6.1-alpha": {
"type": "project",
"path": "../../src/DavisVantage.WeatherReader/project.json",
"msbuildProject": "../../src/DavisVantage.WeatherReader/DavisVantage.WeatherReader.xproj"
}
},
"projectFileDependencyGroups": {
"": [
"DavisVantage.WeatherReader >= 1.2.0-*",
"DavisVantage.WeatherReader >= 1.6.1-*",
"FluentAssertions >= 4.15.0",
"dotnet-test-xunit >= 2.2.0-preview2-build1029",
"xunit >= 2.2.0-beta3-build3402"
Expand Down

0 comments on commit 8fc5c28

Please sign in to comment.