|
@@ -176,6 +176,20 @@ void RecvController(const std::shared_ptr<apollo::control::ControlCommand> &xcmd
|
|
|
gpShenlanfd->SetDecision(xdcs);
|
|
|
}
|
|
|
|
|
|
+void testthread()
|
|
|
+{
|
|
|
+ while(gbthreadrun)
|
|
|
+ {
|
|
|
+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
|
+ iv::dcs xdcs;
|
|
|
+ xdcs.mfBrake = 0;
|
|
|
+ xdcs.mfTorque = 0;
|
|
|
+ xdcs.mfWheel = 300;
|
|
|
+ xdcs.mblampleft = false; xdcs.mblampright = false;
|
|
|
+ gpShenlanfd->SetDecision(xdcs);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
{
|
|
@@ -213,10 +227,13 @@ int main(int argc, char *argv[])
|
|
|
gpShenlanfd = new Shenlanfd();
|
|
|
gpthreadsend = new std::thread(threadsend);
|
|
|
|
|
|
+// std::thread * ptestthread = new std::thread(testthread);
|
|
|
+
|
|
|
apollo::cyber::WaitForShutdown();
|
|
|
|
|
|
gbthreadrun = false;
|
|
|
gpthreadsend->join();
|
|
|
+// ptestthread->join();
|
|
|
delete gpShenlanfd;
|
|
|
std::cout<<" Shut Down."<<std::endl;
|
|
|
|