# HG changeset patch # User lbessard # Date 1191599515 -7200 # Node ID a20fb174f46ed55477db6687f8e578a5a9aa604d # Parent e9667bec7f004025f7a0aced513c0c33e2a2cd29 Bug on bit locations generation fixed diff -r e9667bec7f00 -r a20fb174f46e plugins/canfestival/config_utils.py --- a/plugins/canfestival/config_utils.py Tue Oct 02 18:05:36 2007 +0200 +++ b/plugins/canfestival/config_utils.py Fri Oct 05 17:51:55 2007 +0200 @@ -364,14 +364,14 @@ # If a PDO mappable if subentry_infos and subentry_infos["pdo"]: if sizelocation == "X" and len(loc) > 3: - numbit = loc[4] + numbit = loc[3] elif sizelocation != "X" and len(loc) > 3: raise ValueError, "Cannot set bit offset for non bool '%s' variable (ID:%d,Idx:%x,sIdx:%x))" % (name,nodeid,index,subindex) else: numbit = None entryinfos = node.GetSubentryInfos(index, subindex) - if entryinfos["type"] != COlocationtype: + if location["IEC_TYPE"] != "BOOL" and entryinfos["type"] != COlocationtype: raise ValueError, "Invalid type \"%s\"-> %d != %d for location\"%s\"" % (location["IEC_TYPE"], COlocationtype, entryinfos["type"] , name) typeinfos = node.GetEntryInfos(COlocationtype) @@ -431,7 +431,7 @@ #------------------------------------------------------------------------------- for nodeid, locations in self.LocationsNotMapped.items(): - node = nodelist.SlaveNodes[nodeid]["Node"] + node = self.NodeList.SlaveNodes[nodeid]["Node"] # Initialize number of params and data to add to node DCF nbparams = 0