]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Prevent potential problem with missing 0x1005 OD entry
authoretisserant <etisserant>
Thu, 30 Aug 2007 15:01:45 +0000 (15:01 +0000)
committeretisserant <etisserant>
Thu, 30 Aug 2007 15:01:45 +0000 (15:01 +0000)
objdictgen/gen_cfile.py

index c9acc489445c1123ffb42d6da212a9cce64b9cca..ea2b7f2c925310f389d2c4d33008d1996d7d538a 100644 (file)
@@ -317,6 +317,13 @@ def GenerateFileContent(Node, headerfilepath):
 #                     Declaration of Particular Parameters
 #-------------------------------------------------------------------------------
 
+    if 0x1005 not in communicationlist:
+        entry_infos = Node.GetEntryInfos(0x1005)
+        texts["EntryName"] = entry_infos["name"]
+        indexContents[0x1005] = """\n/* index 0x1005 :   %(EntryName)s */
+                    UNS32 %(NodeName)s_obj1005 = 0x0;   /* 0 */
+"""%texts
+
     if 0x1006 not in communicationlist:
         entry_infos = Node.GetEntryInfos(0x1006)
         texts["EntryName"] = entry_infos["name"]