diff --git a/src/main.cpp b/src/main.cpp index 00d1ca3891c0aed4d7337d9d6abb268855abd50e..63dd2c69970e81fd514a58fe9bd7b96a8e20de6e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -107,6 +107,21 @@ void estimatedScoreCallback(const std_msgs::Int32 &estimatedScoreMsg) void loop() { + if (!nh.connected()) + { + lcd.clear(); + lcd.setCursor(0, 0); + lcd.print("Waiting ROS..."); + + while (!nh.connected()) + { + nh.spinOnce(); + delay(MSG_SENDING_INTERVAL); + } + + refreshScreen(); + } + // DEBUT PARTIE TIRETTE int pullCordReading = digitalRead(pullCordPin);