Skip to content
Snippets Groups Projects
Commit 88dea15e authored by Florent LANGLOIS's avatar Florent LANGLOIS
Browse files

removed windows specidfic stuff (supported by yat)

Added FL in pom
parent b6c95ac6
Branches
Tags
No related merge requests found
......@@ -20,40 +20,6 @@
<plugin>
<groupId>org.freehep</groupId>
<artifactId>freehep-nar-plugin</artifactId>
<configuration>
<specificConfigurations>
<specificConfiguration>
<id>SimulatedMotor Win32</id>
<activation>
<os>Windows</os>
</activation>
<cpp>
<excludes>
<exclude>**/Linux*.*</exclude>
</excludes>
</cpp>
<linker>
<sysLibs>
<sysLib>
<name>winmm</name>
<type>shared</type>
</sysLib>
</sysLibs>
</linker>
</specificConfiguration>
<specificConfiguration>
<id>SimulatedMotor Linux</id>
<activation>
<os>Linux</os>
</activation>
<cpp>
<excludes>
<exclude>**/Win32*.*</exclude>
</excludes>
</cpp>
</specificConfiguration>
</specificConfigurations>
</configuration>
</plugin>
</plugins>
</build>
......@@ -87,5 +53,17 @@
</roles>
<timezone>1</timezone>
</developer>
<developer>
<id>langlois</id>
<name>langlois</name>
<url>http://controle/</url>
<organization>Synchrotron Soleil</organization>
<organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
<roles>
<role>manager</role>
</roles>
<timezone>1</timezone>
</developer>
</developers>
</project>
\ No newline at end of file
......@@ -30,10 +30,6 @@ AxisSimulatorTask::AxisSimulatorTask(size_t _periodic_timeout_ms, Tango::DeviceI
: yat4tango::DeviceTask(_host_device)
{
DEBUG_STREAM <<"AxisSimulatorTask::AxisSimulatorTask <-<-<-"<<endl;
#ifdef WIN32
//- requests a minimum resolution for periodic timers.
timeBeginPeriod(1);
#endif
this->_fAccel = kDefaultAccel; //fake
this->_fDecel = kDefaultDecel; //fake
......@@ -101,11 +97,6 @@ void AxisSimulatorTask::process_message (yat::Message& _msg) throw (Tango::DevFa
//- "release" code goes here
//----------------------------------------------------
#ifdef WIN32
//release timer services
timeEndPeriod(1);
#endif
}
break;
......@@ -121,7 +112,6 @@ void AxisSimulatorTask::process_message (yat::Message& _msg) throw (Tango::DevFa
//wait the requested time to simulate the speed
while(static_cast<unsigned long>(this->_mChrono.elapsed_msec()-this->_fLastChronoValue)< static_cast<unsigned long>(1000.0/this->_fSpeed))
{
////this->sleep(1);//hyper precision sleep(1)->really ~1 ms : this is due to timeBeginPeriod()/timeEndPeriod()
yat::ThreadingUtilities::sleep(0, 1000000);// sec,nanosec ;
}
DEBUG_STREAM<<"Time elapsed = "<<static_cast<unsigned long>(this->_mChrono.elapsed_msec()-this->_fLastChronoValue)<<" (ms)"<<endl;
......
......@@ -23,15 +23,6 @@
#include <yat/memory/DataBuffer.h>
#include <yat4tango/DeviceTask.h>
#ifdef WIN32
// This needs to be included for high precision sleep under win2k
// the winmm library (-lwinmm) is included in the project.
#include <windows.h>
#include <mmsystem.h>
#endif
//===================================================================
// DEVICE PROPERTIES DEFAULT VALUES
//===================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment