diff --git a/CA_DataUploaderLib/BaseSensorBox.cs b/CA_DataUploaderLib/BaseSensorBox.cs index 49e9869..f46dd6f 100644 --- a/CA_DataUploaderLib/BaseSensorBox.cs +++ b/CA_DataUploaderLib/BaseSensorBox.cs @@ -790,7 +790,7 @@ public enum ConnectionState NodeUnreachable = -1, // can be used by distributed deployments to indicate the node that has the board is unreachable Disconnected = 0, // we are not currently connected to the board Connecting = 1, // we are attempting to reconnect to the board - Connected = 2, // we have succesfully connected to the board and will soon be attempting to read from it + Connected = 2, // we have successfully connected to the board and will soon be attempting to read from it ReadError = 3, // there are unexpected exceptions communicating with the board NoDataAvailable = 4, // we are connected to the box, but we have not received for 150ms+ ReturningNonValues = 5, // we are getting data from the box, but these are not values lines diff --git a/CA_DataUploaderLib/SensorSample.cs b/CA_DataUploaderLib/SensorSample.cs index 5d16e8e..1be5f2a 100644 --- a/CA_DataUploaderLib/SensorSample.cs +++ b/CA_DataUploaderLib/SensorSample.cs @@ -18,7 +18,7 @@ public double Value { private DateTime _timeStamp; public DateTime TimeStamp { - get { return _timeStamp; } + get => _timeStamp; set { ReadSensor_LoopTime = value.Subtract(_timeStamp).TotalMilliseconds; _timeStamp = value; } } public double ReadSensor_LoopTime { get; private set; } // in milliseconds. @@ -45,14 +45,7 @@ public InputBased(IOconfInput input, double value = 0) : base(input, value) public new IOconfInput Input => base.Input!; public bool HasSpecialDisconnectValue() => Input.IsSpecialDisconnectValue(Value); - public InputBased Clone() - { - return new InputBased(Input, Value) - { - _timeStamp = TimeStamp, - ReadSensor_LoopTime = ReadSensor_LoopTime - }; - } + public InputBased Clone() => new(Input, Value); } } }