etherlab/EtherCATManagementEditor.py
changeset 2382 e783c6beacf1
parent 2381 1c40e3976cc2
child 2383 6cc3460be285
equal deleted inserted replaced
2381:1c40e3976cc2 2382:e783c6beacf1
   641         """
   641         """
   642         self.Controler.CommonMethod.Check_PREOP = False
   642         self.Controler.CommonMethod.Check_PREOP = False
   643         self.Controler.CommonMethod.Check_SAFEOP = False
   643         self.Controler.CommonMethod.Check_SAFEOP = False
   644         self.Controler.CommonMethod.Check_OP = False
   644         self.Controler.CommonMethod.Check_OP = False
   645 
   645 
   646     def SDOModifyDialog (self, event):
   646     def SDOModifyDialog(self, event):
   647         """
   647         """
   648         Create dialog for SDO value modify
   648         Create dialog for SDO value modify
   649         if user enter data, perform command "ethercat download"
   649         if user enter data, perform command "ethercat download"
   650         @param event : gridlib.EVT_GRID_CELL_LEFT_DCLICK object
   650         @param event : gridlib.EVT_GRID_CELL_LEFT_DCLICK object
   651         """
   651         """
   652         self.ClearStateFlag()
   652         self.ClearStateFlag()
   653 
   653 
   654         # CheckSDODataAccess is checking that OD(Object Dictionary) has "w"
   654         # CheckSDODataAccess is checking that OD(Object Dictionary) has "w"
   655         if event.GetCol() == 7 and self.CheckSDODataAccess(event.GetRow()):
   655         if event.GetCol() == 7 and self.CheckSDODataAccess(event.GetRow()):
   656             dlg = wx.TextEntryDialog (self, "Enter hex or dec value (if enter dec value, it automatically conversed hex value)",
   656             dlg = wx.TextEntryDialog(
   657                                       "SDOModifyDialog", style=wx.OK | wx.CANCEL)
   657                 self,
       
   658                 _("Enter hex or dec value (if enter dec value, it automatically conversed hex value)"),
       
   659                 "SDOModifyDialog",
       
   660                 style=wx.OK | wx.CANCEL)
   658 
   661 
   659             start_value = self.GetCellValue(event.GetRow(), event.GetCol())
   662             start_value = self.GetCellValue(event.GetRow(), event.GetCol())
   660             dlg.SetValue(start_value)
   663             dlg.SetValue(start_value)
   661 
   664 
   662             if dlg.ShowModal() == wx.ID_OK:
   665             if dlg.ShowModal() == wx.ID_OK: