# HG changeset patch # User Laurent Bessard # Date 1363009757 -3600 # Node ID 8d99a1f819cbd065b5f121712122f1f80ff37ff8 # Parent 659198075ce4946abc3fc9db99e8bbcc3c4db741# Parent 0d32a87488141ad47cdf211c5e29e8fd5d5af560 Merged diff -r 659198075ce4 -r 8d99a1f819cb Beremiz.py --- a/Beremiz.py Mon Mar 11 19:17:56 2013 +0900 +++ b/Beremiz.py Mon Mar 11 14:49:17 2013 +0100 @@ -878,7 +878,8 @@ self.RefreshConfigRecentProjects(projectpath) if self.EnableDebug: self.DebugVariablePanel.SetDataProducer(self.CTR) - self.LoadProjectLayout() + if self.EnableSaveProjectState(): + self.LoadProjectLayout() self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE) else: self.ResetView() diff -r 659198075ce4 -r 8d99a1f819cb canfestival/canfestival.py --- a/canfestival/canfestival.py Mon Mar 11 19:17:56 2013 +0900 +++ b/canfestival/canfestival.py Mon Mar 11 14:49:17 2013 +0100 @@ -399,12 +399,15 @@ child["type"] = local_canfestival_config.DLL_LIST return infos - def CTNGenerate_C(self, buildpath, locations): + def GetCanDriver(self): can_driver = self.CanFestivalInstance.getCAN_Driver() if not can_driver : can_driver = local_canfestival_config.DLL_LIST[0] can_drv_ext = self.GetCTRoot().GetBuilder().extension - can_driver_name = "libcanfestival_" + can_driver + can_drv_ext + return "libcanfestival_" + can_driver + can_drv_ext + + def CTNGenerate_C(self, buildpath, locations): + can_driver_name = self.GetCanDriver() format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())), "candriver" : can_driver_name, @@ -500,10 +503,11 @@ f.close() res = [(cf_main_path, local_canfestival_config.getCFLAGS(CanFestivalPath))],local_canfestival_config.getLDFLAGS(CanFestivalPath), True - - can_driver_path = os.path.join(CanFestivalPath,"drivers",can_driver,can_driver_name) - if os.path.exists(can_driver_path): - res += ((can_driver_name, file(can_driver_path,"rb")),) + + if can_driver_name: + can_driver_path = os.path.join(CanFestivalPath,"drivers",can_driver,can_driver_name) + if os.path.exists(can_driver_path): + res += ((can_driver_name, file(can_driver_path,"rb")),) return res