(self, custommode_code, basemode_code=0)
| 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. |
no outgoing calls