Skip to content
Snippets Groups Projects
Commit 477a14b5 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Removed the code to handle the Ctrl+C combination because it was not used and...

Removed the code to handle the Ctrl+C combination because it was not used and it gave problems in some inherited classes.
parent f360cc33
No related branches found
No related tags found
No related merge requests found
......@@ -42,17 +42,12 @@ namespace algorithm_base
class AbstractAlgorithmNode
{
protected:
static int ctrl_c_hit_count_;
static void hupCalled(int sig)
{
ROS_WARN("Unexpected SIGHUP caught. Ignoring it.");
}
static void sigCalled(int sig)
{
ctrl_c_hit_count_++;
}
};
/**
......@@ -322,7 +317,7 @@ void *IriBaseAlgorithm<Algorithm>::mainThread(void *param)
// retrieve base algorithm class
IriBaseAlgorithm *iriNode = (IriBaseAlgorithm *)param;
while(ros::ok() && !ctrl_c_hit_count_)
while(ros::ok())
{
// run node stuff
iriNode->mainNodeThread();
......@@ -354,7 +349,7 @@ int IriBaseAlgorithm<Algorithm>::spin(void)
// create the status thread
pthread_create(&this->thread,NULL,this->mainThread,this);
while(ros::ok() && !ctrl_c_hit_count_)
while(ros::ok())
{
// update diagnostics
this->diagnostic_.update();
......@@ -372,7 +367,6 @@ int IriBaseAlgorithm<Algorithm>::spin(void)
}
// definition of the static Ctrl+C counter
int AbstractAlgorithmNode::ctrl_c_hit_count_ = 0;
/**
* \brief base main
......
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