1.1 --- a/Hardware/Sensor.cs Sat Jun 05 18:59:54 2010 +0000
1.2 +++ b/Hardware/Sensor.cs Sun Jun 06 11:07:57 2010 +0000
1.3 @@ -53,8 +53,6 @@
1.4 private float? value;
1.5 private float? min;
1.6 private float? max;
1.7 - private float? limit;
1.8 - private float? defaultLimit;
1.9 private Queue<ISensorEntry> entries =
1.10 new Queue<ISensorEntry>(MAX_MINUTES * 15);
1.11
1.12 @@ -64,22 +62,21 @@
1.13 private const int MAX_MINUTES = 120;
1.14
1.15 public Sensor(string name, int index, SensorType sensorType,
1.16 - IHardware hardware) : this(name, index, null, sensorType, hardware,
1.17 + IHardware hardware) : this(name, index, sensorType, hardware,
1.18 null) { }
1.19
1.20 - public Sensor(string name, int index, float? limit, SensorType sensorType,
1.21 + public Sensor(string name, int index, SensorType sensorType,
1.22 IHardware hardware, ParameterDescription[] parameterDescriptions) :
1.23 - this(name, index, false, limit, sensorType, hardware,
1.24 + this(name, index, false, sensorType, hardware,
1.25 parameterDescriptions) { }
1.26
1.27 public Sensor(string name, int index, bool defaultHidden,
1.28 - float? limit, SensorType sensorType, IHardware hardware,
1.29 + SensorType sensorType, IHardware hardware,
1.30 ParameterDescription[] parameterDescriptions)
1.31 {
1.32 this.defaultName = name;
1.33 this.index = index;
1.34 this.defaultHidden = defaultHidden;
1.35 - this.defaultLimit = limit;
1.36 this.sensorType = sensorType;
1.37 this.hardware = hardware;
1.38 Parameter[] parameters = new Parameter[parameterDescriptions == null ?
1.39 @@ -94,12 +91,6 @@
1.40 this.name = configName;
1.41 else
1.42 this.name = name;
1.43 - string configLimit = Config.Settings[
1.44 - new Identifier(Identifier, "limit").ToString()];
1.45 - if (configLimit != null && configLimit != "")
1.46 - this.limit = float.Parse(configLimit);
1.47 - else
1.48 - this.limit = limit;
1.49 }
1.50
1.51 public IHardware Hardware {
1.52 @@ -172,23 +163,6 @@
1.53 public float? Min { get { return min; } }
1.54 public float? Max { get { return max; } }
1.55
1.56 - public float? Limit {
1.57 - get {
1.58 - return limit;
1.59 - }
1.60 -
1.61 - set {
1.62 - if (value.HasValue) {
1.63 - limit = value;
1.64 - Config.Settings[new Identifier(Identifier, "limit").ToString()] =
1.65 - limit.ToString();
1.66 - } else {
1.67 - limit = defaultLimit;
1.68 - Config.Settings[new Identifier(Identifier, "limit").ToString()] = "";
1.69 - }
1.70 - }
1.71 - }
1.72 -
1.73 public IEnumerable<ISensorEntry> Plot {
1.74 get { return entries; }
1.75 }