]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
add Exit function to DS401SlaveGui, change StopTimerLoop's arg and add TimerCleanup...
authorgreg <greg>
Tue, 6 May 2008 13:31:33 +0000 (13:31 +0000)
committergreg <greg>
Tue, 6 May 2008 13:31:33 +0000 (13:31 +0000)
drivers/timers_win32/timers_win32.cpp
examples/DS401_Slave_Gui/TestSlaveGui.cpp

index d3f5febe2773b605f076b4032c55c0baa4dd244c..152a1f58771e337f106875df54e6d6a90b3f7601 100755 (executable)
@@ -216,6 +216,11 @@ TIMEVAL class_timers::get_elapsed_time()
 
 static class_timers s_timers;
 
+void TimerCleanup(void)
+{
+       /* only used in realtime apps */
+}
+
 void StartTimerLoop(TimerCallback_t init_callback)
    {
    s_timers.start_timer_thread();
@@ -225,7 +230,7 @@ void StartTimerLoop(TimerCallback_t init_callback)
    s_timers.resume_timer_thread();
    }
 
-void StopTimerLoop(void)
+void StopTimerLoop(TimerCallback_t init_callback)
    {
    s_timers.stop_timer_thread();
    }
index 182d18d4244f9e468b1fc5f3b9383b1b2cf90fbd..36b97dc777993fd78099f118ee74d7085f66e504 100644 (file)
@@ -72,10 +72,13 @@ void Exit(CO_Data* d, UNS32 id)
 int
 main_can (s_BOARD SlaveBoard, char *LibraryPath)
 {
-  printf ("Bus name: %s        Freq: %s       Driver: %s\n",
+#if !defined(WIN32) && !defined(__CYGWIN__)
+       TimerInit();
+#endif 
+       
+       printf ("Bus name: %s        Freq: %s       Driver: %s\n",
          SlaveBoard.busname, SlaveBoard.baudrate, LibraryPath);
 
-  TimerInit();
 #ifndef NOT_USE_DYNAMIC_LOADING
   if (LoadCanDriver (LibraryPath) == NULL)
     *textLog << wxT ("Unable to load library\n");