smaller bugfix

This commit is contained in:
Robin Müller 2023-03-21 17:35:36 +01:00
parent 4277a98c16
commit ce04532759
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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;