lpcmanager

enabled canopen plugin for non MC8

2015-06-19, Edouard Tisserant
3350ed098c70
Parents bf4901ab3a96
Children d0ed0039ea38
enabled canopen plugin for non MC8
  • +10 -10
    LPCManager.py
  • --- a/LPCManager.py Fri Jun 19 14:21:05 2015 +0200
    +++ b/LPCManager.py Fri Jun 19 20:18:11 2015 +0200
    @@ -104,14 +104,14 @@
    from controls import TextCtrlAutoComplete
    havecanfestival = False
    -try:
    - from canfestival import RootClass as CanOpenRootClass
    - from canfestival.canfestival import _SlaveCTN, _NodeListCTN, NodeManager
    - from canfestival.NetworkEditor import NetworkEditor
    - from canfestival.SlaveEditor import SlaveEditor
    - havecanfestival = True
    -except:
    - havecanfestival = False
    +#try:
    +from canfestival import RootClass as CanOpenRootClass
    +from canfestival.canfestival import _SlaveCTN, _NodeListCTN, NodeManager
    +from canfestival.NetworkEditor import NetworkEditor
    +from canfestival.SlaveEditor import SlaveEditor
    +havecanfestival = True
    +#except:
    +# havecanfestival = False
    SCROLLBAR_UNIT = 10
    WINDOW_COLOUR = wx.Colour(240,240,240)
    @@ -592,12 +592,12 @@
    self.LoadChildren()
    canopen_child = self.GetChildByName("CanOpen")
    - if arch == "MC8" and havecanfestival and canopen_child is None:
    + if havecanfestival and canopen_child is None:
    canopen = self.CTNAddChild("CanOpen", "CanOpen", 0)
    canopen.LoadChildren()
    canopen.CTNRequestSave()
    - elif (arch != "MC8" or not havecanfestival) and canopen_child is not None:
    + elif not havecanfestival and canopen_child is not None:
    canopen_child.CTNRemove()
    if self.CTNTestModified():