diff --git a/linux/devices/startracker/StarTrackerHandler.cpp b/linux/devices/startracker/StarTrackerHandler.cpp index 61b77fe2..f2fd4813 100644 --- a/linux/devices/startracker/StarTrackerHandler.cpp +++ b/linux/devices/startracker/StarTrackerHandler.cpp @@ -2147,14 +2147,14 @@ ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) { case startracker::REQ_SUBSCRIPTION: case startracker::REQ_LOG_SUBSCRIPTION: case startracker::REQ_DEBUG_CAMERA: - if (not(getMode() == MODE_ON && getSubmode() == startracker::Program::FIRMWARE)) { - return STARTRACKER_RUNNING_BOOTLOADER; + if(getMode() == MODE_ON and getSubmode() != startracker::Program::FIRMWARE) { + return STARTRACKER_NOT_RUNNING_FIRMWARE; } break; case startracker::FIRMWARE_UPDATE: case startracker::FLASH_READ: - if (not(getMode() == MODE_ON && getSubmode() == startracker::Program::BOOTLOADER)) { - return STARTRACKER_RUNNING_FIRMWARE; + if(getMode() != MODE_ON or getSubmode() != startracker::Program::BOOTLOADER) { + return STARTRACKER_NOT_RUNNING_BOOTLOADER; } break; default: diff --git a/linux/devices/startracker/StarTrackerHandler.h b/linux/devices/startracker/StarTrackerHandler.h index a70ff8cf..cd5e0a82 100644 --- a/linux/devices/startracker/StarTrackerHandler.h +++ b/linux/devices/startracker/StarTrackerHandler.h @@ -134,10 +134,10 @@ class StarTrackerHandler : public DeviceHandlerBase { static const ReturnValue_t STARTRACKER_ALREADY_BOOTED = MAKE_RETURN_CODE(0xB6); //! [EXPORT] : [COMMENT] Star tracker is in firmware mode but must be in bootloader mode to //! execute this command - static const ReturnValue_t STARTRACKER_RUNNING_FIRMWARE = MAKE_RETURN_CODE(0xB7); + static const ReturnValue_t STARTRACKER_NOT_RUNNING_FIRMWARE = MAKE_RETURN_CODE(0xB7); //! [EXPORT] : [COMMENT] Star tracker is in bootloader mode but must be in firmware mode to //! execute this command - static const ReturnValue_t STARTRACKER_RUNNING_BOOTLOADER = MAKE_RETURN_CODE(0xB8); + static const ReturnValue_t STARTRACKER_NOT_RUNNING_BOOTLOADER = MAKE_RETURN_CODE(0xB8); static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::STR_HANDLER;