mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
refert to older version to check if this is the problem
This commit is contained in:
@@ -596,9 +596,7 @@ void CKobuki::robotSafety(std::string *pointerToMessage) {
|
||||
parser.data.CliffCenter || parser.data.CliffRight) {
|
||||
std::cout << "Safety condition triggered!" << std::endl; // Debug print
|
||||
*pointerToMessage = "estop";
|
||||
safetyActive = true;
|
||||
forward(-100); // reverse the robot
|
||||
safetyActive = false;
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int>(100)));
|
||||
}
|
||||
|
@@ -51,10 +51,6 @@ std::string readMQTT()
|
||||
|
||||
void parseMQTT(std::string message)
|
||||
{
|
||||
if(robot.safetyActive){
|
||||
std::cout << "Safety mode active. Ignoring command: " << message << std::endl;
|
||||
return;
|
||||
}
|
||||
if (message == "up")
|
||||
{
|
||||
robot.forward(1024);
|
||||
|
Reference in New Issue
Block a user