fix setting scaling

This commit is contained in:
djnitehawk 2025-03-16 11:47:57 +05:30
parent ebc42d1436
commit 41e2c5b009

View File

@ -120,12 +120,8 @@ public sealed class FelicitySolarInverter
{
value *= setting switch
{
Setting.DischargeCutOff or
Setting.BulkVoltage or
Setting.FloatVoltage or
Setting.BackToGrid or
Setting.BackToBattery => 10,
_ => throw new ArgumentException("Invalid setting!")
Setting.DischargeCutOff or Setting.BulkVoltage or Setting.FloatVoltage or Setting.BackToGrid or Setting.BackToBattery => 10,
_ => 1
};
var registerAddress = (ushort)setting;