MCPcopy Index your code
hub / github.com/dronekit/dronekit-python / _is_mode_available

Method _is_mode_available

dronekit/__init__.py:1548–1555  ·  view source on GitHub ↗
(self, custommode_code, basemode_code=0)

Source from the content-addressed store, hash-verified

1546 return mavutil.mode_mapping_bynumber(self._vehicle_type)
1547
1548 def _is_mode_available(self, custommode_code, basemode_code=0):
1549 try:
1550 if self._autopilot_type == mavutil.mavlink.MAV_AUTOPILOT_PX4:
1551 mode = mavutil.interpret_px4_mode(basemode_code, custommode_code)
1552 return mode in self._mode_mapping
1553 return custommode_code in self._mode_mapping_bynumber
1554 except:
1555 return False
1556
1557 #
1558 # Operations to support the standard API.

Callers 2

listenerMethod · 0.95
test_timeoutFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_timeoutFunction · 0.64