1545 def ShowError(self, logger, from_location, to_location): |
1545 def ShowError(self, logger, from_location, to_location): |
1546 chunk_infos = self.GetChunkInfos(from_location, to_location) |
1546 chunk_infos = self.GetChunkInfos(from_location, to_location) |
1547 for infos, (start_row, start_col) in chunk_infos: |
1547 for infos, (start_row, start_col) in chunk_infos: |
1548 start = (from_location[0] - start_row, from_location[1] - start_col) |
1548 start = (from_location[0] - start_row, from_location[1] - start_col) |
1549 end = (to_location[0] - start_row, to_location[1] - start_col) |
1549 end = (to_location[0] - start_row, to_location[1] - start_col) |
1550 print from_location, to_location, start_row, start_col, start, end |
1550 #print from_location, to_location, start_row, start_col, start, end |
1551 if self.AppFrame is not None: |
1551 if self.AppFrame is not None: |
1552 self.AppFrame.ShowError(infos, start, end) |
1552 self.AppFrame.ShowError(infos, start, end) |
1553 |
1553 |
1554 def _showIECcode(self): |
1554 def _showIECcode(self): |
1555 plc_file = self._getIECcodepath() |
1555 plc_file = self._getIECcodepath() |
1984 # Send PLC on target |
1984 # Send PLC on target |
1985 builder = self.GetBuilder() |
1985 builder = self.GetBuilder() |
1986 if builder is not None: |
1986 if builder is not None: |
1987 data = builder.GetBinaryCode() |
1987 data = builder.GetBinaryCode() |
1988 if data is not None : |
1988 if data is not None : |
1989 if self._connector.NewPLC(MD5, data, extrafiles): |
1989 if self._connector.NewPLC(MD5, data, extrafiles) and self.GetIECProgramsAndVariables(): |
1990 self.UnsubscribeAllDebugIECVariable() |
1990 self.UnsubscribeAllDebugIECVariable() |
1991 self.ProgramTransferred() |
1991 self.ProgramTransferred() |
1992 if self.AppFrame is not None: |
1992 if self.AppFrame is not None: |
1993 self.AppFrame.RefreshInstancesTree() |
1993 self.AppFrame.RefreshInstancesTree() |
1994 self.AppFrame.CloseObsoleteDebugTabs() |
1994 self.AppFrame.CloseObsoleteDebugTabs() |