Beispiel #1
0
 /// <summary>
 /// Determines the current state of the LED and tells the physical layer to change
 ///  that state
 /// Also saves the state of the led in a dedicated variable
 /// Note: Assumes the commands is successful
 /// </summary>
 public void toggleLED_LL()
 {
     log.Debug("LL_ToggleLED");
     if (_deviceConnected)
     {
         if (_ledHigh)
         {
             _physicalLayer.turnLEDOff_PL(); _ledHigh = false;
         }
         else
         {
             _physicalLayer.turnLEDOn_PL(); _ledHigh = true;
         }
     }
     else
     {
         log.Error("Device is not connected, can not toggle LED");
     }
 }