equal
deleted
inserted
replaced
1607 else: |
1607 else: |
1608 self.logger.write_warning(_("Debug : Unknown variable %s\n")%IECPath) |
1608 self.logger.write_warning(_("Debug : Unknown variable %s\n")%IECPath) |
1609 for IECPathToPop in IECPathsToPop: |
1609 for IECPathToPop in IECPathsToPop: |
1610 self.IECdebug_datas.pop(IECPathToPop) |
1610 self.IECdebug_datas.pop(IECPathToPop) |
1611 |
1611 |
1612 Idxs.sort() |
1612 if Idxs: |
1613 self.TracedIECPath = zip(Idxs)[2] |
1613 Idxs.sort() |
1614 self._connector.SetTraceVariablesList(zip(zip(Idxs)[0:1])) |
1614 self.TracedIECPath = zip(Idxs)[2] |
|
1615 self._connector.SetTraceVariablesList(zip(zip(Idxs)[0:1])) |
1615 self.IECdebug_lock.release() |
1616 self.IECdebug_lock.release() |
1616 |
1617 |
1617 #for IEC_path, IECdebug_data in self.IECdebug_datas.iteritems(): |
1618 #for IEC_path, IECdebug_data in self.IECdebug_datas.iteritems(): |
1618 # print IEC_path, IECdebug_data[0].keys() |
1619 # print IEC_path, IECdebug_data[0].keys() |
1619 |
1620 |
1759 """ |
1760 """ |
1760 if self.DebugThread is not None: |
1761 if self.DebugThread is not None: |
1761 self.logger.write(_("Stopping debug\n")) |
1762 self.logger.write(_("Stopping debug\n")) |
1762 self.KillDebugThread() |
1763 self.KillDebugThread() |
1763 |
1764 |
1764 if not self._connector.StopPLC(): |
1765 if self._connector is not None and not self._connector.StopPLC(): |
1765 self.logger.write_error(_("Couldn't stop PLC !\n")) |
1766 self.logger.write_error(_("Couldn't stop PLC !\n")) |
1766 self.UpdateMethodsFromPLCStatus() |
1767 self.UpdateMethodsFromPLCStatus() |
1767 |
1768 |
1768 def _Connect(self): |
1769 def _Connect(self): |
1769 # don't accept re-connetion is already connected |
1770 # don't accept re-connetion is already connected |