diff --git a/Homologation.cpp b/Homologation.cpp index db810d8..05098a1 100644 --- a/Homologation.cpp +++ b/Homologation.cpp @@ -33,6 +33,8 @@ Homologation::Homologation(QWidget *parent) : QWidget(parent) { connect(this->replier, &QPushButton::pressed, this, &Homologation::onReplierClicked); connect(this->panneauGauche, &QPushButton::pressed, this, &Homologation::onPanneauGaucheClicked); + + connect(this->panneauDroit, &QPushButton::pressed, this, &Homologation::onPanneauDroitClicked); } void Homologation::onDeplierClicked() diff --git a/MainWindow.cpp b/MainWindow.cpp index 904403b..84dd61d 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -65,6 +65,8 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi }); connect(this->homologation, &Homologation::replierClicked, [&]() { + this->tcpClient->sendMessage("ihm;servo_moteur;uncheck panneau;6\n"); + this->tcpClient->sendMessage("ihm;servo_moteur;uncheck panneau;7\n"); this->tcpClient->sendMessage("ihm;servo_moteur;fermer pince;0"); std::this_thread::sleep_for(std::chrono::milliseconds(100)); this->tcpClient->sendMessage("ihm;servo_moteur;fermer pince;1"); @@ -75,13 +77,15 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi }); connect(this->homologation, &Homologation::panneauGaucheClicked, [&]() { + this->tcpClient->sendMessage("ihm;servo_moteur;uncheck panneau;6\n"); this->tcpClient->sendMessage("ihm;servo_moteur;baisser bras;1\n"); - this->tcpClient->sendMessage("ihm;servo_moteur;check panneau;6\n"); + this->tcpClient->sendMessage("ihm;servo_moteur;check panneau;7\n"); }); connect(this->homologation, &Homologation::panneauDroitClicked, [&]() { + this->tcpClient->sendMessage("ihm;servo_moteur;uncheck panneau;7\n"); this->tcpClient->sendMessage("ihm;servo_moteur;baisser bras;1\n"); - this->tcpClient->sendMessage("ihm;servo_moteur;check panneau;7\n"); + this->tcpClient->sendMessage("ihm;servo_moteur;check panneau;6\n"); }); this->teamChooser = new TeamChooser(centralWidget);