mirror of
https://github.com/CopterExpress/clover.git
synced 2026-06-05 09:09:33 +00:00
clever/rc: Allow disabling GCS thread (#197)
* clever/rc: Allow disabling GCS thread Currently spawning GCS thread results in ROS TCP errors. This patch allows a user to turn off this thread if it's not required. The thread is turned off by default, since it's not required for our PX4 firmware. * clever/rc: Code style
This commit is contained in:
committed by
Oleg Kalachev
parent
361b365f86
commit
fb0e841bd4
@@ -34,12 +34,15 @@ public:
|
||||
nh(),
|
||||
nh_priv("~")
|
||||
{
|
||||
bool use_fake_gcs = nh_priv.param("use_fake_gcs", true);
|
||||
// Create socket thread
|
||||
std::thread t(&RC::socketThread, this);
|
||||
t.detach();
|
||||
|
||||
std::thread gcst(&RC::fakeGCSThread, this);
|
||||
gcst.detach();
|
||||
if (use_fake_gcs) {
|
||||
std::thread gcst(&RC::fakeGCSThread, this);
|
||||
gcst.detach();
|
||||
}
|
||||
|
||||
initLatchedState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user