Fixed herbeat timer array partial initialization in generated OD code.
--- a/examples/DS401_Master/TestMaster.c Thu Mar 20 11:41:06 2008 +0100
+++ b/examples/DS401_Master/TestMaster.c Thu Mar 20 13:40:32 2008 +0100
@@ -54,7 +54,7 @@
const UNS8 TestMaster_iam_a_slave = 0;
-TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE,};
+TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE};
/*
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
--- a/examples/DS401_Slave_Gui/ObjDict.c Thu Mar 20 11:41:06 2008 +0100
+++ b/examples/DS401_Slave_Gui/ObjDict.c Thu Mar 20 13:40:32 2008 +0100
@@ -101,7 +101,7 @@
const UNS8 ObjDict_iam_a_slave = 1;
-TIMER_HANDLE ObjDict_heartBeatTimers[3] = {TIMER_NONE,};
+TIMER_HANDLE ObjDict_heartBeatTimers[3] = {TIMER_NONE,TIMER_NONE,TIMER_NONE};
/*
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
--- a/examples/TestMasterMicroMod/TestMaster.c Thu Mar 20 11:41:06 2008 +0100
+++ b/examples/TestMasterMicroMod/TestMaster.c Thu Mar 20 13:40:32 2008 +0100
@@ -42,7 +42,7 @@
const UNS8 TestMaster_iam_a_slave = 0;
-TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE,};
+TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE};
/*
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
--- a/examples/TestMasterSlave/TestMaster.c Thu Mar 20 11:41:06 2008 +0100
+++ b/examples/TestMasterSlave/TestMaster.c Thu Mar 20 13:40:32 2008 +0100
@@ -46,7 +46,7 @@
const UNS8 TestMaster_iam_a_slave = 0;
-TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE,};
+TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE};
/*
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
--- a/objdictgen/gen_cfile.py Thu Mar 20 11:41:06 2008 +0100
+++ b/objdictgen/gen_cfile.py Thu Mar 20 13:40:32 2008 +0100
@@ -480,7 +480,9 @@
"""%texts
if texts["heartBeatTimers_number"] > 0:
- fileContent += "TIMER_HANDLE %(NodeName)s_heartBeatTimers[%(heartBeatTimers_number)d] = {TIMER_NONE,};\n"%texts
+ declaration = "TIMER_HANDLE %(NodeName)s_heartBeatTimers[%(heartBeatTimers_number)d]"%texts
+ initializer = "{TIMER_NONE" + ",TIMER_NONE" * (texts["heartBeatTimers_number"] - 1) + "}"
+ fileContent += declaration + " = " + initializer + ";\n"
else:
fileContent += "TIMER_HANDLE %(NodeName)s_heartBeatTimers[1];\n"%texts