# HG changeset patch # User Laurent Bessard # Date 1362502611 -3600 # Node ID f1c6b7a6f44b3e8ade94d5107b603389958b5e7c # Parent 463d4b2b058db1fd16ced6e49ce4e4401b775a51# Parent c0dcbbdb0bb1046473ddfa7054f34d586e6a2112 Merged diff -r c0dcbbdb0bb1 -r f1c6b7a6f44b canfestival/canfestival.py --- a/canfestival/canfestival.py Tue Mar 05 17:55:15 2013 +0100 +++ b/canfestival/canfestival.py Tue Mar 05 17:56:51 2013 +0100 @@ -400,7 +400,6 @@ - @@ -419,19 +418,11 @@ child["type"] = DLL_LIST return infos - def GetCanDriver(self): + def CTNGenerate_C(self, buildpath, locations): can_driver = self.CanFestivalInstance.getCAN_Driver() - if sys.platform == 'win32': - if self.CanFestivalInstance.getDebug_mode() and os.path.isfile(os.path.join("%s"%(can_driver + '_DEBUG.dll'))): - can_driver += '_DEBUG.dll' - else: - can_driver += '.dll' - return can_driver - - def CTNGenerate_C(self, buildpath, locations): format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())), - "candriver" : self.GetCanDriver(), + "candriver" : can_driver, "nodes_includes" : "", "board_decls" : "", "nodes_init" : "", @@ -522,7 +513,13 @@ f = open(cf_main_path,'w') f.write(cf_main) f.close() - - return [(cf_main_path, local_canfestival_config.getCFLAGS(CanFestivalPath))],local_canfestival_config.getLDFLAGS(CanFestivalPath), True - - + + res = [(cf_main_path, local_canfestival_config.getCFLAGS(CanFestivalPath))],local_canfestival_config.getLDFLAGS(CanFestivalPath), True + + can_drv_ext = self.GetCTRoot().GetBuilder().extension + can_driver_path = os.path.join(CanFestivalPath,"drivers",can_driver,"libcanfestival_"+can_driver+can_drv_ext) + if os.path.exists(can_driver_path): + res += ((can_driver+can_drv_ext, file(can_driver_path,"rb")),) + + return res + diff -r c0dcbbdb0bb1 -r f1c6b7a6f44b runtime/PLCObject.py --- a/runtime/PLCObject.py Tue Mar 05 17:55:15 2013 +0100 +++ b/runtime/PLCObject.py Tue Mar 05 17:56:51 2013 +0100 @@ -67,6 +67,7 @@ self.hmi_frame = None self.website = website self._loading_error = None + self.python_threads_vars = None # Get the last transfered PLC if connector must be restart try: