From 0777df1f501839a8518ab7d2b307c7fb7813bc8f Mon Sep 17 00:00:00 2001 From: DrDab Date: Mon, 6 Nov 2023 17:35:20 -0800 Subject: [PATCH] Improve format --- src/network/MissionControlProtocol.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/MissionControlProtocol.cpp b/src/network/MissionControlProtocol.cpp index 64d18f0b..3aeb4c17 100644 --- a/src/network/MissionControlProtocol.cpp +++ b/src/network/MissionControlProtocol.cpp @@ -138,10 +138,12 @@ void MissionControlProtocol::handleSetArmIKEnabled(const json& j) { } DataPoint> armJointPositions = robot::getMotorPositionsRad(Constants::arm::IK_MOTORS); + // TODO: there should be a better way of handling invalid data than crashing. // It should somehow just not enable IK, but then it needs to communicate back to MC // that IK wasn't enabled? assert(armJointPositions.isValid()); + if (Globals::planarArmController.set_setpoint(armJointPositions.getData())) { Globals::armIKEnabled = true; _arm_ik_repeat_thread =