added warning latch to avoid spam

This commit is contained in:
Robin Müller 2021-11-30 14:53:49 +01:00
parent d8580074c2
commit ceb87b5abb
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 11 additions and 7 deletions

View File

@ -183,13 +183,16 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
} }
if(tmFifo->full()) { if(tmFifo->full()) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 if(warningLatch) {
sif::warning << "TmTcBridge::storeDownlinkData: TM downlink max. number " #if FSFW_CPP_OSTREAM_ENABLED == 1
"of stored packet IDs reached!" << std::endl; sif::warning << "TmTcBridge::storeDownlinkData: TM downlink max. number "
#else "of stored packet IDs reached!" << std::endl;
sif::printWarning("TmTcBridge::storeDownlinkData: TM downlink max. number " #else
"of stored packet IDs reached!\n"); sif::printWarning("TmTcBridge::storeDownlinkData: TM downlink max. number "
#endif "of stored packet IDs reached!\n");
#endif
warningLatch = true;
}
if(overwriteOld) { if(overwriteOld) {
tmFifo->retrieve(&storeId); tmFifo->retrieve(&storeId);
tmStore->deleteData(storeId); tmStore->deleteData(storeId);

View File

@ -75,6 +75,7 @@ public:
virtual uint16_t getIdentifier() override; virtual uint16_t getIdentifier() override;
virtual MessageQueueId_t getRequestQueue() override; virtual MessageQueueId_t getRequestQueue() override;
bool warningLatch = true;
protected: protected:
//! Cached for initialize function. //! Cached for initialize function.
object_id_t tmStoreId = objects::NO_OBJECT; object_id_t tmStoreId = objects::NO_OBJECT;