|
From: <ge...@us...> - 2008-04-22 00:16:16
|
Revision: 151
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=151&view=rev
Author: gerkey
Date: 2008-04-21 17:16:23 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
added enable_gui option
Modified Paths:
--------------
pkg/trunk/gmapping/playerwrapper/playergfswrapper.cpp
pkg/trunk/gmapping/playerwrapper/playergfswrapper.h
Modified: pkg/trunk/gmapping/playerwrapper/playergfswrapper.cpp
===================================================================
--- pkg/trunk/gmapping/playerwrapper/playergfswrapper.cpp 2008-04-21 21:49:53 UTC (rev 150)
+++ pkg/trunk/gmapping/playerwrapper/playergfswrapper.cpp 2008-04-22 00:16:23 UTC (rev 151)
@@ -114,6 +114,9 @@
memset(&this->map,0,sizeof(player_map_data_t));
this->map_resolution = 0.0;
+
+ int eg = cf->ReadInt(section, "enable_gui", 0);
+ this->enable_gui = eg ? true : false;
}
QApplication* app;
@@ -171,8 +174,10 @@
}
// start GFS thread
- //this->gsp->start(this);
- pthread_create(&this->gui_thread, 0, GUI_thread, this);
+ if(this->enable_gui)
+ pthread_create(&this->gui_thread, 0, GUI_thread, this);
+ else
+ this->gsp->start(this);
this->StartThread();
return(0);
@@ -186,8 +191,10 @@
this->laser->Unsubscribe(this->InQueue);
// stop GFS thread
- app->exit();
- //this->gsp->stop();
+ if(this->enable_gui)
+ app->exit();
+ else
+ this->gsp->stop();
delete this->gsp;
Modified: pkg/trunk/gmapping/playerwrapper/playergfswrapper.h
===================================================================
--- pkg/trunk/gmapping/playerwrapper/playergfswrapper.h 2008-04-21 21:49:53 UTC (rev 150)
+++ pkg/trunk/gmapping/playerwrapper/playergfswrapper.h 2008-04-22 00:16:23 UTC (rev 151)
@@ -73,6 +73,7 @@
// Current map
player_map_data_t map;
double map_resolution;
+ bool enable_gui;
public:
PlayerGFSWrapper(ConfigFile* cf, int section);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|