Skip to content

Commit

Permalink
Release 1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed May 28, 2024
1 parent 6e4d92f commit 502b5ed
Show file tree
Hide file tree
Showing 573 changed files with 5,744 additions and 1,521 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v3
with:
path: Meadow.Foundation
ref: main

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public override async Task Run()
Resolver.Log.Error("Error level message");
Resolver.Log.Warn("Warn level message");

Resolver.Log.Info("TestLeds...");
Resolver.Log.Info("Test Leds...");

while (true)
{
Resolver.Log.Error("Turning on each led every 100ms");
Resolver.Log.Info("Turning on each led every 100ms");
foreach (var led in leds)
{
led.IsOn = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<LangVersion>10</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="1.11.0" />
<PackageReference Include="Meadow.Foundation" Version="1.11.0" />
<PackageReference Include="Meadow.F7" Version="1.12.0" />
<PackageReference Include="Meadow.Foundation" Version="1.12.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public virtual void WriteRegister(byte address, Span<byte> writeBuffer, ByteOrde
case ByteOrder.BigEndian:
for (int i = 0; i < writeBuffer.Length; i++)
{
WriteBuffer.Span[i + 1] = writeBuffer[writeBuffer.Length - (i + 1)];
WriteBuffer.Span[i + 1] = writeBuffer[^(i + 1)];
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public virtual void WriteRegister(byte address, Span<byte> writeBuffer, ByteOrde
case ByteOrder.BigEndian:
for (int i = 0; i < writeBuffer.Length; i++)
{
WriteBuffer.Span[i + 1] = writeBuffer[writeBuffer.Length - (i + 1)];
WriteBuffer.Span[i + 1] = writeBuffer[^(i + 1)];
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
<None Include="..\..\Source\icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.Contracts" Version="1.11.0" />
<PackageReference Include="Meadow.Contracts" Version="1.12.0" />
</ItemGroup>
</Project>
7 changes: 6 additions & 1 deletion Source/Meadow.Foundation.Core/SamplingSensorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public abstract class SamplingSensorBase<UNIT> : ObservableBase<UNIT>, ISampling
where UNIT : struct
{
private UNIT? _lastEventValue;
private UNIT _conditions;

/// <summary>
/// Raised when the sensor has new data
Expand Down Expand Up @@ -44,7 +45,11 @@ protected void RaiseUpdated(UNIT newValue)
/// <summary>
/// The last read conditions
/// </summary>
public UNIT Conditions { get; protected set; }
public UNIT Conditions
{
get => IsSampling ? _conditions : ReadSensor().Result;
protected set => _conditions = value;
}

/// <summary>
/// Gets a value indicating whether the sensor is currently in a sampling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class SpdtSwitch : ISwitch, IDisposable
public bool IsOn
{
get => DigitalInputPort.State;
protected set => Changed(this, new EventArgs());
protected set => Changed(this, EventArgs.Empty);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SpstSwitch : ISwitch
public bool IsOn
{
get => DigitalInputPort.State;
protected set => Changed(this, new EventArgs());
protected set => Changed(this, EventArgs.Empty);
}

/// <summary>
Expand Down
Loading

0 comments on commit 502b5ed

Please sign in to comment.