ScaleTestMatzen: Add more tests
This commit is contained in:
@ -44,6 +44,8 @@ namespace Elwig.Helpers.Weighing {
|
||||
} else {
|
||||
throw new ArgumentException("Unsupported scheme");
|
||||
}
|
||||
Stream.WriteTimeout = 250;
|
||||
Stream.ReadTimeout = 11000;
|
||||
|
||||
if (empty != null) {
|
||||
var parts = empty.Split(':');
|
||||
@ -105,7 +107,7 @@ namespace Elwig.Helpers.Weighing {
|
||||
line = await reader.ReadLineAsync();
|
||||
if (LogPath != null) await File.AppendAllTextAsync(LogPath, $"{line}\r\n");
|
||||
}
|
||||
if (line == null || line.Length < 4 || !line.StartsWith("<") || !line.EndsWith(">")) {
|
||||
if (line == null || line.Length < 4 || !line.StartsWith('<') || !line.EndsWith('>')) {
|
||||
throw new IOException("Invalid response from scale");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user