Skip to content

Commit

Permalink
[Client] remove useless display in log
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-tz committed Apr 15, 2024
1 parent da7be9a commit 6f5bb02
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions Client/src/rec_recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ namespace {
auto GS = GlobalSettings::instance();
//RecMsg recMsg;
bool isRun = true;
bool DRAW_VELOCITY = true;
QFile recordFile;
QIODevice* recIO;
QString filename;

//QTime timer;
}
RecRecorder::RecRecorder() {
ZSS::ZParamManager::instance()->loadParam(DRAW_VELOCITY,"Lesson/DrawVelocity",true);
}
void RecRecorder::init() {
isRun = true;
Expand Down Expand Up @@ -96,55 +94,9 @@ void RecRecorder::store() {
debugMsgs = recMsg.add_debugmsgs();
if (team == PARAM::BLUE) {
debugMsgs->ParseFromArray(GlobalData::instance()->debugBlueMessages.data(), GlobalData::instance()->debugBlueMessages.size());
// qDebug() << "before : " << recMsg.ByteSizeLong();
if(DRAW_VELOCITY){
auto vision = maintainMsg;
auto robot = vision.robot[PARAM::BLUE][0];
if(vision.robotSize[PARAM::BLUE] > 0){
auto data = GlobalData::instance()->robotCommand[PARAM::BLUE];
auto vel = data[0].robotSpeed[0];
auto lVel = data[-1].robotSpeed[0];
// vel x
{
auto msg = debugMsgs->add_msgs();
msg->set_color(Debug_Msg_Color_CYAN);
msg->set_type(Debug_Msg_Debug_Type_TEXT);
auto text = msg->mutable_text();
auto pos = text->mutable_pos();
pos->set_x(robot.pos.x()/10+15);
pos->set_y(robot.pos.y()/10+18);
text->set_text(QString("vx:%1,ax:%2").arg(vel.vx/100,0,'f',4).arg(fabs(lVel.vx - vel.vx)/100,0,'f',4).toLatin1());
}
// vel y
{
auto msg = debugMsgs->add_msgs();
msg->set_color(Debug_Msg_Color_CYAN);
msg->set_type(Debug_Msg_Debug_Type_TEXT);
auto text = msg->mutable_text();
auto pos = text->mutable_pos();
pos->set_x(robot.pos.x()/10+15);
pos->set_y(robot.pos.y()/10+5);
text->set_text(QString("vy:%1").arg(vel.vy/100,0,'f',2).toLatin1());//m
}
// vel w
{
auto msg = debugMsgs->add_msgs();
msg->set_color(Debug_Msg_Color_CYAN);
msg->set_type(Debug_Msg_Debug_Type_TEXT);
auto text = msg->mutable_text();
auto pos = text->mutable_pos();
pos->set_x(robot.pos.x()/10+15);
pos->set_y(robot.pos.y()/10-8);
text->set_text(QString("vw:%1,aw:%2").arg(vel.vr,0,'f',4).arg(fabs(lVel.vr - vel.vr),0,'f',4).toLatin1());
}
}
}
// qDebug() << "after : " << recMsg.ByteSizeLong();
} else {
debugMsgs->ParseFromArray(GlobalData::instance()->debugYellowMessages.data(), GlobalData::instance()->debugYellowMessages.size());
}
// qDebug() << "FUCK DEBUG MESSAGE SIZE" << debugMsgs->ByteSizeLong();
// qDebug() << "FUCK DEBUG MESSAGE SIZE" << recMsg.debugmsgs(0).ByteSizeLong();
}

GlobalData::instance()->debugMutex.unlock();
Expand Down

0 comments on commit 6f5bb02

Please sign in to comment.