Tools: sitl_calibration: fix mavlink_packet() for magcal

That controller shouldn't actuate when inactive.
This commit is contained in:
Gustavo Jose de Sousa 2016-05-10 09:23:14 -03:00 committed by Lucas De Marchi
parent 4d769497c9
commit a136e42d39

View File

@ -291,6 +291,9 @@ class MagcalController(CalController):
def mavlink_packet(self, m): def mavlink_packet(self, m):
super(MagcalController, self).mavlink_packet(m) super(MagcalController, self).mavlink_packet(m)
if not self.active:
return
if m.get_type() == 'MAG_CAL_REPORT': if m.get_type() == 'MAG_CAL_REPORT':
# NOTE: This may be not the ideal way to handle it # NOTE: This may be not the ideal way to handle it
if m.compass_id in self.last_progress: if m.compass_id in self.last_progress: