Changed call to sleep function because it gets redefined when using RTAI_LXRT
authormwildbolz
Mon, 01 Oct 2012 17:04:34 +0200
changeset 751 d005211221c7
parent 750 bfb63ff7106e
child 752 48a0ebbefa74
Changed call to sleep function because it gets redefined when using RTAI_LXRT
examples/CANOpenShell/CANOpenShell.c
--- a/examples/CANOpenShell/CANOpenShell.c	Mon Oct 01 17:01:36 2012 +0200
+++ b/examples/CANOpenShell/CANOpenShell.c	Mon Oct 01 17:04:34 2012 +0200
@@ -58,13 +58,17 @@
 char BoardBusName[31];
 char BoardBaudRate[5];
 s_BOARD Board = {BoardBusName, BoardBaudRate};
-CO_Data* CANOpenShellOD_Data;
+CO_Data* CANOpenShellOD_Data;
 char LibraryPath[512];
 
 /* Sleep for n seconds */
 void SleepFunction(int second)
 {
+#ifdef USE_RTAI
+	sleep(second);
+#else
 	SLEEP(second);
+#endif
 }
 
 /* Ask a slave node to go in operational mode */