wrapped info output in additonal ifdef

This commit is contained in:
Robin Müller 2020-08-28 17:52:13 +02:00
parent d2ef2b2be4
commit 9f522466f0

View File

@ -112,24 +112,26 @@ ReturnValue_t EventManager::unsubscribeFromEventRange(MessageQueueId_t listener,
#ifdef DEBUG #ifdef DEBUG
// forward declaration, should be implemented by mission // forward declaration, should be implemented by mission
const char* translateObject(object_id_t object); extern const char* translateObject(object_id_t object);
const char * translateEvents(Event event); extern const char* translateEvents(Event event);
void EventManager::printEvent(EventMessage* message) { void EventManager::printEvent(EventMessage* message) {
const char *string = 0; const char *string = 0;
switch (message->getSeverity()) { switch (message->getSeverity()) {
case SEVERITY::INFO: case SEVERITY::INFO:
// string = translateObject(message->getReporter()); #ifdef DEBUG_INFO_EVENT
// sif::info << "EVENT: "; string = translateObject(message->getReporter());
// if (string != 0) { sif::info << "EVENT: ";
// sif::info << string; if (string != 0) {
// } else { sif::info << string;
// sif::info << "0x" << std::hex << message->getReporter() << std::dec; } else {
// } sif::info << "0x" << std::hex << message->getReporter() << std::dec;
// sif::info << " reported " << translateEvents(message->getEvent()) << " (" }
// << std::dec << message->getEventId() << std::hex << ") P1: 0x" sif::info << " reported " << translateEvents(message->getEvent()) << " ("
// << message->getParameter1() << " P2: 0x" << std::dec << message->getEventId() << std::hex << ") P1: 0x"
// << message->getParameter2() << std::dec << std::endl; << message->getParameter1() << " P2: 0x"
<< message->getParameter2() << std::dec << std::endl;
#endif
break; break;
default: default:
string = translateObject(message->getReporter()); string = translateObject(message->getReporter());
@ -152,7 +154,6 @@ void EventManager::printEvent(EventMessage* message) {
<< std::endl; << std::endl;
break; break;
} }
} }
#endif #endif