From aa100f5e8af3167f995148b3d927a5f9c85bd32e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Tue, 2 Nov 2021 16:12:30 +0100
Subject: [PATCH] warning adding two captures of the same sensor in a frame

---
 src/frame/frame_base.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/frame/frame_base.cpp b/src/frame/frame_base.cpp
index aac846868..95233cf96 100644
--- a/src/frame/frame_base.cpp
+++ b/src/frame/frame_base.cpp
@@ -165,6 +165,7 @@ FrameBasePtr FrameBase::getNextFrame() const
 
 CaptureBasePtr FrameBase::addCapture(CaptureBasePtr _capt_ptr)
 {
+    WOLF_WARN_COND(getCaptureOf(_capt_ptr->getSensor()) != nullptr, "FrameBase::addCapture adding new capture ", _capt_ptr->id(), " in a frame with another capture of the same sensor: ", getCaptureOf(_capt_ptr->getSensor())->id());
     capture_list_.push_back(_capt_ptr);
     return _capt_ptr;
 }
-- 
GitLab