# HG changeset patch
# User etisserant
# Date 1188486105 -7200
# Node ID dbcd80bcab823a2b73aa5ad7779f44b02932aafa
# Parent  1eafe582b6a1a7e8b5482ee00699b060ad0fa549
Prevent potential problem with missing 0x1005 OD entry

diff -r 1eafe582b6a1 -r dbcd80bcab82 objdictgen/gen_cfile.py
--- a/objdictgen/gen_cfile.py	Thu Aug 30 17:01:11 2007 +0200
+++ b/objdictgen/gen_cfile.py	Thu Aug 30 17:01:45 2007 +0200
@@ -317,6 +317,13 @@
 #                     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"]