diff --git a/src/network/MissionControlProtocol.cpp b/src/network/MissionControlProtocol.cpp index a40f65227..fc135ddb6 100644 --- a/src/network/MissionControlProtocol.cpp +++ b/src/network/MissionControlProtocol.cpp @@ -158,7 +158,7 @@ void MissionControlProtocol::handleSetArmIKEnabled(const json& j) { _arm_ik_repeat_thread.join(); } } - sendArmIKEnabledReport(Globals::armIKEnabled); + sendArmIKEnabledReport(); } void MissionControlProtocol::setRequestedCmdVel(double dtheta, double dx) { @@ -268,7 +268,7 @@ void MissionControlProtocol::handleCameraStreamCloseRequest(const json& j) { } void MissionControlProtocol::sendArmIKEnabledReport() { - json msg = {{"type", ARM_IK_ENABLED_REP_TYPE}, {"enabled", Globals::armIKEnabled}}; + json msg = {{"type", ARM_IK_ENABLED_REP_TYPE}, {"enabled", Globals::armIKEnabled.load()}}; this->_server.sendJSON(Constants::MC_PROTOCOL_NAME, msg); } diff --git a/src/network/MissionControlProtocol.h b/src/network/MissionControlProtocol.h index 1d3f9d08e..0201daa1a 100644 --- a/src/network/MissionControlProtocol.h +++ b/src/network/MissionControlProtocol.h @@ -64,7 +64,7 @@ class MissionControlProtocol : public WebSocketProtocol { // TODO: add documenta void handleJointPowerRequest(const json& j); void handleDriveRequest(const json& j); void handleRequestArmIKEnabled(const json& j); - void sendArmIKEnabledReport(const bool& isEnabled); + void sendArmIKEnabledReport(); void sendCameraStreamReport(const CameraID& cam, const std::vector>& videoData); void sendJointPositionReport(const std::string& jointName, int32_t position);