def mcStateChange(self, state): if self.machineCom != None: if state == self.machineCom.STATE_OPERATIONAL and self.cam != None: self.cam.endTimelapse() if state == self.machineCom.STATE_OPERATIONAL: taskbar.setBusy(self, False) if self.machineCom.isClosedOrError(): taskbar.setBusy(self, False) if self.machineCom.isPaused(): taskbar.setPause(self, True) wx.CallAfter(self.UpdateButtonStates) wx.CallAfter(self.UpdateProgress)
def mcStateChange(self, state): if self.machineCom is not None: if state == self.machineCom.STATE_OPERATIONAL and self.cam is not None: self.cam.endTimelapse() if state == self.machineCom.STATE_OPERATIONAL: taskbar.setBusy(self, False) if self.machineCom.isClosedOrError(): taskbar.setBusy(self, False) if self.machineCom.isPaused(): taskbar.setPause(self, True) wx.CallAfter(self.UpdateButtonStates) wx.CallAfter(self.UpdateProgress)
def mcStateChange(self, state): if self.machineCom is not None: if state == self.machineCom.STATE_OPERATIONAL and self.cam is not None: self.cam.endTimelapse() if state == self.machineCom.STATE_OPERATIONAL: taskbar.setBusy(self, False) if self.machineCom.isClosedOrError(): taskbar.setBusy(self, False) if self.machineCom.isPaused(): taskbar.setPause(self, True) if self.machineCom.isClosedOrError(): print 'STATE:CLOSED' elif self.machineCom.isPrinting(): print 'STATE:PRINTING' else: print 'STATE:IDLE' wx.CallAfter(self.UpdateButtonStates) wx.CallAfter(self.UpdateProgress)