|
@@ -24,6 +24,13 @@ VehicleControlClient::~VehicleControlClient(void)
|
|
|
|
|
|
}
|
|
|
|
|
|
+void VehicleControlClient::VehicleControlClientSend(void)
|
|
|
+{
|
|
|
+ mpa = new iv::modulecommext::modulecommmsg<iv::remotectrl>();
|
|
|
+
|
|
|
+ mpa->RegisterSend("remotectrl",10000,1);
|
|
|
+}
|
|
|
+
|
|
|
std::string VehicleControlClient::vehicleControl(void)
|
|
|
{
|
|
|
// Data we are sending to the server.
|
|
@@ -77,10 +84,19 @@ std::string VehicleControlClient::vehicleControl(void)
|
|
|
|
|
|
void VehicleControlClient::updateControlData(void)
|
|
|
{
|
|
|
+#if 0
|
|
|
std::cout<<"shift:"<<shiftCMD<<std::endl;
|
|
|
std::cout<<"steeringWheelAngle:"<<steeringWheelAngleCMD<<std::endl;
|
|
|
std::cout<<"throttle:"<<throttleCMD<<std::endl;
|
|
|
std::cout<<"brake:"<<brakeCMD<<std::endl;
|
|
|
+#endif
|
|
|
+ iv::remotectrl xmsg;
|
|
|
+ xmsg.set_ntype(iv::remotectrl::CtrlType::remotectrl_CtrlType_REMOTE);
|
|
|
+ xmsg.set_acc(0.0);
|
|
|
+ xmsg.set_brake(0.0);
|
|
|
+ xmsg.set_wheel(0.0);
|
|
|
+ xmsg.set_shift(0);
|
|
|
+ mpa->ModuleSendMsg(xmsg);
|
|
|
}
|
|
|
|
|
|
void VehicleControlClient::run()
|