src/states.c
changeset 14 1fbdf88163b3
parent 0 4472ee7c6c3e
child 53 73bc47a0db55
equal deleted inserted replaced
13:0e43acff2c96 14:1fbdf88163b3
    93 	}
    93 	}
    94 #define None
    94 #define None
    95 
    95 
    96 void switchCommunicationState(CO_Data* d, s_state_communication *newCommunicationState)
    96 void switchCommunicationState(CO_Data* d, s_state_communication *newCommunicationState)
    97 {
    97 {
    98 	StartOrStop(csBoot_Up,	None,	slaveSendBootUp(d))
       
    99 	StartOrStop(csSDO,	None,		resetSDO(d))
    98 	StartOrStop(csSDO,	None,		resetSDO(d))
   100 	StartOrStop(csSYNC,	startSYNC(d),		stopSYNC(d))
    99 	StartOrStop(csSYNC,	startSYNC(d),		stopSYNC(d))
   101 	StartOrStop(csHeartbeat,	heartbeatInit(d),	heartbeatStop(d))
   100 	StartOrStop(csHeartbeat,	heartbeatInit(d),	heartbeatStop(d))
   102 //	StartOrStop(Emergency,,)
   101 //	StartOrStop(Emergency,,)
   103 	StartOrStop(csPDO,	None,	None)
   102 	StartOrStop(csPDO,	None,	None)
       
   103 	StartOrStop(csBoot_Up,	None,	slaveSendBootUp(d))
   104 }
   104 }
   105 
   105 
   106 UNS8 setState(CO_Data* d, e_nodeState newState)
   106 UNS8 setState(CO_Data* d, e_nodeState newState)
   107 {
   107 {
   108 	while(newState != d->nodeState){
   108 	while(newState != d->nodeState){