LSS patch from Edward. Now, SetNodeId is not called from nmtslave anymore in case of LSS.
authoretisserant
Mon, 23 Jun 2008 17:54:18 +0200 (2008-06-23)
changeset 483 763ae2ca410a
parent 482 ec49f7132e36
child 484 f59d1cdde42b
LSS patch from Edward. Now, SetNodeId is not called from nmtslave anymore in case of LSS.
src/nmtSlave.c
--- a/src/nmtSlave.c	Wed Jun 18 11:15:17 2008 +0200
+++ b/src/nmtSlave.c	Mon Jun 23 17:54:18 2008 +0200
@@ -82,8 +82,10 @@
          if(d->NMT_Slave_Communications_Reset_Callback != NULL)
             d->NMT_Slave_Communications_Reset_Callback(d);
 #ifdef CO_ENABLE_LSS
-  		if(getNodeId(d)!=d->lss_transfer.nodeID && getNodeId(d)>0 && getNodeId(d)<=127)
-  			setNodeId(d, d->lss_transfer.nodeID);
+         // LSS changes NodeId here in case lss_transfer.nodeID
+         // doesn't match current getNodeId()
+         if(newNodeId!=d->lss_transfer.nodeID && newNodeId>0 && newNodeId<=127 )
+            newNodeId = d->lss_transfer.nodeID;
 #endif
         setState(d,Initialisation);
         break;