shouldStop

This commit is contained in:
ackimixs
2024-05-21 22:26:21 +02:00
parent 2d779a2c6e
commit 9aee138130

View File

@@ -47,13 +47,12 @@ int main(int argc, char* argv[]) {
int lastEtat = digitalRead(TIRETTE_GPIO);
// Boucle principale
while (!client.shouldStop()) {
while (!client.shouldStop() && !shouldStop) {
int etat = digitalRead(TIRETTE_GPIO);
if (etat == LOW) {
client.setTiretteState(true);
} else
{
} else {
client.setTiretteState(false);
if (lastEtat != etat) {
// std::cout << "LETSGO" << std::endl;