def OnSkipClick(self, e):\r
self.GetParent().FindWindowById(wx.ID_FORWARD).Enable()\r
\r
- def OnCheckClick(self, e):\r
+ def OnCheckClick(self, e = None):\r
if self.comm != None:\r
self.comm.close()\r
del self.comm\r
+ self.comm = None\r
+ wx.CallAfter(self.OnCheckClick)\r
+ return\r
self.infoBox.SetInfo('Connecting to machine.')\r
self.infoBox.SetBusyIndicator()\r
self.commState.SetBitmap(self.unknownBitmap)\r
elif self.comm.isError():\r
wx.CallAfter(self.commState.SetBitmap, self.crossBitmap)\r
wx.CallAfter(self.infoBox.SetError, 'Failed to establish connection with the printer.')\r
+ wx.CallAfter(self.endstopBitmap.Show, False)\r
wx.CallAfter(self.machineState.SetLabel, 'Communication State: %s' % (self.comm.getStateString()))\r
\r
def mcMessage(self, message):\r
if self.checkupState == 3:\r
if not self.xMinStop and not self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop:\r
self.checkupState = 4\r
- wx.CallAfter(self.infoBox.SetAttention, 'Please press the left X endstop.')\r
- wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopXMinBitmap)\r
- elif self.checkupState == 4:\r
- if self.xMinStop and not self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop:\r
- self.checkupState = 5\r
wx.CallAfter(self.infoBox.SetAttention, 'Please press the right X endstop.')\r
wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopXMaxBitmap)\r
- elif self.checkupState == 5:\r
+ elif self.checkupState == 4:\r
if not self.xMinStop and self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop:\r
+ self.checkupState = 5\r
+ wx.CallAfter(self.infoBox.SetAttention, 'Please press the left X endstop.')\r
+ wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopXMinBitmap)\r
+ elif self.checkupState == 5:\r
+ if self.xMinStop and not self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop:\r
self.checkupState = 6\r
wx.CallAfter(self.infoBox.SetAttention, 'Please press the front Y endstop.')\r
wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopYMinBitmap)\r