From c5a786559a7daee9aa3912160cf37cb8fa3295d0 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 25 Sep 2022 10:02:10 +1000 Subject: [PATCH] autotest: check target system on return mission_item_int packets --- Tools/autotest/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index e132bd860d..16aa49a89a 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -7659,6 +7659,11 @@ Also, ignores heartbeats not from our target system''' condition='MISSION_ITEM_INT.mission_type==%u' % mission_type) if m is None: raise NotAchievedException("Did not receive MISSION_ITEM_INT") + if m.target_system != self.mav.source_system: + raise NotAchievedException("Wrong target system (want=%u got=%u)" % + (self.mav.source_system, m.target_system)) + if m.target_component != self.mav.source_component: + raise NotAchievedException("Wrong target component") self.progress("Got (%s)" % str(m)) if m.mission_type != mission_type: raise NotAchievedException("Received waypoint of wrong type")