diff -r 172be32a2482 -r c81397b665b6 canfestival/cf_runtime.c --- a/canfestival/cf_runtime.c Sun Jun 17 12:33:22 2012 +0200 +++ b/canfestival/cf_runtime.c Mon Jun 18 02:35:21 2012 +0200 @@ -1,5 +1,6 @@ #include "canfestival.h" +#include "dcf.h" /* CanFestival nodes generated OD headers*/ %(nodes_includes)s @@ -15,16 +16,6 @@ /* Retrieve PLC cycle time */ extern int common_ticktime__; -/* Called once all NetworkEdit declares slaves have booted*/ -static void Master_post_SlaveBootup(CO_Data* d, UNS8 nodeId) -{ - /* Put the master in operational mode */ - setState(d, Operational); - - /* Ask slave node to go in operational mode */ - masterSendNMTstateChange (d, 0, NMT_Start_Node); -} - /* Per master node slavebootup callbacks. Checks that * every node have booted before calling Master_post_SlaveBootup */ %(slavebootups)s @@ -126,7 +117,9 @@ } #define NODE_SEND_SYNC(nodename)\ - sendSYNCMessage(&nodename##_Data); + if(getState(&nodename##_Data)==Operational){\ + sendSYNCMessage(&nodename##_Data);\ + } void __retrieve_%(locstr)s(void) {