refert to older version to check if this is the problem

This commit is contained in:
ishak jmilou.ishak
2024-11-06 15:08:47 +01:00
parent a67f5238b6
commit 194920bdad
2 changed files with 0 additions and 6 deletions

View File

@@ -596,9 +596,7 @@ void CKobuki::robotSafety(std::string *pointerToMessage) {
parser.data.CliffCenter || parser.data.CliffRight) { parser.data.CliffCenter || parser.data.CliffRight) {
std::cout << "Safety condition triggered!" << std::endl; // Debug print std::cout << "Safety condition triggered!" << std::endl; // Debug print
*pointerToMessage = "estop"; *pointerToMessage = "estop";
safetyActive = true;
forward(-100); // reverse the robot forward(-100); // reverse the robot
safetyActive = false;
} }
std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int>(100))); std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int>(100)));
} }

View File

@@ -51,10 +51,6 @@ std::string readMQTT()
void parseMQTT(std::string message) void parseMQTT(std::string message)
{ {
if(robot.safetyActive){
std::cout << "Safety mode active. Ignoring command: " << message << std::endl;
return;
}
if (message == "up") if (message == "up")
{ {
robot.forward(1024); robot.forward(1024);