def SetBack(self): x = self.marche.get() print("==>Back", self.CP.name, "-", x) # self.powerScale = 'Enabled' self.PwrWidget.config(state='active') self.PwrWidget.config(bg='light blue') ESP.SendData(ESP.MsgBackwardOrder, self.CP.numCtrlPoint)
def SetStop(self): x = self.marche.get() print("==>Stop", self.CP.name, "-", x) self.speed.set(0) self.PwrWidget.config(state='disabled') self.PwrWidget.config(bg='gray') ESP.SendData(ESP.MsgStopOrder, self.CP.numCtrlPoint)
def SetForkLeft1(self): print("==>Fork1 SET LEFT: ", self.CP.name, self.CP.TrimLeft[0], self.CP.TrimRight[0], "-") ESP.MsgForkLeft[1] = 1 ESP.MsgForkLeft[2] = int(self.CP.TrimLeft[0]) ESP.SendData(ESP.MsgForkLeft, self.CP.numCtrlPoint)
def LightOff(self): print("==>LightOff", self.CP.name, '-', self.light.get()) ESP.SendData(ESP.MsgLightOff, self.CP.numCtrlPoint)
def SetPower(self, PowerValue): print("valeur de PowerValue", PowerValue) print("==>Set Power:", self.CP.name, ':', PowerValue) ESP.MsgPowerOrder[1] = int(PowerValue) ESP.SendData(ESP.MsgPowerOrder, self.CP.numCtrlPoint)
def SetStart(self): x = self.marche.get() print("==>Start", self.CP.name, "-", x) self.PwrWidget.config(state='active') self.PwrWidget.config(bg='light blue') ESP.SendData(ESP.MsgStartOrder, self.CP.numCtrlPoint)
def setServo(self): print("==>SetServo", self.name, '-', self.light.get()) ESP.SendData(ESP.MsgLightOff, self.CP.numCtrlPoint)
def SetForkRight3(self): print("==>Fork3 SET RIGHT: ", self.CP.name, self.CP.TrimLeft[2], self.CP.TrimRight[2], "-") ESP.MsgForkRight[1] = 3 ESP.MsgForkLeft[2] = int(self.CP.TrimLeft[2]) ESP.SendData(ESP.MsgForkRight, self.CP.numCtrlPoint)