public void UpdateLEDState(object receiver, LEDMessageArgs e)
 {
     if (e.nbLed_a == 1)
     {
         CheckBoxLED1.IsChecked = e.stateLed_a;
         currentLED1State       = e.stateLed_a;
     }
     else if (e.nbLed_a == 2)
     {
         CheckBoxLED2.IsChecked = e.stateLed_a;
         currentLED2State       = e.stateLed_a;
     }
     else if (e.nbLed_a == 3)
     {
         CheckBoxLED3.IsChecked = e.stateLed_a;
         currentLED3State       = e.stateLed_a;
     }
 }
示例#2
0
 public void GenerateMessageLEDSetStateConsigneToRobot(object sender, LEDMessageArgs e)
 {
     byte[] payload = new byte[] { (byte)e.nbLed_a, (byte)(e.stateLed_a ? 0x00 : 0x01) };
     OnMessageToRobot((ushort)Commands.LED_GUI_TO_ROBOT, 2, payload);
 }