From d94b093a6964171943e9efa44297c32ff03a3b50 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Sun, 7 Jun 2020 01:27:20 +0530 Subject: [PATCH] Tools: fix sitl_calibration stopping at calibration report --- Tools/mavproxy_modules/sitl_calibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/mavproxy_modules/sitl_calibration.py b/Tools/mavproxy_modules/sitl_calibration.py index db163b5ae5..077cc8a2e8 100644 --- a/Tools/mavproxy_modules/sitl_calibration.py +++ b/Tools/mavproxy_modules/sitl_calibration.py @@ -300,8 +300,8 @@ class MagcalController(CalController): 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: - del self.last_progress[m.compass_id] - if not self.last_progress: + self.last_progress[m.compass_id] = None + if len(self.last_progress.values()) and all(progress == None for progress in self.last_progress.values()): self.stop() return