re add sleep

This commit is contained in:
ackimixs
2024-04-04 19:14:26 +02:00
parent c19258faf6
commit 3de6dc1885

View File

@@ -49,22 +49,35 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi
this->homologation = new Homologation(centralWidget);
connect(this->homologation, &Homologation::deplierClicked, this, [&]() {
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");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;fermer pince;2");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;lever bras;1");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;ouvrir pince;0");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;fermer pince;1");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;ouvrir pince;2");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;check panneau;6");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;check panneau;7");
});
connect(this->homologation, &Homologation::replierClicked, [&]() {
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");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;fermer pince;2");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;baisser bras;1");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;uncheck panneau;6");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
this->tcpClient->sendMessage("ihm;servo_moteur;uncheck panneau;7");
});