src/states.c
changeset 178 01d81faa3350
parent 152 5e14844e5756
child 183 4cddad17c81f
--- a/src/states.c	Fri May 04 12:22:48 2007 +0200
+++ b/src/states.c	Fri May 04 12:26:46 2007 +0200
@@ -110,16 +110,26 @@
 				switchCommunicationState(d, &newCommunicationState);
 				/* call user app related state func. */
 				(*d->initialisation)();
+				
 			}
 			break;
 								
 			case Pre_operational:
 			{
+				
 				s_state_communication newCommunicationState = {0, 1, 1, 1, 1, 0};
 				d->nodeState = Pre_operational;
 				newState = Pre_operational;
 				switchCommunicationState(d, &newCommunicationState);
-				(*d->preOperational)();
+				if (!(*(d->iam_a_slave)))
+				{
+					UNS32 res;
+					res = decompo_dcf(d,0x01);
+				}
+				else 
+				{
+					(*d->preOperational)();
+				}
 			}
 			break;