Skip to content
Snippets Groups Projects
Commit 548651c9 authored by ELATTAOUI's avatar ELATTAOUI
Browse files

Inifinite loop at startup fixed

parent e4a0ade2
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
</parent>
<groupId>fr.soleil.device</groupId>
<artifactId>KeithleyDMM6500-${aol}-${mode}</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>nar</packaging>
<name>KeithleyDMM6500</name>
<description>KeithleyDMM6500 device</description>
......
......@@ -180,17 +180,18 @@ void KeithleyDMM6500::init_device()
//- instanciate and start thread
try
{
m_task = new KeithleyManager( this,
communicationLinkName,
configuration);
//- configure Keithley first
m_task->configure();
if (!communicationLinkName.empty() )
{
m_task = new KeithleyManager( this,
communicationLinkName,
configuration);
//- start thread
m_task->go();
//- start thread
m_task->go();
//- update mode
m_task->get_mode();
//- update mode
m_task->get_mode();
}
}
catch(...)
{
......@@ -386,14 +387,22 @@ Tango::DevState KeithleyDMM6500::dev_state()
Tango::DevState argout = Tango::UNKNOWN; // replace by your own algorithm
// Add your own code
if (m_task)
if ( communicationLinkName.empty() )
{
argout = m_task->get_state_status(m_status);
argout = Tango::FAULT;
m_status = "CommunicationLinkName property is not defined!";
}
else
else
{
argout = Tango::FAULT;
m_status += "Device initialization failed : no task!";
if (m_task)
{
argout = m_task->get_state_status(m_status);
}
else
{
argout = Tango::FAULT;
m_status += "Device initialization failed : no task!";
}
}
set_status(m_status.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment