Changed to Output string instead of input
This commit is contained in:
parent
0357980b3a
commit
8d04d89eab
|
@ -77,8 +77,8 @@ public class AmptDevices
|
||||||
Current = busCurrent
|
Current = busCurrent
|
||||||
};
|
};
|
||||||
|
|
||||||
// flatten the 2 strings of each SO into one array
|
// flatten the output strings of each SO into one array
|
||||||
var strings = soStati.SelectMany(GetStrings).ToArray(nStrings);
|
var strings = soStati.SelectMany(GetDc).ToArray(nStrings);
|
||||||
|
|
||||||
return new AmptStatus
|
return new AmptStatus
|
||||||
{
|
{
|
||||||
|
@ -107,6 +107,16 @@ public class AmptDevices
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<DcBus> GetDc(StringOptimizerRegisters r)
|
||||||
|
{
|
||||||
|
// hardcoded: every SO has 2 strings (produced like this by AMPT)
|
||||||
|
|
||||||
|
yield return new()
|
||||||
|
{
|
||||||
|
Voltage = r.Voltage,
|
||||||
|
Current = r.Current,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private static IEnumerable<ModbusDevice<StringOptimizerRegisters>> StringOptimizers(ModbusClient modbusClient)
|
private static IEnumerable<ModbusDevice<StringOptimizerRegisters>> StringOptimizers(ModbusClient modbusClient)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue