--- a/src/states.c Mon Feb 04 12:06:20 2008 +0100
+++ b/src/states.c Mon Feb 04 16:40:44 2008 +0100
@@ -136,15 +136,15 @@
**/
void switchCommunicationState(CO_Data* d, s_state_communication *newCommunicationState)
{
+#ifdef CO_ENABLE_LSS
+ StartOrStop(csLSS, startLSS(d), stopLSS(d))
+#endif
StartOrStop(csSDO, None, resetSDO(d))
StartOrStop(csSYNC, startSYNC(d), stopSYNC(d))
StartOrStop(csHeartbeat, heartbeatInit(d), heartbeatStop(d))
StartOrStop(csEmergency, emergencyInit(d), emergencyStop(d))
StartOrStop(csPDO, PDOInit(d), PDOStop(d))
StartOrStop(csBoot_Up, None, slaveSendBootUp(d))
-#ifdef CO_ENABLE_LSS
- StartOrStop(csLSS, startLSS(d), stopLSS(d))
-#endif
}
/*!
@@ -209,16 +209,9 @@
(*d->stopped)(d);
}
break;
-#ifdef CO_ENABLE_LSS
- case LssTimingDelay:
- {
- s_state_communication newCommunicationState = {0, 0, 0, 0, 0, 0, 0};
- d->nodeState = LssTimingDelay;
- newState = LssTimingDelay;
- switchCommunicationState(d, &newCommunicationState);
- }
- break;
-#endif
+ default:
+ return 0xFF;
+
}/* end switch case */
}
@@ -250,6 +243,7 @@
UNS16 offset = d->firstIndex->SDO_SVR;
#ifdef CO_ENABLE_LSS
+ d->lss_transfer.nodeID=nodeId;
if(nodeId==0xFF)
{
*d->bDeviceNodeId = nodeId;