public void AddSensor(string name, float value, int type)
        {
            bool found = false;

            foreach (var s in _sensors)
            {
                if (s.name == name)
                {
                    found = true;
                }
            }
            if (found == false)
            {
                var sensor = new StatSensorItem(name, type);
                _sensors.Add(sensor);
                sessionID = DateTime.Now.Ticks;
            }
            foreach (var s in _sensors)
            {
                if (s.name == name)
                {
                    var ss = new SensorStatQueue
                    {
                        SampleID = historyIndex,
                        Value    = value
                    };
                    s.history.Enqueue(ss);
                }
            }
        }
 public void AddSensor(string name, float value, int type)
 {
     bool found = false;
         foreach (var s in _sensors){
             if(s.name == name){
                 found = true;
             }
         }
         if(found == false){
             var sensor = new StatSensorItem(name, type);
             _sensors.Add(sensor);
             sessionID = DateTime.Now.Ticks;
         }
         foreach (var s in _sensors){
             if(s.name == name){
                  var ss = new SensorStatQueue
                  {
                      SampleID = historyIndex,
                      Value = value
                  };
                 s.history.Enqueue(ss);
             }
         }
 }