|
@@ -511,23 +511,23 @@ void DataExchangeClient::updateData(uint64_t timeInterval_ms)
|
|
|
{
|
|
|
id = gstrid;
|
|
|
timeStamp = QDateTime::currentMSecsSinceEpoch();
|
|
|
-// SOC = 87.5;
|
|
|
-// statusFeedback = VehicleStatus::STATUS_REMOTE;
|
|
|
+ SOC = 87.5;
|
|
|
+ statusFeedback = VehicleStatus::STATUS_REMOTE;
|
|
|
gMutex_GPSIMU.lock();
|
|
|
mileage += (speed * timeInterval_ms/1000.0)/1000.0; // kilometer
|
|
|
gMutex_GPSIMU.unlock();
|
|
|
-// speed = 0.0; // m/s
|
|
|
-// shiftFeedback = ShiftStatus::SHIFT_DRIVE;
|
|
|
-// steeringWheelAngleFeedback = 1.23; //+/-540 degree
|
|
|
-// throttleFeedback = 0.12;
|
|
|
-// brakeFeedback = 0.34;
|
|
|
-// GPSRTKStatus = 6; //GPS-RTK status 0-6 6 is best
|
|
|
-// positionFeedback.set_latitude(39.0666552);
|
|
|
-// positionFeedback.set_longitude(117.3540963);
|
|
|
-// positionFeedback.set_height(0.84);
|
|
|
-// pitch = 0.03;
|
|
|
-// roll = 0.02;
|
|
|
-// heading = 198.4;
|
|
|
+ speed = 0.0; // m/s
|
|
|
+ shiftFeedback = ShiftStatus::SHIFT_DRIVE;
|
|
|
+ steeringWheelAngleFeedback = 1.23; //+/-540 degree
|
|
|
+ throttleFeedback = 0.12;
|
|
|
+ brakeFeedback = 0.34;
|
|
|
+ GPSRTKStatus = 6; //GPS-RTK status 0-6 6 is best
|
|
|
+ positionFeedback.set_latitude(39.0666552);
|
|
|
+ positionFeedback.set_longitude(117.3540963);
|
|
|
+ positionFeedback.set_height(0.84);
|
|
|
+ pitch = 0.03;
|
|
|
+ roll = 0.02;
|
|
|
+ heading = 198.4;
|
|
|
|
|
|
// QFile xFile;
|
|
|
// xFile.setFileName("/home/nvidia/Pictures/123.jpg");
|
|
@@ -619,10 +619,10 @@ void DataExchangeClient::run()
|
|
|
{
|
|
|
if(abs(xTime.elapsed() - lastTime)>=interval)
|
|
|
{
|
|
|
- updateData(xTime.elapsed() - lastTime);
|
|
|
+ updateData(abs(xTime.elapsed() - lastTime));
|
|
|
std::string reply = uploadVehicleInfo();
|
|
|
std::cout<< reply <<std::endl;
|
|
|
-// std::cout<<std::setprecision(8)<<destinationPosition.latitude()<<","<<destinationPosition.longitude()<<std::endl;
|
|
|
+ std::cout<<std::setprecision(8)<<destinationPosition.latitude()<<","<<destinationPosition.longitude()<<std::endl;
|
|
|
lastTime = xTime.elapsed();
|
|
|
}
|
|
|
|
|
@@ -643,7 +643,8 @@ void DataExchangeClient::run()
|
|
|
void DataExchangeClient::patrolPOI_Recieved_Slot(std::string pathID)
|
|
|
{
|
|
|
std::cout<<"patrol path calculating"<<std::endl;
|
|
|
- QFile mapfile("/home/nvidia/Documents/path2.txt");
|
|
|
+ QFile mapfile;
|
|
|
+ mapfile.setFileName("/home/samuel/Documents/path2.txt");
|
|
|
QVector<org::jeecg::defsDetails::grpc::MapPoint> somePoints;
|
|
|
if(mapfile.open(QIODevice::ReadOnly | QIODevice::Text))
|
|
|
{
|