start safety thread

This commit is contained in:
2024-11-04 13:10:16 +01:00
parent b90bca0060
commit 3af23f61cf

View File

@@ -19,16 +19,16 @@ void setup(){
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
client.connect();
client.subscribe("home/commands");
std::thread safety([&]() { robot.robotSafety(&message); });
}
int main(){
setup();
std::thread safety([&]() { robot.robotSafety(&message); });
while(true){
parseMQTT(readMQTT());
}
safety.join();
return 0;
}