public static Device Add(string port, Utility.Sensor sensorType) { var device = new Device { SensorType = sensorType, SerialPort = port }; Devices.Add(device); return(device); }
public void Add(string port, Utility.Sensor sensorType) { Console.WriteLine($"INFO > Added new {sensorType.ToString()} sensor on port {port}"); var device = new Device { SensorType = sensorType, SerialPort = port }; Devices.Add(device); device.StartListening(); }