Temporary cahnges to remove errors

I also need to adjust Signal<Iem3KGridMeterRegisters>
This commit is contained in:
kostas 2024-06-04 14:57:35 +02:00
parent 2c6ab05fbe
commit 6383bd7f4c
2 changed files with 3 additions and 18 deletions

View File

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../InnovEnergy.Lib.props" />
<PropertyGroup>
<RootNamespace>InnovEnergy.Lib.Devices.IEM3kGridMeter</RootNamespace>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Utils/Utils.csproj" />
<ProjectReference Include="../../Protocols/Modbus/Modbus.csproj" />
<ProjectReference Include="../../StatusApi/StatusApi.csproj" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,5 @@
using InnovEnergy.Lib.Devices.EmuMeter; using InnovEnergy.Lib.Devices.EmuMeter;
using InnovEnergy.Lib.Devices.IEM3kGridMeter;
using InnovEnergy.Lib.Protocols.DBus.Protocol.DataTypes; using InnovEnergy.Lib.Protocols.DBus.Protocol.DataTypes;
using InnovEnergy.Lib.Victron.VeDBus; using InnovEnergy.Lib.Victron.VeDBus;
@ -6,9 +7,9 @@ namespace InnovEnergy.App.SchniederDriver;
// TODO: Does not compile // TODO: Does not compile
public record Signal(Func<EmuMeterStatus, Object> Source, ObjectPath Path, String Format = "") public record Signal(Func<Iem3KGridMeterRegisters, Object> Source, ObjectPath Path, String Format = "")
{ {
public VeProperty ToVeProperty(EmuMeterStatus status) public VeProperty ToVeProperty(Iem3KGridMeterRegisters status)
{ {
var value = Source(status); var value = Source(status);
return new VeProperty(Path, value, String.Format($"{{0:{Format}}}", value)); return new VeProperty(Path, value, String.Format($"{{0:{Format}}}", value));