--- a/objdictgen/gen_cfile.py Fri Jun 06 22:18:13 2008 +0200
+++ b/objdictgen/gen_cfile.py Mon Jun 09 11:13:45 2008 +0200
@@ -412,7 +412,7 @@
maxPDOtransmit += 1
texts["maxPDOtransmit"] = max(1, maxPDOtransmit)
for index_cat in index_categories:
- strQuickIndex += "\nquick_index %s_%s = {\n"%(texts["NodeName"], index_cat)
+ strQuickIndex += "\nconst quick_index %s_%s = {\n"%(texts["NodeName"], index_cat)
sep = ","
for i, (cat, idx_min, idx_max) in enumerate(categories):
if i == len(categories) - 1:
@@ -508,7 +508,7 @@
fileContent += strQuickIndex
fileContent += """
-UNS16 %(NodeName)s_ObjdictSize = sizeof(%(NodeName)s_objdict)/sizeof(%(NodeName)s_objdict[0]);
+const UNS16 %(NodeName)s_ObjdictSize = sizeof(%(NodeName)s_objdict)/sizeof(%(NodeName)s_objdict[0]);
CO_Data %(NodeName)s_Data = CANOPEN_NODE_DATA_INITIALIZER(%(NodeName)s);