/// <summary>
 /// Switch mode to connected
 /// </summary>
 /// <returns></returns>
 public bool SwitchToConnected()
 {
     if (!SerialHandler.OpenPort())
     {
         Debug.WriteLine("couldnt open port");
         return(false);
     }
     while (SeriesCollection.Count > 1)
     {
         SeriesCollection.RemoveAt(SeriesCollection.Count - 1);
     }
     IsModeConnected = true;
     return(true);
 }