File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -202,17 +202,28 @@ def cmd_disarm(self, args):
202202 def all_checks_enabled (self ):
203203 ''' returns true if the UAV is skipping any arming checks'''
204204 arming_check = self .get_mav_param ("ARMING_CHECK" )
205- if arming_check is None :
206- # AntennaTracker doesn't have arming checks
207- return False
208- arming_mask = int (arming_check )
205+ if arming_check is not None :
206+ return self .all_checks_enabled_ARMING_CHECK ()
207+ skipchk = self .get_mav_param ("ARMING_SKIPCHK" )
208+ if skipchk is not None :
209+ return self .all_checks_enabled_ARMING_SKIPCHK ()
210+
211+ # antenna tracker doesn't have either parameter
212+ return False
213+
214+ def all_checks_enabled_ARMING_CHECK (self ):
215+ arming_mask = int (self .get_mav_param ("ARMING_CHECK" ))
209216 if arming_mask == 1 :
210217 return True
211218 for bit in arming_masks .values ():
212219 if not arming_mask & bit and bit != 1 :
213220 return False
214221 return True
215222
223+ def all_checks_enabled_ARMING_SKIPCHK (self ):
224+ arming_skip_mask = int (self .get_mav_param ("ARMING_SKIPCHK" ))
225+ return arming_skip_mask == 0
226+
216227 def mavlink_packet (self , m ):
217228 mtype = m .get_type ()
218229 if mtype == 'HEARTBEAT' and m .type != mavutil .mavlink .MAV_TYPE_GCS :
You can’t perform that action at this time.
0 commit comments