SystecScale: Remove .ToString()
This commit is contained in:
@ -164,7 +164,7 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
var crc16 = line[52..60].Trim();
|
var crc16 = line[52..60].Trim();
|
||||||
|
|
||||||
if (Utils.CalcCrc16Modbus(record[..54]) != ushort.Parse(crc16)) {
|
if (Utils.CalcCrc16Modbus(record[..54]) != ushort.Parse(crc16)) {
|
||||||
throw new IOException($"Invalid response from scale: Invalid CRC16 checksum ({crc16} != {Utils.CalcCrc16Modbus(record[..54]).ToString()})");
|
throw new IOException($"Invalid response from scale: Invalid CRC16 checksum ({crc16} != {Utils.CalcCrc16Modbus(record[..54])})");
|
||||||
} else if (unit != "kg") {
|
} else if (unit != "kg") {
|
||||||
throw new IOException($"Unsupported unit in weighing response: '{unit}'");
|
throw new IOException($"Unsupported unit in weighing response: '{unit}'");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user