Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions mavutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ def set_dialect(dialect: str, with_type_annotations: bool | None = None) -> None

class mavfile_state(object):
'''state for a particular system id'''
def __init__(self):
self.messages = { 'MAV' : self }
self.flightmode = "UNKNOWN"
self.vehicle_type = "UNKNOWN"
self.mav_type = mavlink.MAV_TYPE_FIXED_WING
self.mav_autopilot = mavlink.MAV_AUTOPILOT_GENERIC
self.base_mode = 0
self.armed = False # canonical arm state for the vehicle as a whole
def __init__(self) -> None:
self.messages: dict[str, Any] = { 'MAV' : self }
self.flightmode: str = "UNKNOWN"
self.vehicle_type: str = "UNKNOWN"
self.mav_type: int = mavlink.MAV_TYPE_FIXED_WING
self.mav_autopilot: int = mavlink.MAV_AUTOPILOT_GENERIC
self.base_mode: int = 0
self.armed: bool = False # canonical arm state for the vehicle as a whole

if float(mavlink.WIRE_PROTOCOL_VERSION) >= 1:
try:
Expand All @@ -174,8 +174,8 @@ def __init__(self):

class param_state(object):
'''state for a particular system id/component id pair'''
def __init__(self):
self.params = {}
def __init__(self) -> None:
self.params: dict[str, float] = {}

class mavfile(object):
'''a generic mavlink port'''
Expand Down