attempt to fix

This commit is contained in:
2024-11-04 11:56:57 +01:00
parent 7449f713fa
commit cf59adae8b

View File

@@ -23,7 +23,6 @@ void setup(){
int main(){
setup();
client.run();
while(true){
parseMQTT(readMQTT());
cout << readMQTT() << endl; //debugging
@@ -48,19 +47,15 @@ std::string readMQTT()
void parseMQTT(std::string message){
if(message == "up"){
robot.forward(600);
break;
}
else if(message == "left"){
robot.Rotate(90);
break;
}
else if(message == "down"){
robot.Rotate(-90);
break;
}
else{
std::cout << "Invalid command" << std::endl;
break;
}
}