mirror of
https://github.com/modelec/tirette.git
synced 2026-03-18 21:50:31 +01:00
shouldStop
This commit is contained in:
5
main.cpp
5
main.cpp
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user