Weighing: Differentiate between scale and terminal

This commit is contained in:
2026-08-01 23:38:51 +02:00
parent 0d8cdd5d6e
commit bc093f31db
20 changed files with 129 additions and 157 deletions
+2 -5
View File
@@ -9,9 +9,8 @@ namespace Elwig.Helpers.Weighing {
public class AveryEventScale : Scale, IEventScale, IDisposable {
public string Manufacturer => "Avery";
public int InternalScaleNr => 1;
public string Model { get; private set; }
public string ScaleId { get; private set; }
public string ScaleTerminalId { get; private set; }
public bool IsReady { get; private set; }
public bool HasFillingClearance { get; private set; }
@@ -19,13 +18,11 @@ namespace Elwig.Helpers.Weighing {
private bool IsRunning = true;
private readonly Thread BackgroundThread;
private readonly string Connection;
public AveryEventScale(string id, string model, string cnx, string? log = null, bool required = true) :
base(cnx, null, null, null, log, true, !required) {
ScaleId = id;
ScaleTerminalId = id;
Model = model;
Connection = cnx;
IsReady = true;
HasFillingClearance = false;
Stream.WriteTimeout = -1;