printout for unknown command

This commit is contained in:
Robin Müller 2021-08-20 15:46:34 +02:00
parent 882da68a2f
commit 7d0377845b
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 11 additions and 1 deletions

View File

@ -1336,10 +1336,20 @@ void DeviceHandlerBase::buildInternalCommand(void) {
DeviceCommandMap::iterator iter = deviceCommandMap.find(
deviceCommandId);
if (iter == deviceCommandMap.end()) {
#if FSFW_VERBOSE_LEVEL >= 1
char output[36];
sprintf(output, "Command 0x%08x unknown",
static_cast<unsigned int>(deviceCommandId));
// so we can track misconfigurations
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"buildInternalCommand",
COMMAND_NOT_SUPPORTED,
output);
#endif
result = COMMAND_NOT_SUPPORTED;
}
else if (iter->second.isExecuting) {
#if FSFW_DISABLE_PRINTOUT == 0
#if FSFW_VERBOSE_LEVEL >= 1
char output[36];
sprintf(output, "Command 0x%08x is executing",
static_cast<unsigned int>(deviceCommandId));