|
@@ -54,10 +54,11 @@ boost::shared_ptr<iv::control::Controller> gcontroller; //实际车辆控制器
|
|
|
|
|
|
void executeDecition(const iv::brain::decition decition)
|
|
|
{
|
|
|
- std::cout<<"acc is "<<decition.torque()<<" ang is "<<decition.wheelangle()<<std::endl;
|
|
|
- std::cout<<"limitspeed is "<<decition.speed()<<" brake is "<<decition.brake()<<std::endl;
|
|
|
- std::cout<<"drive_mode is "<<decition.mode()<<" elec_brake is "<<decition.handbrake()<<std::endl;
|
|
|
- std::cout<<"brake_light is "<<decition.brakelamp()<<" dangwei is "<<decition.gear()<<std::endl;
|
|
|
+ std::cout<<" ang is "<<decition.wheelangle()<<std::endl;
|
|
|
+ std::cout<<" brake is "<<decition.brake()<<std::endl;
|
|
|
+ std::cout<<"drive_mode is "<<decition.mode()<<std::endl;
|
|
|
+ std::cout<<" dangwei is "<<decition.gear()<<std::endl;
|
|
|
+ std::cout<<"dspeed is" << decition.speed()<<std::endl;
|
|
|
gcontroller->inialize();
|
|
|
gcontroller->control_wheel(decition.wheelangle());
|
|
|
gcontroller->control_brake(decition.brake());
|
|
@@ -66,6 +67,7 @@ void executeDecition(const iv::brain::decition decition)
|
|
|
gcontroller->control_right_light(decition.rightlamp());
|
|
|
gcontroller->control_highbeam(decition.highbeam());
|
|
|
gcontroller->control_dangwei(decition.gear());
|
|
|
+ gcontroller->control_mode(decition.mode());
|
|
|
}
|
|
|
|
|
|
|
|
@@ -90,18 +92,18 @@ void ListenRemotectrl(const char * strdata,const unsigned int nSize,const unsign
|
|
|
else
|
|
|
{
|
|
|
gbAutoDriving = false;
|
|
|
- xdecition.set_torque(xrc.acc());
|
|
|
+ //xdecition.set_torque(xrc.acc());
|
|
|
xdecition.set_brake(xrc.brake());
|
|
|
xdecition.set_wheelangle(xrc.wheel()*5.5f);
|
|
|
xdecition.set_speed(5);
|
|
|
xdecition.set_gear(1);
|
|
|
- xdecition.set_handbrake(0);
|
|
|
- xdecition.set_grade(1);
|
|
|
+ //xdecition.set_handbrake(0);
|
|
|
+ // xdecition.set_grade(1);
|
|
|
xdecition.set_mode(1);
|
|
|
- xdecition.set_speak(0);
|
|
|
- xdecition.set_headlight(false);
|
|
|
- xdecition.set_engine(0);
|
|
|
- xdecition.set_taillight(false);
|
|
|
+ //xdecition.set_speak(0);
|
|
|
+ //xdecition.set_headlight(false);
|
|
|
+ // xdecition.set_engine(0);
|
|
|
+ // xdecition.set_taillight(false);
|
|
|
gMutex.lock();
|
|
|
gdecition_remote.CopyFrom(xdecition);
|
|
|
gMutex.unlock();
|