From: greg Date: Tue, 6 May 2008 13:31:33 +0000 (+0000) Subject: add Exit function to DS401SlaveGui, change StopTimerLoop's arg and add TimerCleanup... X-Git-Url: http://rtime.felk.cvut.cz/gitweb/CanFestival-3.git/commitdiff_plain/31dc6f60ef5227a77461d61f2c8b39ad1a9a667d?ds=sidebyside add Exit function to DS401SlaveGui, change StopTimerLoop's arg and add TimerCleanup function in timers_win32 --- diff --git a/drivers/timers_win32/timers_win32.cpp b/drivers/timers_win32/timers_win32.cpp index d3f5feb..152a1f5 100755 --- a/drivers/timers_win32/timers_win32.cpp +++ b/drivers/timers_win32/timers_win32.cpp @@ -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(); } diff --git a/examples/DS401_Slave_Gui/TestSlaveGui.cpp b/examples/DS401_Slave_Gui/TestSlaveGui.cpp index 182d18d..36b97dc 100644 --- a/examples/DS401_Slave_Gui/TestSlaveGui.cpp +++ b/examples/DS401_Slave_Gui/TestSlaveGui.cpp @@ -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");