minor
This commit is contained in:
parent
526dd2a47f
commit
b7cda31b58
|
@ -260,9 +260,9 @@ public static class Topology
|
||||||
.Apply(TextBlock.AlignLeft)
|
.Apply(TextBlock.AlignLeft)
|
||||||
.TitleBox("AC/DC");
|
.TitleBox("AC/DC");
|
||||||
|
|
||||||
var gridFlow = Flow.Horizontal(h);
|
var dcFlow = Flow.Horizontal(h);
|
||||||
|
|
||||||
return TextBlock.AlignCenterVertical(inverterBox, gridFlow);
|
return TextBlock.AlignCenterVertical(inverterBox, dcFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ public static class Topology
|
||||||
return TextBlock.AlignLeft("no battery").Box();
|
return TextBlock.AlignLeft("no battery").Box();
|
||||||
|
|
||||||
var voltage = bat.Dc.Voltage.ToDisplayString();
|
var voltage = bat.Dc.Voltage.ToDisplayString();
|
||||||
var soc = bat.Devices.Any() ? bat.Devices.Average(b => b.Soc).Percent().ToDisplayString() : "0";
|
var soc = bat.Devices.Any() ? bat.Devices.Average(b => b.Soc).Percent().ToDisplayString() : "0"; // TODO
|
||||||
var current = bat.Dc.Current.ToDisplayString();
|
var current = bat.Dc.Current.ToDisplayString();
|
||||||
var busCurrent = bat.Devices.Any() ? bat.Devices.Sum(b => b.BusCurrent).A().ToDisplayString() : "0";
|
var busCurrent = bat.Devices.Any() ? bat.Devices.Sum(b => b.BusCurrent).A().ToDisplayString() : "0";
|
||||||
var temp = bat.Temperature.ToDisplayString();
|
var temp = bat.Temperature.ToDisplayString();
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
using CliWrap;
|
using CliWrap;
|
||||||
using CliWrap.Buffered;
|
|
||||||
using HandlebarsDotNet;
|
using HandlebarsDotNet;
|
||||||
using InnovEnergy.App.VrmGrabber.Database;
|
using InnovEnergy.App.VrmGrabber.Database;
|
||||||
using InnovEnergy.App.VrmGrabber.DataTypes;
|
|
||||||
using InnovEnergy.Lib.Utils;
|
using InnovEnergy.Lib.Utils;
|
||||||
using InnovEnergy.Lib.Victron.VictronVRM;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using FILE=System.IO.File;
|
|
||||||
using VrmInstallation = InnovEnergy.Lib.Victron.VictronVRM.Installation;
|
using VrmInstallation = InnovEnergy.Lib.Victron.VictronVRM.Installation;
|
||||||
|
|
||||||
namespace InnovEnergy.App.VrmGrabber;
|
namespace InnovEnergy.App.VrmGrabber;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
using InnovEnergy.Lib.Victron.VictronVRM;
|
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace InnovEnergy.App.VrmGrabber.DataTypes;
|
namespace InnovEnergy.App.VrmGrabber.DataTypes;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using InnovEnergy.App.VrmGrabber.DataTypes;
|
using InnovEnergy.App.VrmGrabber.DataTypes;
|
||||||
|
|
||||||
|
|
||||||
namespace InnovEnergy.App.VrmGrabber.Database;
|
namespace InnovEnergy.App.VrmGrabber.Database;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ using CliWrap.Buffered;
|
||||||
using InnovEnergy.App.RemoteSupportConsole;
|
using InnovEnergy.App.RemoteSupportConsole;
|
||||||
using InnovEnergy.Lib.Utils;
|
using InnovEnergy.Lib.Utils;
|
||||||
using InnovEnergy.Lib.Victron.VictronVRM;
|
using InnovEnergy.Lib.Victron.VictronVRM;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using static System.Text.Json.JsonSerializer;
|
using static System.Text.Json.JsonSerializer;
|
||||||
using static InnovEnergy.App.VrmGrabber.Database.Systemd;
|
using static InnovEnergy.App.VrmGrabber.Database.Systemd;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using InnovEnergy.App.VrmGrabber.DataTypes;
|
using InnovEnergy.App.VrmGrabber.DataTypes;
|
||||||
|
|
||||||
|
|
||||||
namespace InnovEnergy.App.VrmGrabber.Database;
|
namespace InnovEnergy.App.VrmGrabber.Database;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,4 @@ namespace InnovEnergy.Lib.Protocols.DBus.Protocol.DataTypes.Signatures.Specializ
|
||||||
|
|
||||||
public abstract class BasicTypeSignature : Signature
|
public abstract class BasicTypeSignature : Signature
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -176,11 +176,11 @@ public readonly struct Message
|
||||||
|
|
||||||
var raw = reader.ReadSegment((Int32)payloadLength);
|
var raw = reader.ReadSegment((Int32)payloadLength);
|
||||||
|
|
||||||
var br = new DBusBufferReader(raw, reader.SwapEndian);
|
|
||||||
|
|
||||||
if (signature.IsEmpty)
|
if (signature.IsEmpty)
|
||||||
return (raw.ToArray(), true); // no signature, but data available. should probably not happen.
|
return (raw.ToArray(), true); // no signature, but data available. should probably not happen.
|
||||||
|
|
||||||
|
var br = new DBusBufferReader(raw, reader.SwapEndian);
|
||||||
|
|
||||||
// try
|
// try
|
||||||
// {
|
// {
|
||||||
return (signature.Read(br), false);
|
return (signature.Read(br), false);
|
||||||
|
|
|
@ -53,11 +53,11 @@ public static class Replies
|
||||||
|
|
||||||
HeaderType header =
|
HeaderType header =
|
||||||
(
|
(
|
||||||
(Byte)Env.Endianness,
|
(Byte) Env.Endianness,
|
||||||
(Byte)MessageType.MethodReturn,
|
(Byte) MessageType.MethodReturn,
|
||||||
(Byte)HeaderFlags.NoReplyExpected,
|
(Byte) HeaderFlags.NoReplyExpected,
|
||||||
Message.ProtocolVersion,
|
Message.ProtocolVersion,
|
||||||
(UInt32)signature.MeasureSize(payload),
|
(UInt32) signature.MeasureSize(payload),
|
||||||
SerialSource.Next(),
|
SerialSource.Next(),
|
||||||
fields
|
fields
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue