This commit is contained in:
ackimixs
2024-05-07 14:41:17 +02:00
parent 166187b8f0
commit 324fc0c8f0
2 changed files with 8 additions and 2 deletions

View File

@@ -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()

View File

@@ -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);