From a136e42d390ccd1371f1ce12ab27c124cb99bf4a Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 10 May 2016 09:23:14 -0300 Subject: [PATCH] Tools: sitl_calibration: fix mavlink_packet() for magcal That controller shouldn't actuate when inactive. --- Tools/mavproxy_modules/sitl_calibration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/mavproxy_modules/sitl_calibration.py b/Tools/mavproxy_modules/sitl_calibration.py index 417b44cf6e..b7c04ad5d9 100644 --- a/Tools/mavproxy_modules/sitl_calibration.py +++ b/Tools/mavproxy_modules/sitl_calibration.py @@ -291,6 +291,9 @@ class MagcalController(CalController): def mavlink_packet(self, m): super(MagcalController, self).mavlink_packet(m) + if not self.active: + return + if m.get_type() == 'MAG_CAL_REPORT': # NOTE: This may be not the ideal way to handle it if m.compass_id in self.last_progress: