Skip to content

Fylo Internals

pypack.fylo contains the lower-level runtime protocol, command, and state machinery that droneapi builds on top of.

It is packaged with the SDK, but it is primarily an internal layer rather than the main end-user entrypoint.

Control Server

controlserver

Docstring for pypack.fylo.controlserver

Device module-attribute

Device = Enum('Device', ('Uwb', 'Plane', 'Sys'))

PlaneType module-attribute

PlaneType = Enum('PlaneType', ('Height', 'Yaw', 'PlaneX', 'PlaneY', 'PlaneZ', 'TimeToken', 'AuxToken', 'Battery', 'RangeSafe', 'TakeoffAllow', 'LocationSensor', 'DanceX', 'DanceY', 'DanceZ', 'RealDanceMD5', 'DanceName', 'Time', 'Rgb_status', 'Socket', 'Address'))

UwbType module-attribute

UwbType = Enum('UwbType', ('DemarcateState', 'Station0_X', 'Station0_Y', 'Station0_Z', 'Station1_X', 'Station1_Y', 'Station1_Z', 'Station2_X', 'Station2_Y', 'Station2_Z', 'Station3_X', 'Station3_Y', 'Station3_Z'))

SysType module-attribute

SysType = Enum('SysType', ('Delta_T', 'TimeToken', 'AuxToken', 'DanceMD5', 'AuxSetupYaw'))

dc module-attribute

dc = DataCenter()

ConnectType module-attribute

ConnectType = Enum('ConnectType', ('Serial', 'Network', 'Tcpwork'))

ManualFlyFrameCallback module-attribute

ManualFlyFrameCallback = Callable[[float, float, float, float, int, bool], None]

Obstacles

Bases: BaseModel

Obstacle detection state from barrier sensors.

Parsed from the barrier bitmask in REPORT_FLIGHT_DATA.

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

forward class-attribute instance-attribute

forward: bool = False

back class-attribute instance-attribute

back: bool = False

left class-attribute instance-attribute

left: bool = False

right class-attribute instance-attribute

right: bool = False

down class-attribute instance-attribute

down: bool = False

from_bitmask classmethod

from_bitmask(barrier: int) -> Obstacles

Create Obstacles from barrier bitmask.

Bit mapping:

  • Bit 0: forward
  • Bit 1: back
  • Bit 2: left
  • Bit 3: right
  • Bit 4: down

any_obstacle

any_obstacle() -> bool

Check if any obstacle is detected.

FlightData

Bases: BaseModel

Complete flight telemetry snapshot.

Parsed from MAVLink REPORT_FLIGHT_DATA (msg ID 206).

position class-attribute instance-attribute

position: Vector3 = Field(description='Position in cm')

velocity class-attribute instance-attribute

velocity: Vector3 = Field(description='Velocity in cm/s')

acceleration class-attribute instance-attribute

acceleration: Vector3 = Field(description='Acceleration in cm/s^2')

orientation class-attribute instance-attribute

orientation: Orientation = Field(description='Orientation in degrees')

altitude_tof class-attribute instance-attribute

altitude_tof: float = Field(description='ToF sensor altitude in cm')

altitude_baro class-attribute instance-attribute

altitude_baro: float = Field(default=0.0, description='Barometer altitude in m')

battery_percent class-attribute instance-attribute

battery_percent: int = Field(ge=0, le=100, description='Battery percentage')

barrier class-attribute instance-attribute

barrier: int = Field(default=0, description='Obstacle detection bitmask')

timestamp class-attribute instance-attribute

timestamp: datetime = Field(default_factory=now)
from_mavlink(msg) -> FlightData

Create FlightData from MAVLink report_flight_data message.

DataCenter

empty_datacenter

empty_datacenter()

set_data

set_data(device, datatype, value, id=0)

get_data

get_data(device, datatype, id=0)

device_exist

device_exist(device)

id_exist

id_exist(device, id)

datatype_exist

datatype_exist(device, id, datatype)

get_device_list

get_device_list()

get_id_list

get_id_list(device)

get_datatype_list

get_datatype_list(device, id)

del_device

del_device(device)

del_id

del_id(device, id)

del_datatype

del_datatype(device, id, datatype)

show_data

show_data()

get_flight_data

get_flight_data(drone_id: int = 0) -> FlightData | None

Get typed flight telemetry data.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
FlightData | None

FlightData model or None if not available

get_battery_percent

get_battery_percent(drone_id: int = 0) -> int | None

Get battery percentage.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
int | None

Battery percentage (0-100) or None if not available

get_obstacles

get_obstacles(drone_id: int = 0) -> Obstacles

Get obstacle detection state.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
Obstacles

Obstacles model (empty if no data)

get_drone_status

get_drone_status(drone_id: int = 0) -> int | None

Get drone status from heartbeat.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
int | None

Drone status code or None if not available

is_drone_ready

is_drone_ready(drone_id: int = 0) -> bool

Check if drone is in ready state.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
bool

True if drone is ready (status == 2)

has_telemetry

has_telemetry(drone_id: int = 0) -> bool

Check if telemetry data is available.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
bool

True if flight_data exists

has_heartbeat

has_heartbeat(drone_id: int = 0) -> bool

Check if heartbeat data is available.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
bool

True if heartbeat exists

Token

get_token

get_token()

Controlserver

connect

connect(server_ip, enable_file_logging: bool = True, log_dir: str = 'logs')

disconnect

disconnect()

Plane_Linux_cmd

Plane_Linux_cmd(cmd, ack, mode, data, reserve)

Plane_getBarrier

Plane_getBarrier()

get_battery

get_battery()

get_coordinate

get_coordinate()

get_laser_receiving

get_laser_receiving()

get_yaw

get_yaw()

get_accelerated_speed

get_accelerated_speed()

get_plane_speed

get_plane_speed()

get_plane_distance

get_plane_distance()

get_plane_id

get_plane_id()

single_fly_lamplight

single_fly_lamplight(r, g, b, duration, mode, token=0)

single_fly_takeoff

single_fly_takeoff(led: int, height: int = 100, flags: int = 0, token: int = 0, blocking: bool = True)

Takeoff to specified height.

Parameters:

Name Type Description Default
led int

LED color param4 value

required
height int

Target height in cm (50-3000)

100
flags int

TakeoffFlags bitmask (0=normal, 1=reset_yaw, 2=with_load)

0
token int

Command token (0=auto)

0
blocking bool

Wait for completion

True

single_fly_touchdown

single_fly_touchdown(led, token=0, blocking=True)

single_fly_forward

single_fly_forward(distance, led, token=0, blocking=True, speed=100)

single_fly_back

single_fly_back(distance, led, token=0, blocking=True, speed=100)

single_fly_left

single_fly_left(distance, led, token=0, blocking=True, speed=100)

single_fly_right

single_fly_right(distance, led, token=0, blocking=True, speed=100)

single_fly_up

single_fly_up(height, led, token=0, blocking=True, speed=100)

single_fly_down

single_fly_down(height, led, token=0, blocking=True, speed=100)

single_fly_turnleft

single_fly_turnleft(angle, led, token=0, blocking=True)

single_fly_turnright

single_fly_turnright(angle, led, token=0, blocking=True)

single_fly_radius_around

single_fly_radius_around(radius, led, token=0, blocking=True)

single_fly_curvilinearFlight

single_fly_curvilinearFlight(direction, x, y, z, led, token=0, blocking=True)

single_fly_autogyration360

single_fly_autogyration360(num, led, token=0, blocking=True)

single_fly_hover_flight

single_fly_hover_flight(duration, led, token=0, blocking=True)

single_fly_bounce

single_fly_bounce(frequency, height, led, token=0, blocking=True)

single_fly_straight_flight

single_fly_straight_flight(x, y, z, led, token=0, blocking=True, speed=100)

single_fly_barrier_aircraft

single_fly_barrier_aircraft(mode, token=0)

single_fly_somersault

single_fly_somersault(direction, led, token=0, blocking=True)

single_fly_flip_back

single_fly_flip_back(token=0, blocking=True)

single_fly_flip_left

single_fly_flip_left(token=0, blocking=True)

single_fly_flip_right

single_fly_flip_right(token=0, blocking=True)

single_fly_flip_rtp

single_fly_flip_rtp()

single_fly_Line_walking

single_fly_Line_walking(fun_id, dist, tv, way_color)

single_fly_AiIdentifies

single_fly_AiIdentifies(mode)

single_fly_Qrcode_tracking

single_fly_Qrcode_tracking(mode, tracking_type, time_duration)

single_fly_Qrcode_align

single_fly_Qrcode_align(mode, time_duration, search_radius, qr_id)

single_fly_getColor

single_fly_getColor(Mode)

plane_fly_arm

plane_fly_arm(token=0)

plane_fly_disarm

plane_fly_disarm(token=0)

enable_led

enable_led(token=0, blocking=True)

Enable LED - formation cmd 0x0C (12)

disable_led

disable_led(token=0, blocking=True)

Disable LED - formation cmd 0x0D (13)

cancel_rgb

cancel_rgb(token=0, blocking=True)

Cancel RGB animation - formation cmd 0x1B (27)

vertical_circle

vertical_circle(radius: float | int, token: int = 0, blocking: bool = True)

Vertical circle maneuver - formation cmd 0x27 (39)

Parameters:

Name Type Description Default
radius float | int

Circle radius in cm (positive=CCW, negative=CW)

required

set_avoidance

set_avoidance(direction: int, barrier_mask: int = 63, x: int = 0, y: int = 0, token: int = 0, blocking: bool = True)

Set avoidance with direction - formation cmd 0x2A (42)

Parameters:

Name Type Description Default
direction int

0=forward, 1=back, 2=left, 3=right, 4/5=up/down

required
barrier_mask int

Bitmask for obstacle directions (default 0x3F = all)

63
x int

Forward/back distance in cm

0
y int

Left/right distance in cm

0

get_product_id

get_product_id(token=0)

Get product ID/autopilot version - formation cmd 0x2C (44)

set_velocity

set_velocity(level: int, horizontal_vel: int = 0, token: int = 0, blocking: bool = True)

Set velocity level - formation cmd 0x30 (48)

Parameters:

Name Type Description Default
level int

Velocity in cm/s (0-300): 100=1.0m/s, 200=2.0m/s, 300=3.0m/s

required
horizontal_vel int

Optional horizontal velocity override in cm/s

0

set_yawrate

set_yawrate(level: int, token: int = 0, blocking: bool = True)

Set yaw rate level - formation cmd 0x31 (49)

Parameters:

Name Type Description Default
level int

Yaw rate level

required

set_rgb_brightness

set_rgb_brightness(brightness: int, token: int = 0, blocking: bool = True)

Set RGB brightness - formation cmd 0x32 (50)

Parameters:

Name Type Description Default
brightness int

Brightness level

required

enable_battery_failsafe

enable_battery_failsafe(token=0)

Enable battery failsafe - formation cmd 0x35 (53)

disable_battery_failsafe

disable_battery_failsafe(token=0)

Disable battery failsafe - formation cmd 0x36 (54)

set_parameter

set_parameter(velocity: int = 0, yaw_rate: int = 0, brightness: int = 0, avoidance: bool = False, battery_failsafe: bool = False, fast_land: bool = False, token: int = 0, blocking: bool = True)

Set multiple parameters - formation cmd 0x37 (55)

Parameters:

Name Type Description Default
velocity int

Velocity level (0-3)

0
yaw_rate int

Yaw rate level

0
brightness int

RGB brightness

0
avoidance bool

Enable obstacle avoidance

False
battery_failsafe bool

Enable battery failsafe

False
fast_land bool

Enable fast landing

False

set_operate

set_operate(status: int, token: int = 0)

Set formation operate status - formation cmd 0x3B (59)

Parameters:

Name Type Description Default
status int

Operate status value

required

set_land_speed

set_land_speed(fast: bool = False, token: int = 0)

Set land speed - formation cmd 0x3C (60)

Parameters:

Name Type Description Default
fast bool

True for fast landing, False for slow landing

False

set_video_resolution

set_video_resolution(resolution: int, token: int = 0)

Set video resolution - plane cmd 0x16 (22)

Controls RTP streaming and recording resolution. Lower resolution = less encoder CPU load = potentially better QR rate.

Parameters:

Name Type Description Default
resolution int

0=HIGH (1080p), 1=MEDIUM (720p), 2=LOW (program/AI mode) Can also use VideoResolution enum values.

required

Firmware handler: HandleMsgSelectRecordResolution @ avmanager:0x0001df7c

set_wifi_mode

set_wifi_mode(wifi_mode: int, channel_id: int = 0, token: int = 0)

Set WiFi mode - plane cmd 0x04 (4)

Controls WiFi band, power, broadcast, and channel settings.

Parameters:

Name Type Description Default
wifi_mode int

WiFiMode enum value or int (0-9):

  • 0: Switch to 2.4GHz band
  • 1: Switch to 5GHz band
  • 2: Switch to AP mode
  • 3: Low WiFi power
  • 4: High WiFi power
  • 5: WiFi broadcast ON
  • 6: WiFi broadcast OFF
  • 7: Manual channel mode (requires channel_id)
  • 8: Auto channel mode
  • 9: Get channel strength
required
channel_id int

Channel ID for manual channel mode (wifi_mode=7)

0

Firmware handler: HandleMsgWifiMode @ avmanager

send_manual_control

send_manual_control(x: int = 0, y: int = 0, z: int = 0, r: int = 0, target: int = 0, buttons: int = 0) -> bool

Send a single MANUAL_CONTROL frame via UDP.

This provides joystick-style control with simultaneous position and yaw movement. Call this at ~20Hz (every 50ms) for smooth control.

Parameters:

Name Type Description Default
x int

Pitch (forward/back), -1000 to +1000. +1000 = full forward.

0
y int

Roll (left/right), -1000 to +1000. +1000 = full right.

0
z int

Throttle (up/down), -1000 to +1000. +1000 = full up.

0
r int

Yaw (rotation), -1000 to +1000. +1000 = full CCW.

0
target int

Target system ID (default 0).

0
buttons int

Button bitmask (default 0).

0

Returns:

Type Description
bool

True if message was sent successfully.

manual_fly

manual_fly(duration_sec: float, forward: float = 0.0, right: float = 0.0, up: float = 0.0, rotate: float = 0.0, rate_hz: int = 20, on_frame: ManualFlyFrameCallback | None = None) -> bool

Fly with manual control inputs for a specified duration.

Sends continuous MANUAL_CONTROL messages at the specified rate. Also sends APP_HEARTBEAT with user_mode=1 (Aerial mode) every second as required by the drone firmware for manual control.

Parameters:

Name Type Description Default
duration_sec float

How long to fly with these inputs (seconds).

required
forward float

Forward/back input, -1.0 to +1.0. +1.0 = full forward.

0.0
right float

Left/right input, -1.0 to +1.0. +1.0 = full right.

0.0
up float

Up/down input, -1.0 to +1.0. +1.0 = full up.

0.0
rotate float

Rotation input, -1.0 to +1.0. +1.0 = full CCW.

0.0
rate_hz int

Control loop rate (default 20 Hz = 50ms interval).

20
on_frame ManualFlyFrameCallback | None

Optional callback(x, y, z, r, frame_index, success) called after each frame.

None

Returns:

Type Description
bool

True if all messages were sent successfully.

Example:

# Move forward while rotating left for 2 seconds
server.manual_fly(2.0, forward=0.5, rotate=0.3)

stop_manual_control

stop_manual_control() -> bool

Send zero inputs to stop manual movement.

Returns:

Type Description
bool

True if message was sent successfully.

send_app_heartbeat

send_app_heartbeat(user_mode: int = 1) -> bool

Send APP_HEARTBEAT message to set the app control mode.

The drone requires periodic heartbeats to accept certain control modes. Call this before and during manual_control_frame() calls.

user_mode values

0 = Other 1 = Aerial (manual flight mode) - required for MANUAL_CONTROL 2 = Program (autonomous flight mode) 3 = Battle 4 = Formation

Parameters:

Name Type Description Default
user_mode int

App mode (0-4). Default 1 for manual flight.

1

Returns:

Type Description
bool

True if message was sent successfully.

set_app_mode

set_app_mode(mode: int) -> None

Set the app mode for background heartbeat messages.

This changes the user_mode sent in periodic APP_HEARTBEAT messages. The background heartbeat thread sends this mode every second.

Mode values

0 = Other 1 = Aerial (manual flight mode) - required for MANUAL_CONTROL 2 = Program (autonomous flight mode) - default 3 = Battle 4 = Formation

Parameters:

Name Type Description Default
mode int

App mode (0-4).

required

get_app_mode

get_app_mode() -> int

Get the current app mode for background heartbeat messages.

get_wifi_ip

get_wifi_ip()

Command Processor

commandprocessor

CommandProcessor

cmd class-attribute instance-attribute

cmd = None

get_buf

get_buf()

Plane_Linux_cmd

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_Linux_cmd

get_buf

get_buf()

SFLamplight

Bases: CommandProcessor

Set LED color/mode - Formation CMD 26 (SET_RGB).

Parameters (from mavlink.py): param1: duration in 10ms units (100 = 1 second) param3: reserved/mode flag (original: 1) param4: color packed as [mode:8][b:8][g:8][r:8]

cmd class-attribute instance-attribute

cmd = S_Fly_Lamplight

get_buf

get_buf()

SFTakeoffCP

Bases: CommandProcessor

Takeoff - Formation CMD 23 (ONE_KEY_TAKEOFF).

Parameters (from mavlink.py): param1: target height (cm) param2: flags (TakeoffFlags bitmask)

    - bit 0: RESET_YAW - reset yaw orientation on takeoff
    - bit 1: WITH_LOAD - takeoff with load/clamp mode
param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_Takeoff

get_buf

get_buf()

SFTouchdownCP

Bases: CommandProcessor

Land/Touchdown - Formation CMD 2 (LAND).

Parameters (from mavlink.py): param4: LED color (r | g<<8 | b<<16 | mode<<24) All other params unused for basic land command.

cmd class-attribute instance-attribute

cmd = S_Fly_Touchdown

get_buf

get_buf()

SFForwardCP

Bases: CommandProcessor

Forward movement - Formation CMD 30 (FORWARD_BACK).

Parameters (from mavlink.py): param1: velocity (cm/s) x: distance (cm), positive = forward param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_Forward

get_buf

get_buf()

SFBackCP

Bases: CommandProcessor

Backward movement - Formation CMD 30 (FORWARD_BACK).

Parameters (from mavlink.py): param1: velocity (cm/s) x: distance (cm), negative = backward (handled by caller) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_Back

get_buf

get_buf()

SFLeftCP

Bases: CommandProcessor

Left movement - Formation CMD 31 (LEFT_RIGHT).

Parameters (from mavlink.py): param1: velocity (cm/s) y: distance (cm), positive = left param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_Left

get_buf

get_buf()

SFRightCP

Bases: CommandProcessor

Right movement - Formation CMD 31 (LEFT_RIGHT).

Parameters (from mavlink.py): param1: velocity (cm/s) y: distance (cm), negative = right (handled by caller) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_Right

get_buf

get_buf()

SFUpCP

Bases: CommandProcessor

Upward movement - Formation CMD 29 (UP_DOWN).

Parameters (from mavlink.py): param1: velocity (cm/s) - NOTE: firmware uses fixed MPC_PM_Z_V_UP z: distance/height (cm), positive = up param4: LED color (r | g<<8 | b<<16 | mode<<24)

Note: Vertical velocity is controlled by firmware params, not API speed. Firmware limits: ascent 1.5 m/s (MPC_PM_Z_V_UP), descent 1.0 m/s (MPC_PM_Z_V_DOWN)

cmd class-attribute instance-attribute

cmd = S_Fly_Up

get_buf

get_buf()

SFDownCP

Bases: CommandProcessor

Downward movement - Formation CMD 29 (UP_DOWN).

Parameters (from mavlink.py): param1: velocity (cm/s) - NOTE: firmware uses fixed MPC_PM_Z_V_DOWN z: distance/height (cm), negative = down (handled by caller) param4: LED color (r | g<<8 | b<<16 | mode<<24)

Note: Vertical velocity is controlled by firmware params, not API speed. Firmware limits: descent 1.0 m/s (MPC_PM_Z_V_DOWN)

cmd class-attribute instance-attribute

cmd = S_Fly_Down

get_buf

get_buf()

SFTurnLeftCP

Bases: CommandProcessor

Turn left (yaw CCW) - Formation CMD 32 (YAW_ANGLE).

Parameters (from mavlink.py): yaw: angle in degrees (positive = CCW) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_TurnLeft

get_buf

get_buf()

SFTurnRightCP

Bases: CommandProcessor

Turn right (yaw CW) - Formation CMD 32 (YAW_ANGLE).

Parameters (from mavlink.py): yaw: angle in degrees (negative = CW) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_TurnRight

get_buf

get_buf()

SFTurnLeft360CP

Bases: CommandProcessor

360-degree turn left (CCW) - Formation CMD 36 (YAW_TURN).

Parameters (from mavlink.py): param1: number of 360-degree turns param3: mode flag (2 = one_key_function required) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_TurnLeft360

get_buf

get_buf()

SFTurnRight360CP

Bases: CommandProcessor

360-degree turn right (CW) - Formation CMD 36 (YAW_TURN).

Parameters (from mavlink.py): param1: number of 360-degree turns (negative for CW) param3: mode flag (0 = standard for CW direction) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_TurnRight360

get_buf

get_buf()

SFBounceCP

Bases: CommandProcessor

Bounce maneuver - Formation CMD 33 (BOUNCE).

Parameters (from mavlink.py): param1: count/frequency of bounces param3: mode flag (2 = one_key_function required) z: bounce height (cm) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_Bounce

get_buf

get_buf()

SFStraightFlightCP

Bases: CommandProcessor

3D position flight - Formation CMD 35 (STRAIGHT_FLIGHT).

Parameters (from mavlink.py): param1: velocity (cm/s) x: forward/backward distance (cm) y: left/right distance (cm) z: up/down distance (cm) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_StraightFlight

get_buf

get_buf()

SFFlipForwardCP

Bases: CommandProcessor

Forward flip - Formation CMD 37 (FLIP).

Parameters (from mavlink.py): param1: direction (0=forward, 1=back, 2=left, 3=right) param3: mode flag (2 = one_key_function required) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_FlipForward

get_buf

get_buf()

SFFlipBackCP

Bases: CommandProcessor

Backward flip - Formation CMD 37 (FLIP).

Parameters (from mavlink.py): param1: direction (1 = back) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_FlipBack

get_buf

get_buf()

SFFlipLeftCP

Bases: CommandProcessor

Left flip - Formation CMD 37 (FLIP).

Parameters (from mavlink.py): param1: direction (2 = left) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_FlipLeft

get_buf

get_buf()

SFFlipRightCP

Bases: CommandProcessor

Right flip - Formation CMD 37 (FLIP).

Parameters (from mavlink.py): param1: direction (3 = right) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_FlipRight

get_buf

get_buf()

SFCurvilinearFlight

Bases: CommandProcessor

Curved/arc flight - Formation CMD 38 (CURVE_FLIGHT).

Parameters (from mavlink.py): param1: velocity (positive=CW, negative=CCW arc) param3: mode flag (2 = one_key_function required) x, y, z: endpoint coordinates (cm) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_CurvilinearFlight

get_buf

get_buf()

SFHoverFlight

Bases: CommandProcessor

Hover/hold position - Formation CMD 46 (HOLD).

Parameters (from mavlink.py): param1: duration in seconds (0 = indefinite) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_HoverFlight

get_buf

get_buf()

SFBarrier_aircraft

Bases: CommandProcessor

Enable/disable obstacle avoidance - Formation CMD 40/41.

True enables avoidance (CMD 40). False disables it (CMD 41).

cmd class-attribute instance-attribute

cmd = S_Fly_Barrier_aircraft

get_buf

get_buf()

SFLine_walking

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_Line_walking

get_buf

get_buf()

SFAiIdentifies

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_AiIdentifies

get_buf

get_buf()

SFQr_code_tracking

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_Qr_tracking

get_buf

get_buf()

SFQr_code_aligns

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_Qr_align

get_buf

get_buf()

SF_ColorRecog

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_ColorRecog

get_buf

get_buf()

SF_unlock

Bases: CommandProcessor

Arm motors - Formation CMD 4 (ARM).

Unlocks/arms the drone motors for flight.

cmd class-attribute instance-attribute

cmd = S_Fly_unlock

get_buf

get_buf()

SF_lock

Bases: CommandProcessor

Disarm motors - Formation CMD 5 (DISARM).

Locks/disarms the drone motors.

cmd class-attribute instance-attribute

cmd = S_Fly_lock

get_buf

get_buf()

SFCircumvolant

Bases: CommandProcessor

Circle/orbit maneuver - Formation CMD 34 (CIRCLE).

Parameters (from mavlink.py): param1: radius in cm param3: mode flag (2 = one_key_function required) param4: LED color (r | g<<8 | b<<16 | mode<<24)

cmd class-attribute instance-attribute

cmd = S_Fly_RadiusAround

get_buf

get_buf()

SF_Plane_time

Bases: CommandProcessor

cmd class-attribute instance-attribute

cmd = S_Fly_Plane_time

get_buf

get_buf()

SF_Enable_LED

Bases: CommandProcessor

Enable LED - formation cmd 0x0C (12)

cmd class-attribute instance-attribute

cmd = S_Fly_Enable_LED

get_buf

get_buf()

SF_Disable_LED

Bases: CommandProcessor

Disable LED - formation cmd 0x0D (13)

cmd class-attribute instance-attribute

cmd = S_Fly_Disable_LED

get_buf

get_buf()

SF_Cancel_RGB

Bases: CommandProcessor

Cancel RGB animation - formation cmd 0x1B (27)

cmd class-attribute instance-attribute

cmd = S_Fly_Cancel_RGB

get_buf

get_buf()

SF_Vertical_Circle

Bases: CommandProcessor

Vertical circle maneuver - formation cmd 0x27 (39)

Firmware: set_vertical_circle_mode_param(radius * 0.01) Requires altitude >= 0.35m

cmd class-attribute instance-attribute

cmd = S_Fly_Vertical_Circle

get_buf

get_buf()

SF_Set_Avoidance

Bases: CommandProcessor

Set avoidance with direction - formation cmd 0x2A (42)

Firmware: Moves in specified direction when obstacle detected Direction: 0=forward, 1=back, 2=left, 3=right, 4/5=up/down

cmd class-attribute instance-attribute

cmd = S_Fly_Set_Avoidance

get_buf

get_buf()

SF_Get_Product_ID

Bases: CommandProcessor

Get product ID/autopilot version - formation cmd 0x2C (44)

Firmware: send_autopilot_version()

cmd class-attribute instance-attribute

cmd = S_Fly_Get_Product_ID

get_buf

get_buf()

SF_Set_Velocity

Bases: CommandProcessor

Set velocity level - formation cmd 0x30 (48)

Firmware: set_manual_velocity(level), set_manual_horizontal_vel(horiz_vel) Level is velocity in cm/s (0-300): 100=1.0m/s, 200=2.0m/s, 300=3.0m/s

cmd class-attribute instance-attribute

cmd = S_Fly_Set_Velocity

get_buf

get_buf()

SF_Set_Yawrate

Bases: CommandProcessor

Set yaw rate level - formation cmd 0x31 (49)

Firmware: set_manual_yaw_rate(level)

cmd class-attribute instance-attribute

cmd = S_Fly_Set_Yawrate

get_buf

get_buf()

SF_Set_RGB_Brightness

Bases: CommandProcessor

Set RGB brightness - formation cmd 0x32 (50)

Firmware: set_rgb_brightness(brightness)

cmd class-attribute instance-attribute

cmd = S_Fly_Set_RGB_Brightness

get_buf

get_buf()

SF_Enable_Battery_FS

Bases: CommandProcessor

Enable battery failsafe - formation cmd 0x35 (53)

Firmware: set_battery_failsafe(1)

cmd class-attribute instance-attribute

cmd = S_Fly_Enable_Battery_FS

get_buf

get_buf()

SF_Disable_Battery_FS

Bases: CommandProcessor

Disable battery failsafe - formation cmd 0x36 (54)

Firmware: set_battery_failsafe(0)

cmd class-attribute instance-attribute

cmd = S_Fly_Disable_Battery_FS

get_buf

get_buf()

SF_Set_Parameter

Bases: CommandProcessor

Set multiple parameters - formation cmd 0x37 (55)

Firmware packing:

  • param1 byte 0: velocity level
  • param1 byte 1: yaw rate level
  • param1 byte 2: brightness
  • param2 byte 0: avoidance (0=off, 1=on)
  • param2 byte 1: battery failsafe (0=off, 1=on)
  • param2 byte 2: fast land (0=slow, 1=fast)

cmd class-attribute instance-attribute

cmd = S_Fly_Set_Parameter

get_buf

get_buf()

SF_Operate

Bases: CommandProcessor

Set formation operate status - formation cmd 0x3B (59)

Firmware: set_formation_operate_status(status)

cmd class-attribute instance-attribute

cmd = S_Fly_Operate

get_buf

get_buf()

SF_Set_Land_Speed

Bases: CommandProcessor

Set land speed - formation cmd 0x3C (60)

Firmware: set_fast_land(fast ? 1 : 0) 0 = slow landing, 1 = fast landing

cmd class-attribute instance-attribute

cmd = S_Fly_Set_Land_Speed

get_buf

get_buf()

SF_Set_Video_Resolution

Bases: CommandProcessor

Set video resolution - plane cmd 0x16 (22)

Firmware handler: HandleMsgSelectRecordResolution @ avmanager:0x0001df7c Controls RTP streaming and recording resolution.

Resolution levels:

  • 0 (HIGH): 1920x1080 (1080p)
  • 1 (MEDIUM): 1280x720 (720p)
  • 2 (LOW): 640x480 or lower (program/AI mode)

Lower resolution = less encoder CPU = potentially better QR rate during RTP.

cmd class-attribute instance-attribute

cmd = S_Fly_Set_Video_Resolution

get_buf

get_buf()

SF_Set_WiFi_Mode

Bases: CommandProcessor

Set WiFi mode - plane cmd 0x04 (4)

Firmware handler: HandleMsgWifiMode @ avmanager

WiFi mode values (type parameter):

  • 0: Switch to 2.4GHz band
  • 1: Switch to 5GHz band
  • 2: Switch to AP mode
  • 3: Low WiFi power
  • 4: High WiFi power
  • 5: WiFi broadcast ON
  • 6: WiFi broadcast OFF
  • 7: Manual channel mode (channel_id in data)
  • 8: Auto channel mode
  • 9: Get channel strength

cmd class-attribute instance-attribute

cmd = S_Fly_Set_WiFi_Mode

get_buf

get_buf()

CommandProcessorFactory

get_command_processor

get_command_processor(ucmd)

refresh_runtime_config

refresh_runtime_config() -> None

Refresh cached MAVLink encoders after runtime config changes.

set_rgb

set_rgb(data)

State Processor

stateprocessor

Device module-attribute

Device = Enum('Device', ('Uwb', 'Plane', 'Sys'))

PlaneType module-attribute

PlaneType = Enum('PlaneType', ('Height', 'Yaw', 'PlaneX', 'PlaneY', 'PlaneZ', 'TimeToken', 'AuxToken', 'Battery', 'RangeSafe', 'TakeoffAllow', 'LocationSensor', 'DanceX', 'DanceY', 'DanceZ', 'RealDanceMD5', 'DanceName', 'Time', 'Rgb_status', 'Socket', 'Address'))

UwbType module-attribute

UwbType = Enum('UwbType', ('DemarcateState', 'Station0_X', 'Station0_Y', 'Station0_Z', 'Station1_X', 'Station1_Y', 'Station1_Z', 'Station2_X', 'Station2_Y', 'Station2_Z', 'Station3_X', 'Station3_Y', 'Station3_Z'))

SysType module-attribute

SysType = Enum('SysType', ('Delta_T', 'TimeToken', 'AuxToken', 'DanceMD5', 'AuxSetupYaw'))

dc module-attribute

dc = DataCenter()

MsgType module-attribute

MsgType = Enum('MsgType', ('UwbMsg', 'MavlinkMsg'))

uwb_state_process_list module-attribute

uwb_state_process_list = [UwbHeartBeatSP, UwbStateSP, UwbLocationResponse]

mav module-attribute

mav = MAVLink(None, src_system=1, src_component=1)

msg module-attribute

msg = app_heartbeat_encode(0)

sp module-attribute

Obstacles

Bases: BaseModel

Obstacle detection state from barrier sensors.

Parsed from the barrier bitmask in REPORT_FLIGHT_DATA.

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

forward class-attribute instance-attribute

forward: bool = False

back class-attribute instance-attribute

back: bool = False

left class-attribute instance-attribute

left: bool = False

right class-attribute instance-attribute

right: bool = False

down class-attribute instance-attribute

down: bool = False

from_bitmask classmethod

from_bitmask(barrier: int) -> Obstacles

Create Obstacles from barrier bitmask.

Bit mapping:

  • Bit 0: forward
  • Bit 1: back
  • Bit 2: left
  • Bit 3: right
  • Bit 4: down

any_obstacle

any_obstacle() -> bool

Check if any obstacle is detected.

FlightData

Bases: BaseModel

Complete flight telemetry snapshot.

Parsed from MAVLink REPORT_FLIGHT_DATA (msg ID 206).

position class-attribute instance-attribute

position: Vector3 = Field(description='Position in cm')

velocity class-attribute instance-attribute

velocity: Vector3 = Field(description='Velocity in cm/s')

acceleration class-attribute instance-attribute

acceleration: Vector3 = Field(description='Acceleration in cm/s^2')

orientation class-attribute instance-attribute

orientation: Orientation = Field(description='Orientation in degrees')

altitude_tof class-attribute instance-attribute

altitude_tof: float = Field(description='ToF sensor altitude in cm')

altitude_baro class-attribute instance-attribute

altitude_baro: float = Field(default=0.0, description='Barometer altitude in m')

battery_percent class-attribute instance-attribute

battery_percent: int = Field(ge=0, le=100, description='Battery percentage')

barrier class-attribute instance-attribute

barrier: int = Field(default=0, description='Obstacle detection bitmask')

timestamp class-attribute instance-attribute

timestamp: datetime = Field(default_factory=now)
from_mavlink(msg) -> FlightData

Create FlightData from MAVLink report_flight_data message.

DataCenter

empty_datacenter

empty_datacenter()

set_data

set_data(device, datatype, value, id=0)

get_data

get_data(device, datatype, id=0)

device_exist

device_exist(device)

id_exist

id_exist(device, id)

datatype_exist

datatype_exist(device, id, datatype)

get_device_list

get_device_list()

get_id_list

get_id_list(device)

get_datatype_list

get_datatype_list(device, id)

del_device

del_device(device)

del_id

del_id(device, id)

del_datatype

del_datatype(device, id, datatype)

show_data

show_data()

get_flight_data

get_flight_data(drone_id: int = 0) -> FlightData | None

Get typed flight telemetry data.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
FlightData | None

FlightData model or None if not available

get_battery_percent

get_battery_percent(drone_id: int = 0) -> int | None

Get battery percentage.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
int | None

Battery percentage (0-100) or None if not available

get_obstacles

get_obstacles(drone_id: int = 0) -> Obstacles

Get obstacle detection state.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
Obstacles

Obstacles model (empty if no data)

get_drone_status

get_drone_status(drone_id: int = 0) -> int | None

Get drone status from heartbeat.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
int | None

Drone status code or None if not available

is_drone_ready

is_drone_ready(drone_id: int = 0) -> bool

Check if drone is in ready state.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
bool

True if drone is ready (status == 2)

has_telemetry

has_telemetry(drone_id: int = 0) -> bool

Check if telemetry data is available.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
bool

True if flight_data exists

has_heartbeat

has_heartbeat(drone_id: int = 0) -> bool

Check if heartbeat data is available.

Parameters:

Name Type Description Default
drone_id int

Drone ID (default 0)

0

Returns:

Type Description
bool

True if heartbeat exists

StateProcessor

mavlink_msg_id = None

uwb_msg_id class-attribute instance-attribute

uwb_msg_id = None

get_state

get_state() -> State | None

FormationRequestInfoSP

Bases: StateProcessor

mavlink_msg_id = 173

get_state

get_state()

get_pack_info

get_pack_info()

FirmwareHeadsSP

Bases: StateProcessor

mavlink_msg_id = 184

get_state

get_state()

HeartbeatSP

Bases: StateProcessor

mavlink_msg_id = 207

get_state

get_state()

Plane_REPORT_FLIGHT_DATA

Bases: StateProcessor

mavlink_msg_id = 206

BATTERY_WARNING_THRESHOLD class-attribute instance-attribute

BATTERY_WARNING_THRESHOLD = warning_threshold

BATTERY_CRITICAL_THRESHOLD class-attribute instance-attribute

BATTERY_CRITICAL_THRESHOLD = critical_threshold

get_state

get_state()

PhotoresponseSP

Bases: StateProcessor

mavlink_msg_id = 230

get_state

get_state()

FormationAckSP

Bases: StateProcessor

mavlink_msg_id = 209

get_state

get_state()

PSysResponseSP

Bases: StateProcessor

mavlink_msg_id = 213

get_state

get_state()

BROADCAST_PLANE_STATUS

Bases: StateProcessor

mavlink_msg_id = 232

get_state

get_state()

PLANE_STATUS

Bases: StateProcessor

mavlink_msg_id = 231

get_state

get_state()

PLANE_CAMERA

Bases: StateProcessor

mavlink_msg_id = 236

get_state

get_state()

PLANE_QRRecognite_Deal

Bases: StateProcessor

mavlink_msg_id = 234

get_state

get_state()

PLANE_ColorRecog

Bases: StateProcessor

mavlink_msg_id = 235

get_state

get_state()

Bases: StateProcessor

mavlink_msg_id = 253
get_state()

Bases: StateProcessor

mavlink_msg_id = 219
get_state()

Bases: StateProcessor

mavlink_msg_id = 228
get_state()

SYSTEM_TIME_SP

Bases: StateProcessor

SYSTEM_TIME (msg 2) - Time sync from app

mavlink_msg_id = 2

get_state

get_state()

MANUAL_CONTROL_SP

Bases: StateProcessor

MANUAL_CONTROL (msg 69) - Joystick input

mavlink_msg_id = 69

get_state

get_state()

MANUAL_CONTROL2_SP

Bases: StateProcessor

MANUAL_CONTROL2 (msg 71) - Follow mode joystick

mavlink_msg_id = 71

get_state

get_state()

LOCAL_POSITION_SP

Bases: StateProcessor

LOCAL_POSITION (msg 72) - HIGH-FREQUENCY 500Hz position stream

mavlink_msg_id = 72

get_state

get_state()

OPTITRACK_SP

Bases: StateProcessor

OPTITRACK (msg 101) - External motion capture data

mavlink_msg_id = 101

get_state

get_state()

AUTOPILOT_VERSION_SP

Bases: StateProcessor

AUTOPILOT_VERSION (msg 148) - Product info

mavlink_msg_id = 148

get_state

get_state()

POSITION_CONTROL_SETPOINT_SP

Bases: StateProcessor

POSITION_CONTROL_SETPOINT (msg 170) - Target position control

mavlink_msg_id = 170

get_state

get_state()

APP_HEARTBEAT_SP

Bases: StateProcessor

APP_HEARTBEAT (msg 204) - Keep-alive from app

mavlink_msg_id = 204

get_state

get_state()

FORMATION_CMD_SP

Bases: StateProcessor

FORMATION_CMD (msg 208) - Flight commands sent from app

mavlink_msg_id = 208

get_state

get_state()

FILE_RESPONSE_INFO_SP

Bases: StateProcessor

FILE_RESPONSE_INFO (msg 213) - File transfer response

mavlink_msg_id = 213

get_state

get_state()

WIFI_SETS_SP

Bases: StateProcessor

WIFI_SETS (msg 214) - WiFi configuration

mavlink_msg_id = 214

get_state

get_state()

COLOR_TRACK_TARGET_SP

Bases: StateProcessor

COLOR_TRACK_TARGET (msg 215) - Color tracking setup

mavlink_msg_id = 215

get_state

get_state()

COLOR_TRACK_TARGET_RET_SP

Bases: StateProcessor

COLOR_TRACK_TARGET_RET (msg 216) - Color tracking result

mavlink_msg_id = 216

get_state

get_state()

FILE_HEADS_SP

Bases: StateProcessor

FILE_HEADS (msg 227) - File transfer header

mavlink_msg_id = 227

get_state

get_state()

PLANE_COMMAND_SP

Bases: StateProcessor

PLANE_COMMAND (msg 229) - Camera/laser/magnet commands to Linux

mavlink_msg_id = 229

get_state

get_state()

LONGITUDE_LATITUDE_SP

Bases: StateProcessor

LONGITUDE_LATITUDE (msg 237) - GPS coordinates

mavlink_msg_id = 237

get_state

get_state()

CONSOLE_SP

Bases: StateProcessor

CONSOLE (msg 252) - Debug console commands

mavlink_msg_id = 252

get_state

get_state()

UwbHeartBeatSP

Bases: StateProcessor

uwb_msg_id class-attribute instance-attribute

uwb_msg_id = 1

get_state

get_state()

UwbStateSP

Bases: StateProcessor

uwb_msg_id class-attribute instance-attribute

uwb_msg_id = 2

get_state

get_state()

UwbLocationResponse

Bases: StateProcessor

uwb_msg_id class-attribute instance-attribute

uwb_msg_id = 3

get_state

get_state()

StateProcessorFactory

get_state_processor staticmethod

get_state_processor(msg)

refresh_runtime_config

refresh_runtime_config(runtime_config: DroneConfig) -> None

Refresh battery thresholds after runtime config changes.

Task Processor

taskprocessor

SysState module-attribute

SysState = Enum('SysState', ('U_State_Get', 'U_State_GetHeartbeat', 'M_Dance_GetFormationRequest', 'P_State_GetHeartbeat', 'P_Ack_GetFormation', 'P_Ack_GetAuxSetup', 'P_Sys_Response', 'P_State_Photoresponse', 'P_State_Plight_Data', 'p_State_BROADCAST_PLANE_STATUS', 'P_State_CAMERA', 'P_State_QRRecognite_Deal', 'P_State_ColorRecog', 'P_State_WALKING', 'P_State_MSG_ID_PLANE_ACK'))

us module-attribute

us = State(U_State_Get, 88)

WIRE_PROTOCOL_VERSION module-attribute

WIRE_PROTOCOL_VERSION = '1.0'

DIALECT module-attribute

DIALECT = 'python'

PROTOCOL_MARKER_V1 module-attribute

PROTOCOL_MARKER_V1 = 254

PROTOCOL_MARKER_V2 module-attribute

PROTOCOL_MARKER_V2 = 253

HEADER_LEN_V1 module-attribute

HEADER_LEN_V1 = 6

HEADER_LEN_V2 module-attribute

HEADER_LEN_V2 = 10
MAVLINK_SIGNATURE_BLOCK_LEN = 13
MAVLINK_IFLAG_SIGNED = 1

native_force module-attribute

native_force = 'MAVNATIVE_FORCE' in environ

native_testing module-attribute

native_testing = 'MAVNATIVE_TESTING' in environ
MAVLINK_IGNORE_CRC = get('MAV_IGNORE_CRC', 1)
MAVLINK_TYPE_CHAR = 0
MAVLINK_TYPE_UINT8_T = 1
MAVLINK_TYPE_INT8_T = 2
MAVLINK_TYPE_UINT16_T = 3
MAVLINK_TYPE_INT16_T = 4
MAVLINK_TYPE_UINT32_T = 5
MAVLINK_TYPE_INT32_T = 6
MAVLINK_TYPE_UINT64_T = 7
MAVLINK_TYPE_INT64_T = 8
MAVLINK_TYPE_FLOAT = 9
MAVLINK_TYPE_DOUBLE = 10

enums module-attribute

enums = {'MAV_SYS_STATUS_SENSOR': {}}

MAV_SYS_STATUS_SENSOR_3D_GYRO module-attribute

MAV_SYS_STATUS_SENSOR_3D_GYRO = 1

MAV_SYS_STATUS_SENSOR_3D_ACCEL module-attribute

MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2

MAV_SYS_STATUS_SENSOR_3D_MAG module-attribute

MAV_SYS_STATUS_SENSOR_3D_MAG = 4

MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE module-attribute

MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8

MAV_SYS_STATUS_SENSOR_GPS module-attribute

MAV_SYS_STATUS_SENSOR_GPS = 16

MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW module-attribute

MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 32

MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL module-attribute

MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 64

MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL module-attribute

MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 128

MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS module-attribute

MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 256

MAV_SYS_STATUS_SENSOR_RC_RECEIVER module-attribute

MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 512

MAV_SYS_STATUS_AHRS module-attribute

MAV_SYS_STATUS_AHRS = 1024

MAV_SYS_STATUS_TERRAIN module-attribute

MAV_SYS_STATUS_TERRAIN = 2048

MAV_SYS_STATUS_BATTERY module-attribute

MAV_SYS_STATUS_BATTERY = 4096

MAV_SYS_STATUS_SENSOR_3D_GYRO_CALIBRATED module-attribute

MAV_SYS_STATUS_SENSOR_3D_GYRO_CALIBRATED = 8192

MAV_SYS_STATUS_SENSOR_3D_ACCEL_CALIBRATED module-attribute

MAV_SYS_STATUS_SENSOR_3D_ACCEL_CALIBRATED = 16384

MAV_SYS_STATUS_SENSOR_3D_MAG_CALIBRATED module-attribute

MAV_SYS_STATUS_SENSOR_3D_MAG_CALIBRATED = 32768

MAV_SYS_STATUS_APP_CONTROL module-attribute

MAV_SYS_STATUS_APP_CONTROL = 65536

MAV_SYS_STATUS_SENSOR_ENUM_END module-attribute

MAV_SYS_STATUS_SENSOR_ENUM_END = 65537

MAV_RGB_STATUS_ON module-attribute

MAV_RGB_STATUS_ON = 1

MAV_RGB_STATUS_OFF module-attribute

MAV_RGB_STATUS_OFF = 2

MAV_RGB_STATUS_RGB module-attribute

MAV_RGB_STATUS_RGB = 4

MAV_RGB_STATUS_FLOW module-attribute

MAV_RGB_STATUS_FLOW = 8

MAV_RGB_STATUS_COLOR module-attribute

MAV_RGB_STATUS_COLOR = 16
MAV_RGB_STATUS_FAST_BLINK = 32

MAV_RGB_STATUS_BREATHING module-attribute

MAV_RGB_STATUS_BREATHING = 64

MAV_RGB_STATUS_ENUM_END module-attribute

MAV_RGB_STATUS_ENUM_END = 65

DIRECTION_FORWARD module-attribute

DIRECTION_FORWARD = 0

DIRECTION_BACK module-attribute

DIRECTION_BACK = 1

DIRECTION_LEFT module-attribute

DIRECTION_LEFT = 2

DIRECTION_RIGHT module-attribute

DIRECTION_RIGHT = 3

DIRECTION_DOWN module-attribute

DIRECTION_DOWN = 4

DIRECTION_UP module-attribute

DIRECTION_UP = 5

DIRECTION_OF_MOTION_ENUM_END module-attribute

DIRECTION_OF_MOTION_ENUM_END = 6

FLIGHT_ELLIPTICAL_TRACE module-attribute

FLIGHT_ELLIPTICAL_TRACE = 0

FLIGHT_CICULAR_TRACE module-attribute

FLIGHT_CICULAR_TRACE = 1

FLIGHT_SPHE_SURFACE module-attribute

FLIGHT_SPHE_SURFACE = 2

CURVE_FLIGHT_MODE_ENUM_END module-attribute

CURVE_FLIGHT_MODE_ENUM_END = 3

MAV_SEVERITY_EMERGENCY module-attribute

MAV_SEVERITY_EMERGENCY = 0

MAV_SEVERITY_ALERT module-attribute

MAV_SEVERITY_ALERT = 1

MAV_SEVERITY_CRITICAL module-attribute

MAV_SEVERITY_CRITICAL = 2

MAV_SEVERITY_ERROR module-attribute

MAV_SEVERITY_ERROR = 3

MAV_SEVERITY_WARNING module-attribute

MAV_SEVERITY_WARNING = 4

MAV_SEVERITY_NOTICE module-attribute

MAV_SEVERITY_NOTICE = 5

MAV_SEVERITY_INFO module-attribute

MAV_SEVERITY_INFO = 6

MAV_SEVERITY_DEBUG module-attribute

MAV_SEVERITY_DEBUG = 7

MAV_SEVERITY_ENUM_END module-attribute

MAV_SEVERITY_ENUM_END = 8

MAV_FORMATION_CMD_TAKEOFF module-attribute

MAV_FORMATION_CMD_TAKEOFF = 1

MAV_FORMATION_CMD_LAND module-attribute

MAV_FORMATION_CMD_LAND = 2

MAV_FORMATION_CMD_PREPARE module-attribute

MAV_FORMATION_CMD_PREPARE = 3

MAV_FORMATION_CMD_ARM module-attribute

MAV_FORMATION_CMD_ARM = 4

MAV_FORMATION_CMD_DISARM module-attribute

MAV_FORMATION_CMD_DISARM = 5

MAV_FORMATION_CMD_TIME_SYNC module-attribute

MAV_FORMATION_CMD_TIME_SYNC = 6

MAV_FORMATION_CMD_AUX_SETUP module-attribute

MAV_FORMATION_CMD_AUX_SETUP = 7

MAV_FORMATION_CMD_ENTER_CALMAG module-attribute

MAV_FORMATION_CMD_ENTER_CALMAG = 8

MAV_FORMATION_CMD_EXIT_CALMAG module-attribute

MAV_FORMATION_CMD_EXIT_CALMAG = 9

MAV_FORMATION_CMD_SHOWON_WARNING_BATT module-attribute

MAV_FORMATION_CMD_SHOWON_WARNING_BATT = 10

MAV_FORMATION_CMD_SHOWOFF_WARNING_BATT module-attribute

MAV_FORMATION_CMD_SHOWOFF_WARNING_BATT = 11

MAV_FORMATION_CMD_ENABLE_LED module-attribute

MAV_FORMATION_CMD_ENABLE_LED = 12

MAV_FORMATION_CMD_DISABLE_LED module-attribute

MAV_FORMATION_CMD_DISABLE_LED = 13

MAV_FORMATION_CMD_ERASE_DANCE module-attribute

MAV_FORMATION_CMD_ERASE_DANCE = 14

MAV_FORMATION_CMD_REBOOT module-attribute

MAV_FORMATION_CMD_REBOOT = 15

MAV_FORMATION_CMD_ENABLE_RGB module-attribute

MAV_FORMATION_CMD_ENABLE_RGB = 16

MAV_FORMATION_CMD_DISABLE_RGB module-attribute

MAV_FORMATION_CMD_DISABLE_RGB = 17

MAV_FORMATION_CMD_ENABLE_FLOW module-attribute

MAV_FORMATION_CMD_ENABLE_FLOW = 18

MAV_FORMATION_CMD_DISABLE_FLOW module-attribute

MAV_FORMATION_CMD_DISABLE_FLOW = 19

MAV_FORMATION_CMD_CHANGE_ID module-attribute

MAV_FORMATION_CMD_CHANGE_ID = 20

MAV_FORMATION_CMD_ENTER_CALACC module-attribute

MAV_FORMATION_CMD_ENTER_CALACC = 21

MAV_FORMATION_CMD_EXIT_CALACC module-attribute

MAV_FORMATION_CMD_EXIT_CALACC = 22

MAV_FORMATION_CMD_ONE_KEY_TAKEOFF module-attribute

MAV_FORMATION_CMD_ONE_KEY_TAKEOFF = 23

MAV_FORMATION_CMD_EXIT_TAKEOFF module-attribute

MAV_FORMATION_CMD_EXIT_TAKEOFF = 24

MAV_FORMATION_CMD_CHANGE_DANCE module-attribute

MAV_FORMATION_CMD_CHANGE_DANCE = 25

MAV_FORMATION_CMD_SET_RGB module-attribute

MAV_FORMATION_CMD_SET_RGB = 26

MAV_FORMATION_CMD_CANSEL_RGB module-attribute

MAV_FORMATION_CMD_CANSEL_RGB = 27

MAV_FORMATION_CMD_MISSION module-attribute

MAV_FORMATION_CMD_MISSION = 28

MAV_FORMATION_CMD_UP_DOWN module-attribute

MAV_FORMATION_CMD_UP_DOWN = 29

MAV_FORMATION_CMD_FORWARD_BACK module-attribute

MAV_FORMATION_CMD_FORWARD_BACK = 30

MAV_FORMATION_CMD_LEFT_RIGHT module-attribute

MAV_FORMATION_CMD_LEFT_RIGHT = 31

MAV_FORMATION_CMD_YAW_ANGLE module-attribute

MAV_FORMATION_CMD_YAW_ANGLE = 32

MAV_FORMATION_CMD_BOUNCE module-attribute

MAV_FORMATION_CMD_BOUNCE = 33

MAV_FORMATION_CMD_CIRCLE module-attribute

MAV_FORMATION_CMD_CIRCLE = 34

MAV_FORMATION_CMD_STRAIGHT_FLIGHT module-attribute

MAV_FORMATION_CMD_STRAIGHT_FLIGHT = 35

MAV_FORMATION_CMD_YAW_TURN module-attribute

MAV_FORMATION_CMD_YAW_TURN = 36

MAV_FORMATION_CMD_FLIP module-attribute

MAV_FORMATION_CMD_FLIP = 37

MAV_FORMATION_CMD_CURVE_FLIGHT module-attribute

MAV_FORMATION_CMD_CURVE_FLIGHT = 38

MAV_FORMATION_CMD_VERTICAL_CIRCLE module-attribute

MAV_FORMATION_CMD_VERTICAL_CIRCLE = 39

MAV_FORMATION_CMD_ENABLE_AVOIDANCE module-attribute

MAV_FORMATION_CMD_ENABLE_AVOIDANCE = 40

MAV_FORMATION_CMD_DISABLE_AVOIDANCE module-attribute

MAV_FORMATION_CMD_DISABLE_AVOIDANCE = 41

MAV_FORMATION_CMD_SET_AVOIDANCE module-attribute

MAV_FORMATION_CMD_SET_AVOIDANCE = 42

MAV_FORMATION_CMD_GET_FLIGHT_DATA module-attribute

MAV_FORMATION_CMD_GET_FLIGHT_DATA = 43

MAV_FORMATION_CMD_GET_PRODUCT_ID module-attribute

MAV_FORMATION_CMD_GET_PRODUCT_ID = 44

MAV_FORMATION_CMD_CAL_GYRO module-attribute

MAV_FORMATION_CMD_CAL_GYRO = 45

MAV_FORMATION_CMD_HOLD module-attribute

MAV_FORMATION_CMD_HOLD = 46

MAV_FORMATION_CMD_GET_BARRIER_INFO module-attribute

MAV_FORMATION_CMD_GET_BARRIER_INFO = 47

MAV_FORMATION_CMD_SET_VELOCITY module-attribute

MAV_FORMATION_CMD_SET_VELOCITY = 48

MAV_FORMATION_CMD_SET_YAWRATE module-attribute

MAV_FORMATION_CMD_SET_YAWRATE = 49

MAV_FORMATION_CMD_SET_RGB_BRIGHTNESS module-attribute

MAV_FORMATION_CMD_SET_RGB_BRIGHTNESS = 50

MAV_FORMATION_CMD_ENTER_FOLLOW_LINE module-attribute

MAV_FORMATION_CMD_ENTER_FOLLOW_LINE = 51

MAV_FORMATION_CMD_EXIT_FOLLOW_LINE module-attribute

MAV_FORMATION_CMD_EXIT_FOLLOW_LINE = 52

MAV_FORMATION_CMD_ENABLE_BATTERY_FS module-attribute

MAV_FORMATION_CMD_ENABLE_BATTERY_FS = 53

MAV_FORMATION_CMD_DISABLE_BATTERY_FS module-attribute

MAV_FORMATION_CMD_DISABLE_BATTERY_FS = 54

MAV_FORMATION_CMD_SET_PARAMETER module-attribute

MAV_FORMATION_CMD_SET_PARAMETER = 55

MAV_FORMATION_CMD_CAL_INFRARED module-attribute

MAV_FORMATION_CMD_CAL_INFRARED = 56

MAV_FORMATION_CMD_CLEAR_FLIGHT_TIME module-attribute

MAV_FORMATION_CMD_CLEAR_FLIGHT_TIME = 57

MAV_FORMATION_CMD_CLEAR_LOG module-attribute

MAV_FORMATION_CMD_CLEAR_LOG = 58

MAV_FORMATION_CMD_OPERATE module-attribute

MAV_FORMATION_CMD_OPERATE = 59

MAV_FORMATION_CMD_ENUM_END module-attribute

MAV_FORMATION_CMD_ENUM_END = 60
MAVLINK_MSG_ID_BAD_DATA = -1
MAVLINK_MSG_ID_UNKNOWN = -2
MAVLINK_MSG_ID_SYSTEM_TIME = 2
MAVLINK_MSG_ID_MANUAL_CONTROL = 69
MAVLINK_MSG_ID_MANUAL_CONTROL2 = 71
MAVLINK_MSG_ID_LOCAL_POSITION = 72
MAVLINK_MSG_ID_OPTITRACK = 101
MAVLINK_MSG_ID_AUTOPILOT_VERSION = 148
MAVLINK_MSG_ID_POSITION_CONTROL_SETPOINT = 170
MAVLINK_MSG_ID_APP_HEARTBEAT = 204
MAVLINK_MSG_ID_REPORT_FLIGHT_DATA = 206
MAVLINK_MSG_ID_REPORT_STATS = 207
MAVLINK_MSG_ID_FORMATION_CMD = 208
MAVLINK_MSG_ID_FORMATION_CMD_ACK = 209
MAVLINK_MSG_ID_CONSOLE = 252
MAVLINK_MSG_ID_STATUSTEXT = 253
MAVLINK_MSG_ID_FILE_RESPONSE_INFO = 213
MAVLINK_MSG_ID_WIFI_SETS = 214
MAVLINK_MSG_ID_COLOR_TRACK_TARGET = 215
MAVLINK_MSG_ID_COLOR_TRACK_TARGET_RET = 216
MAVLINK_MSG_ID_LINE_WALKING = 219
MAVLINK_MSG_ID_FILE_HEADS = 227
MAVLINK_MSG_ID_PLANE_ACK = 228
MAVLINK_MSG_ID_PLANE_COMMAND = 229
MAVLINK_MSG_ID_PLANE_ACK_EXTEND = 230
MAVLINK_MSG_ID_PLANE_STATUS = 231
MAVLINK_MSG_ID_BROADCAST_PLANE_STATUS = 232
MAVLINK_MSG_ID_QRRECOGNITE_DEAL = 234
MAVLINK_MSG_ID_COLORRECOG = 235
MAVLINK_MSG_ID_CAMERA = 236
MAVLINK_MSG_ID_LONGITUDE_LATITUDE = 237
mavlink_map = {MAVLINK_MSG_ID_SYSTEM_TIME: MAVLink_system_time_message, MAVLINK_MSG_ID_MANUAL_CONTROL: MAVLink_manual_control_message, MAVLINK_MSG_ID_MANUAL_CONTROL2: MAVLink_manual_control2_message, MAVLINK_MSG_ID_LOCAL_POSITION: MAVLink_local_position_message, MAVLINK_MSG_ID_OPTITRACK: MAVLink_optitrack_message, MAVLINK_MSG_ID_AUTOPILOT_VERSION: MAVLink_autopilot_version_message, MAVLINK_MSG_ID_POSITION_CONTROL_SETPOINT: MAVLink_position_control_setpoint_message, MAVLINK_MSG_ID_APP_HEARTBEAT: MAVLink_app_heartbeat_message, MAVLINK_MSG_ID_REPORT_FLIGHT_DATA: MAVLink_report_flight_data_message, MAVLINK_MSG_ID_REPORT_STATS: MAVLink_report_stats_message, MAVLINK_MSG_ID_FORMATION_CMD: MAVLink_formation_cmd_message, MAVLINK_MSG_ID_FORMATION_CMD_ACK: MAVLink_formation_cmd_ack_message, MAVLINK_MSG_ID_CONSOLE: MAVLink_console_message, MAVLINK_MSG_ID_STATUSTEXT: MAVLink_statustext_message, MAVLINK_MSG_ID_FILE_RESPONSE_INFO: MAVLink_file_response_info_message, MAVLINK_MSG_ID_WIFI_SETS: MAVLink_wifi_sets_message, MAVLINK_MSG_ID_COLOR_TRACK_TARGET: MAVLink_color_track_target_message, MAVLINK_MSG_ID_COLOR_TRACK_TARGET_RET: MAVLink_color_track_target_ret_message, MAVLINK_MSG_ID_LINE_WALKING: MAVLink_line_walking_message, MAVLINK_MSG_ID_FILE_HEADS: MAVLink_file_heads_message, MAVLINK_MSG_ID_PLANE_ACK: MAVLink_plane_ack_message, MAVLINK_MSG_ID_PLANE_COMMAND: MAVLink_plane_command_message, MAVLINK_MSG_ID_PLANE_ACK_EXTEND: MAVLink_plane_ack_extend_message, MAVLINK_MSG_ID_PLANE_STATUS: MAVLink_plane_status_message, MAVLINK_MSG_ID_BROADCAST_PLANE_STATUS: MAVLink_broadcast_plane_status_message, MAVLINK_MSG_ID_QRRECOGNITE_DEAL: MAVLink_qrrecognite_deal_message, MAVLINK_MSG_ID_COLORRECOG: MAVLink_colorrecog_message, MAVLINK_MSG_ID_CAMERA: MAVLink_camera_message}

crc16tab module-attribute

crc16tab = [0, 4129, 8258, 12387, 16516, 20645, 24774, 28903, 33032, 37161, 41290, 45419, 49548, 53677, 57806, 61935, 4657, 528, 12915, 8786, 21173, 17044, 29431, 25302, 37689, 33560, 45947, 41818, 54205, 50076, 62463, 58334, 9314, 13379, 1056, 5121, 25830, 29895, 17572, 21637, 42346, 46411, 34088, 38153, 58862, 62927, 50604, 54669, 13907, 9842, 5649, 1584, 30423, 26358, 22165, 18100, 46939, 42874, 38681, 34616, 63455, 59390, 55197, 51132, 18628, 22757, 26758, 30887, 2112, 6241, 10242, 14371, 51660, 55789, 59790, 63919, 35144, 39273, 43274, 47403, 23285, 19156, 31415, 27286, 6769, 2640, 14899, 10770, 56317, 52188, 64447, 60318, 39801, 35672, 47931, 43802, 27814, 31879, 19684, 23749, 11298, 15363, 3168, 7233, 60846, 64911, 52716, 56781, 44330, 48395, 36200, 40265, 32407, 28342, 24277, 20212, 15891, 11826, 7761, 3696, 65439, 61374, 57309, 53244, 48923, 44858, 40793, 36728, 37256, 33193, 45514, 41451, 53516, 49453, 61774, 57711, 4224, 161, 12482, 8419, 20484, 16421, 28742, 24679, 33721, 37784, 41979, 46042, 49981, 54044, 58239, 62302, 689, 4752, 8947, 13010, 16949, 21012, 25207, 29270, 46570, 42443, 38312, 34185, 62830, 58703, 54572, 50445, 13538, 9411, 5280, 1153, 29798, 25671, 21540, 17413, 42971, 47098, 34713, 38840, 59231, 63358, 50973, 55100, 9939, 14066, 1681, 5808, 26199, 30326, 17941, 22068, 55628, 51565, 63758, 59695, 39368, 35305, 47498, 43435, 22596, 18533, 30726, 26663, 6336, 2273, 14466, 10403, 52093, 56156, 60223, 64286, 35833, 39896, 43963, 48026, 19061, 23124, 27191, 31254, 2801, 6864, 10931, 14994, 64814, 60687, 56684, 52557, 48554, 44427, 40424, 36297, 31782, 27655, 23652, 19525, 15522, 11395, 7392, 3265, 61215, 65342, 53085, 57212, 44955, 49082, 36825, 40952, 28183, 32310, 20053, 24180, 11923, 16050, 3793, 7920]

UserTask module-attribute

UserTask = Enum('UserTask', ('S_Fly_Takeoff', 'S_Fly_Touchdown', 'S_Fly_Forward', 'S_Fly_Back', 'S_Fly_Left', 'S_Fly_Right', 'S_Fly_Up', 'S_Fly_Down', 'S_Fly_unlock', 'S_Fly_lock', 'S_Fly_TurnLeft', 'S_Fly_TurnRight', 'S_Fly_TurnLeft360', 'S_Fly_TurnRight360', 'S_Fly_Bounce', 'S_Fly_StraightFlight', 'S_Fly_FlipForward', 'S_Fly_FlipBack', 'S_Fly_FlipLeft', 'S_Fly_FlipRight', 'S_Fly_Lamplight', 'S_Fly_RadiusAround', 'S_Fly_Linux_cmd', 'S_Fly_CurvilinearFlight', 'S_Fly_HoverFlight', 'S_Fly_Barrier_aircraft', 'S_Fly_Line_walking', 'S_Fly_AiIdentifies', 'S_Fly_Qr_tracking', 'S_Fly_Qr_align', 'S_Fly_ColorRecog', 'S_Fly_Plane_time', 'S_Fly_Enable_LED', 'S_Fly_Disable_LED', 'S_Fly_Cancel_RGB', 'S_Fly_Vertical_Circle', 'S_Fly_Set_Avoidance', 'S_Fly_Get_Product_ID', 'S_Fly_Set_Velocity', 'S_Fly_Set_Yawrate', 'S_Fly_Set_RGB_Brightness', 'S_Fly_Enable_Battery_FS', 'S_Fly_Disable_Battery_FS', 'S_Fly_Set_Parameter', 'S_Fly_Operate', 'S_Fly_Set_Land_Speed', 'S_Fly_Set_Video_Resolution', 'S_Fly_Set_WiFi_Mode'))

SysTask module-attribute

SysTask = Enum('SysTask', ('P_State_GetHeartbeat', 'P_Sys_SendTime', 'P_Sys_CleanPlane'))

State

set_state

set_state(state)

set_data

set_data(data)

get_state

get_state()

get_data

get_data()

updata_time

updata_time()

get_time

get_time()

get_str_time

get_str_time()

x25crc

Bases: object

x25 CRC - based on checksum.h from mavlink library

crc instance-attribute

crc = 65535

accumulate

accumulate(buf)

add in some more bytes

accumulate_str

accumulate_str(buf)

add in some more bytes

Bases: object

MAVLink message header

mlen = mlen
seq = seq
srcSystem = src_system
srcComponent = src_component
msgId = msg_id
incompat_flags = incompat_flags
compat_flags = compat_flags
pack(force_mavlink1=False)

Bases: object

base MAVLink message class

format_attr(field)

override field getter

get_msgbuf()
get_header()
get_payload()
get_crc()
get_fieldnames()
get_type()
get_msg_id()
get_src_system()
get_src_component()
get_seq()
get_signed()
get_link_id()
to_dict()
to_json()
sign_packet(mav)
pack(mav, crc_extra, payload, force_mavlink1=False)

EnumEntry

Bases: object

name instance-attribute

name = name

description instance-attribute

description = description

param instance-attribute

param = {}

Bases: MAVLink_message

The system time is the time of the master clock, typically the computer clock of the main onboard computer.

name = 'SYSTEM_TIME'
fieldnames = ['time_unix_usec', 'time_boot_ms']
ordered_fieldnames = ['time_unix_usec', 'time_boot_ms']
fieldtypes = ['uint64_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'time_unix_usec': 'us', 'time_boot_ms': 'ms'}
format = '<QI'
native_format = bytearray('<QI', 'ascii')
orders = [0, 1]
lengths = [1, 1]
array_lengths = [0, 0]
crc_extra = 137
unpacker = Struct('<QI')
instance_field = None
instance_offset = -1
time_unix_usec = time_unix_usec
time_boot_ms = time_boot_ms
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

This message provides an API for manually controlling the

buttons are also transmit as boolean values of their

name = 'MANUAL_CONTROL'
fieldnames = ['target', 'x', 'y', 'z', 'r', 'buttons']
ordered_fieldnames = ['x', 'y', 'z', 'r', 'buttons', 'target']
fieldtypes = ['uint8_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<hhhhHB'
native_format = bytearray('<hhhhHB', 'ascii')
orders = [5, 0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0]
crc_extra = 243
unpacker = Struct('<hhhhHB')
instance_field = None
instance_offset = -1
target = target
x = x
y = y
z = z
r = r
buttons = buttons
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

This message provides an API for manually controlling the

buttons are also transmit as boolean values of their

name = 'MANUAL_CONTROL2'
fieldnames = ['target', 'x', 'y', 'z', 'r', 'buttons']
ordered_fieldnames = ['x', 'y', 'z', 'r', 'buttons', 'target']
fieldtypes = ['uint8_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<hhhhHB'
native_format = bytearray('<hhhhHB', 'ascii')
orders = [5, 0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0]
crc_extra = 131
unpacker = Struct('<hhhhHB')
instance_field = None
instance_offset = -1
target = target
x = x
y = y
z = z
r = r
buttons = buttons
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report flight data .

name = 'LOCAL_POSITION'
fieldnames = ['yaw', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z']
ordered_fieldnames = ['yaw', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z']
fieldtypes = ['int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'yaw': '0.01 degree', 'vel_x': '0.01m/s', 'vel_y': '0.01m/s', 'vel_z': '0.01m/s', 'x': '0.01m', 'y': '0.01m', 'z': '0.01m'}
format = '<hhhhhhh'
native_format = bytearray('<hhhhhhh', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6]
lengths = [1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0]
crc_extra = 193
unpacker = Struct('<hhhhhhh')
instance_field = None
instance_offset = -1
yaw = yaw
vel_x = vel_x
vel_y = vel_y
vel_z = vel_z
x = x
y = y
z = z
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Optitrack raw data .

name = 'OPTITRACK'
fieldnames = ['raw_data']
ordered_fieldnames = ['raw_data']
fieldtypes = ['uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<189B'
native_format = bytearray('<B', 'ascii')
orders = [0]
lengths = [189]
array_lengths = [189]
crc_extra = 15
unpacker = Struct('<189B')
instance_field = None
instance_offset = -1
raw_data = raw_data
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report autopilot version and producd id .

name = 'AUTOPILOT_VERSION'
fieldnames = ['autopilot_sw_version', 'autopilot_hw_version', 'product_id', 'autopilot_uid']
ordered_fieldnames = ['autopilot_sw_version', 'autopilot_hw_version', 'product_id', 'autopilot_uid']
fieldtypes = ['uint32_t', 'uint32_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<II20B12B'
native_format = bytearray('<IIBB', 'ascii')
orders = [0, 1, 2, 3]
lengths = [1, 1, 20, 12]
array_lengths = [0, 0, 20, 12]
crc_extra = 184
unpacker = Struct('<II20B12B')
instance_field = None
instance_offset = -1
autopilot_sw_version = autopilot_sw_version
autopilot_hw_version = autopilot_hw_version
product_id = product_id
autopilot_uid = autopilot_uid
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg from vision control pilot .

name = 'POSITION_CONTROL_SETPOINT'
fieldnames = ['x', 'y', 'z', 'yaw', 'speed', 'yaw_rate']
ordered_fieldnames = ['x', 'y', 'z', 'yaw', 'speed', 'yaw_rate']
fieldtypes = ['float', 'float', 'float', 'float', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<ffffBB'
native_format = bytearray('<ffffBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0]
crc_extra = 107
unpacker = Struct('<ffffBB')
instance_field = None
instance_offset = -1
x = x
y = y
z = z
yaw = yaw
speed = speed
yaw_rate = yaw_rate
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report pilot used mode .

name = 'APP_HEARTBEAT'
fieldnames = ['user_mode']
ordered_fieldnames = ['user_mode']
fieldtypes = ['uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<B'
native_format = bytearray('<B', 'ascii')
orders = [0]
lengths = [1]
array_lengths = [0]
crc_extra = 227
unpacker = Struct('<B')
instance_field = None
instance_offset = -1
user_mode = user_mode
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report flight data .

name = 'REPORT_FLIGHT_DATA'
fieldnames = ['roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn', 'baro_alt']
ordered_fieldnames = ['baro_alt', 'roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn']
fieldtypes = ['int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint8_t', 'uint8_t', 'float']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'roll': '0.01 degree', 'pitch': '0.01 degree', 'yaw': '0.01 degree', 'accx': '0.01m/s2', 'accy': '0.01m/s2', 'accz': '0.01m/s2', 'vel_x': '0.01m/s', 'vel_y': '0.01m/s', 'vel_z': '0.01m/s', 'x': '0.01m', 'y': '0.01m', 'z': '0.01m', 'distance': '0.01m', 'baro_alt': '1m'}
format = '<fhhhhhhhhhhhhhBB'
native_format = bytearray('<fhhhhhhhhhhhhhBB', 'ascii')
orders = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 72
unpacker = Struct('<fhhhhhhhhhhhhhBB')
instance_field = None
instance_offset = -1
roll = roll
pitch = pitch
yaw = yaw
accx = accx
accy = accy
accz = accz
vel_x = vel_x
vel_y = vel_y
vel_z = vel_z
x = x
y = y
z = z
distance = distance
barrier = barrier
battery_volumn = battery_volumn
baro_alt = baro_alt
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report pilot status.

name = 'REPORT_STATS'
fieldnames = ['utc', 'flight_time', 'lat', 'lon', 'alt', 'x', 'y', 'z', 'yaw', 'sensors_present', 'sensors_health', 'drone_id', 'firmware_version', 'system_version', 'dance_version', 'dance_name', 'dance_md5', 'product_id', 'aux_token', 'time_token', 'battery_volumn', 'formation_status', 'rgb_status', 'acc_clibration_status', 'mag_clibration_status', 'temperature', 'block_status', 'drone_status']
ordered_fieldnames = ['utc', 'flight_time', 'lat', 'lon', 'alt', 'x', 'y', 'z', 'yaw', 'sensors_present', 'sensors_health', 'drone_id', 'firmware_version', 'system_version', 'dance_version', 'dance_name', 'dance_md5', 'product_id', 'aux_token', 'time_token', 'battery_volumn', 'formation_status', 'rgb_status', 'acc_clibration_status', 'mag_clibration_status', 'temperature', 'block_status', 'drone_status']
fieldtypes = ['uint64_t', 'uint64_t', 'int32_t', 'int32_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'int8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<QQiihhhhHHHHHHH8B16B16BBBBBBBBbBB'
native_format = bytearray('<QQiihhhhHHHHHHHBBBBBBBBBBbBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 165
unpacker = Struct('<QQiihhhhHHHHHHH8B16B16BBBBBBBBbBB')
instance_field = None
instance_offset = -1
utc = utc
flight_time = flight_time
lat = lat
lon = lon
alt = alt
x = x
y = y
z = z
yaw = yaw
sensors_present = sensors_present
sensors_health = sensors_health
drone_id = drone_id
firmware_version = firmware_version
system_version = system_version
dance_version = dance_version
dance_name = dance_name
dance_md5 = dance_md5
product_id = product_id
aux_token = aux_token
time_token = time_token
battery_volumn = battery_volumn
formation_status = formation_status
rgb_status = rgb_status
acc_clibration_status = acc_clibration_status
mag_clibration_status = mag_clibration_status
temperature = temperature
block_status = block_status
drone_status = drone_status
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Send a formation cmd with parameters to the MAV.

name = 'FORMATION_CMD'
fieldnames = ['param1', 'param2', 'param3', 'param4', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
ordered_fieldnames = ['param3', 'param4', 'param1', 'param2', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
fieldtypes = ['int16_t', 'int16_t', 'int32_t', 'int32_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'x': '0.01m', 'y': '0.01m', 'z': '0.01m', 'yaw': '0.01 degree'}
format = '<iihhhhhhHHHBBB'
native_format = bytearray('<iihhhhhhHHHBBB', 'ascii')
orders = [2, 3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 118
unpacker = Struct('<iihhhhhhHHHBBB')
instance_field = None
instance_offset = -1
param1 = param1
param2 = param2
param3 = param3
param4 = param4
x = x
y = y
z = z
yaw = yaw
start_id = start_id
end_id = end_id
token = token
cmd = cmd
ack = ack
type = message_type
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Report status of a formation cmd.

id = msg_id
name = 'FORMATION_CMD_ACK'
fieldnames = ['id', 'token', 'cmd', 'result', 'type']
ordered_fieldnames = ['id', 'token', 'cmd', 'result', 'type']
fieldtypes = ['uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<HHBBB'
native_format = bytearray('<HHBBB', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 158
unpacker = Struct('<HHBBB')
instance_field = None
instance_offset = -1
token = token
cmd = cmd
result = result
type = message_type
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Status text message.

name = 'CONSOLE'
fieldnames = ['text']
ordered_fieldnames = ['text']
fieldtypes = ['char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<50s'
native_format = bytearray('<c', 'ascii')
orders = [0]
lengths = [1]
array_lengths = [50]
crc_extra = 109
unpacker = Struct('<50s')
instance_field = None
instance_offset = -1
text = text
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Status text message.

id = msg_id
name = 'STATUSTEXT'
fieldnames = ['id', 'severity', 'text']
ordered_fieldnames = ['id', 'severity', 'text']
fieldtypes = ['uint32_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {'severity': 'MAV_SEVERITY'}
fieldunits_by_name = {}
format = '<IB50s'
native_format = bytearray('<IBc', 'ascii')
orders = [0, 1, 2]
lengths = [1, 1, 1]
array_lengths = [0, 0, 50]
crc_extra = 245
unpacker = Struct('<IB50s')
instance_field = None
instance_offset = -1
severity = severity
text = text
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is file reponse info

name = 'FILE_RESPONSE_INFO'
fieldnames = ['token', 'target_info', 'plane_id']
ordered_fieldnames = ['token', 'plane_id', 'target_info']
fieldtypes = ['uint32_t', 'uint8_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IIB'
native_format = bytearray('<IIB', 'ascii')
orders = [0, 2, 1]
lengths = [1, 1, 1]
array_lengths = [0, 0, 0]
crc_extra = 216
unpacker = Struct('<IIB')
instance_field = None
instance_offset = -1
token = token
target_info = target_info
plane_id = plane_id
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is wifi settings

name = 'WIFI_SETS'
fieldnames = ['token', 'plane_id', 'type', 'ack', 'ssid', 'psk']
ordered_fieldnames = ['token', 'plane_id', 'type', 'ack', 'ssid', 'psk']
fieldtypes = ['uint32_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IHBB20B20B'
native_format = bytearray('<IHBBBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 20, 20]
array_lengths = [0, 0, 0, 0, 20, 20]
crc_extra = 61
unpacker = Struct('<IHBB20B20B')
instance_field = None
instance_offset = -1
token = token
plane_id = plane_id
type = wifi_type
ack = ack
ssid = ssid
psk = psk
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

color track target

name = 'COLOR_TRACK_TARGET'
fieldnames = ['fun_id', 'data_w', 'data_h', 'data', 'rect_x', 'rect_y', 'rect_w', 'rect_h']
ordered_fieldnames = ['data_w', 'data_h', 'rect_x', 'rect_y', 'rect_w', 'rect_h', 'fun_id', 'data']
fieldtypes = ['uint8_t', 'uint32_t', 'uint32_t', 'uint8_t', 'uint32_t', 'uint32_t', 'uint32_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IIIIIIB147B'
native_format = bytearray('<IIIIIIBB', 'ascii')
orders = [6, 0, 1, 7, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1, 1, 147]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 147]
crc_extra = 135
unpacker = Struct('<IIIIIIB147B')
instance_field = None
instance_offset = -1
fun_id = fun_id
data_w = data_w
data_h = data_h
data = data
rect_x = rect_x
rect_y = rect_y
rect_w = rect_w
rect_h = rect_h
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

color track target ret

name = 'COLOR_TRACK_TARGET_RET'
fieldnames = ['frame_id', 'rect_x', 'rect_y', 'rect_w', 'rect_h']
ordered_fieldnames = ['frame_id', 'rect_x', 'rect_y', 'rect_w', 'rect_h']
fieldtypes = ['uint64_t', 'uint32_t', 'uint32_t', 'uint32_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<QIIII'
native_format = bytearray('<QIIII', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 159
unpacker = Struct('<QIIII')
instance_field = None
instance_offset = -1
frame_id = frame_id
rect_x = rect_x
rect_y = rect_y
rect_w = rect_w
rect_h = rect_h
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

line walking

name = 'LINE_WALKING'
fieldnames = ['fun_id', 'dist', 'tv', 'way_color', 'result']
ordered_fieldnames = ['fun_id', 'dist', 'tv', 'way_color', 'result']
fieldtypes = ['uint32_t', 'uint32_t', 'uint32_t', 'uint32_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IIIIB'
native_format = bytearray('<IIIIB', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 195
unpacker = Struct('<IIIIB')
instance_field = None
instance_offset = -1
fun_id = fun_id
dist = dist
tv = tv
way_color = way_color
result = result
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is file heads

name = 'FILE_HEADS'
fieldnames = ['token', 'file_type', 'file_size', 'plane_id', 'info', 'array', 'version', 'md5', 'file_name']
ordered_fieldnames = ['token', 'file_size', 'info', 'array', 'plane_id', 'file_type', 'version', 'md5', 'file_name']
fieldtypes = ['uint32_t', 'uint8_t', 'uint32_t', 'uint16_t', 'float', 'float', 'uint8_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<II4f6fHB3B16B50s'
native_format = bytearray('<IIffHBBBc', 'ascii')
orders = [0, 5, 1, 4, 2, 3, 6, 7, 8]
lengths = [1, 1, 4, 6, 1, 1, 3, 16, 1]
array_lengths = [0, 0, 4, 6, 0, 0, 3, 16, 50]
crc_extra = 199
unpacker = Struct('<II4f6fHB3B16B50s')
instance_field = None
instance_offset = -1
token = token
file_type = file_type
file_size = file_size
plane_id = plane_id
info = info
array = array
version = version
md5 = md5
file_name = file_name
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane ack command

name = 'PLANE_ACK'
fieldnames = ['token', 'plane_id', 'cmd', 'result', 'type']
ordered_fieldnames = ['plane_id', 'token', 'cmd', 'result', 'type']
fieldtypes = ['uint8_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<HBBBB'
native_format = bytearray('<HBBBB', 'ascii')
orders = [1, 0, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 200
unpacker = Struct('<HBBBB')
instance_field = None
instance_offset = -1
token = token
plane_id = plane_id
cmd = cmd
result = result
type = message_type
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane command

name = 'PLANE_COMMAND'
fieldnames = ['utc', 'token', 'data', 'plane_id', 'cmd', 'ack', 'type', 'reserve']
ordered_fieldnames = ['utc', 'token', 'data', 'plane_id', 'cmd', 'ack', 'type', 'reserve']
fieldtypes = ['uint64_t', 'uint32_t', 'uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<QIHHBBBB'
native_format = bytearray('<QIHHBBBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7]
lengths = [1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 174
unpacker = Struct('<QIHHBBBB')
instance_field = None
instance_offset = -1
utc = utc
token = token
data = data
plane_id = plane_id
cmd = cmd
ack = ack
type = message_type
reserve = reserve
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane ack command extend

name = 'PLANE_ACK_EXTEND'
fieldnames = ['token', 'plane_id', 'cmd', 'result', 'type', 'extend']
ordered_fieldnames = ['token', 'plane_id', 'cmd', 'result', 'type', 'extend']
fieldtypes = ['uint32_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IHBBB64s'
native_format = bytearray('<IHBBBc', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 64]
crc_extra = 150
unpacker = Struct('<IHBBB64s')
instance_field = None
instance_offset = -1
token = token
plane_id = plane_id
cmd = cmd
result = result
type = message_type
extend = extend
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane status

name = 'PLANE_STATUS'
fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
ordered_fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
fieldtypes = ['int64_t', 'int64_t', 'int64_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'int8_t', 'uint8_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<qqqHBBBBBbBB64s'
native_format = bytearray('<qqqHBBBBBbBBc', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64]
crc_extra = 103
unpacker = Struct('<qqqHBBBBBbBB64s')
instance_field = None
instance_offset = -1
capacity = capacity
remaining = remaining
occupied = occupied
plane_id = plane_id
rtp = rtp
dsp = dsp
qr = qr
video = video
laser = laser
pitch = pitch
line = line
wifi = wifi
extend = extend
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

broadcast mavlink plane status

name = 'BROADCAST_PLANE_STATUS'
fieldnames = ['sn', 'ip', 'plane_id', 'wifi_mode', 'bind_client', 'wifi_power']
ordered_fieldnames = ['sn', 'ip', 'plane_id', 'wifi_mode', 'bind_client', 'wifi_power']
fieldtypes = ['char', 'char', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<16s16sBBBB'
native_format = bytearray('<ccBBBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [16, 16, 0, 0, 0, 0]
crc_extra = 32
unpacker = Struct('<16s16sBBBB')
instance_field = None
instance_offset = -1
sn = sn
ip = ip
plane_id = plane_id
wifi_mode = wifi_mode
bind_client = bind_client
wifi_power = wifi_power
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

qr recognite deal

name = 'QRRECOGNITE_DEAL'
fieldnames = ['time_duration', 'search_radius', 'qr_size', 'run_rate', 'qr_id', 'x_com', 'y_com', 'z_com', 'yaw_com', 'mode', 'qr_background_grayscale', 'status']
ordered_fieldnames = ['time_duration', 'search_radius', 'qr_size', 'run_rate', 'qr_id', 'x_com', 'y_com', 'z_com', 'yaw_com', 'mode', 'qr_background_grayscale', 'status']
fieldtypes = ['double', 'float', 'float', 'int32_t', 'int32_t', 'float', 'float', 'float', 'float', 'uint8_t', 'int8_t', 'int8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<dffiiffffBbb'
native_format = bytearray('<dffiiffffBbb', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 208
unpacker = Struct('<dffiiffffBbb')
instance_field = None
instance_offset = -1
time_duration = time_duration
search_radius = search_radius
qr_size = qr_size
run_rate = run_rate
qr_id = qr_id
x_com = x_com
y_com = y_com
z_com = z_com
yaw_com = yaw_com
mode = mode
qr_background_grayscale = qr_background_grayscale
status = status
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

qr recognite deal

name = 'COLORRECOG'
fieldnames = ['mode', 'state', 'r', 'g', 'b']
ordered_fieldnames = ['mode', 'state', 'r', 'g', 'b']
fieldtypes = ['uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<BBBBB'
native_format = bytearray('<BBBBB', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 173
unpacker = Struct('<BBBBB')
instance_field = None
instance_offset = -1
mode = mode
state = state
r = r
g = g
b = b
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

recognite mark

name = 'CAMERA'
fieldnames = ['mode', 'type', 'result', 'x', 'y', 'z', 'angle', 'time_duration']
ordered_fieldnames = ['x', 'y', 'z', 'angle', 'time_duration', 'mode', 'type', 'result']
fieldtypes = ['uint8_t', 'uint8_t', 'uint8_t', 'float', 'float', 'float', 'float', 'uint16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<ffffHBBB'
native_format = bytearray('<ffffHBBB', 'ascii')
orders = [5, 6, 7, 0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 120
unpacker = Struct('<ffffHBBB')
instance_field = None
instance_offset = -1
mode = mode
type = camera_type
result = result
x = x
y = y
z = z
angle = angle
time_duration = time_duration
pack(mav, force_mavlink1=False)

MAVError

Bases: Exception

MAVLink error class

message instance-attribute

message = msg

MAVString

Bases: str

NUL terminated string

Bases: MAVLink_message

a piece of bad data in a mavlink stream

data = data
reason = reason

Bases: MAVLink_message

a message that we don't have in the XML used when built

data = data

MAVLinkSigning

Bases: object

MAVLink signing state class

secret_key instance-attribute

secret_key = None

timestamp instance-attribute

timestamp = 0
link_id = 0

sign_outgoing instance-attribute

sign_outgoing = False

allow_unsigned_callback instance-attribute

allow_unsigned_callback = None

stream_timestamps instance-attribute

stream_timestamps = {}

sig_count instance-attribute

sig_count = 0

badsig_count instance-attribute

badsig_count = 0

goodsig_count instance-attribute

goodsig_count = 0

unsigned_count instance-attribute

unsigned_count = 0

reject_count instance-attribute

reject_count = 0

Bases: object

MAVLink protocol handling class

seq instance-attribute

seq = 0

file instance-attribute

file = file

srcSystem instance-attribute

srcSystem = src_system

srcComponent instance-attribute

srcComponent = src_component

callback instance-attribute

callback = None

callback_args instance-attribute

callback_args = None

callback_kwargs instance-attribute

callback_kwargs = None

send_callback instance-attribute

send_callback = None

send_callback_args instance-attribute

send_callback_args = None

send_callback_kwargs instance-attribute

send_callback_kwargs = None

buf instance-attribute

buf = bytearray()

buf_index instance-attribute

buf_index = 0

expected_length instance-attribute

expected_length = HEADER_LEN_V1 + 2

have_prefix_error instance-attribute

have_prefix_error = False

robust_parsing instance-attribute

robust_parsing = False

protocol_marker instance-attribute

protocol_marker = 254

little_endian instance-attribute

little_endian = True

crc_extra instance-attribute

crc_extra = True

sort_fields instance-attribute

sort_fields = True

total_packets_sent instance-attribute

total_packets_sent = 0

total_bytes_sent instance-attribute

total_bytes_sent = 0

total_packets_received instance-attribute

total_packets_received = 0

total_bytes_received instance-attribute

total_bytes_received = 0

total_receive_errors instance-attribute

total_receive_errors = 0

startup_time instance-attribute

startup_time = time()

signing instance-attribute

signing = MAVLinkSigning()

native instance-attribute

native = None

test_buf instance-attribute

test_buf = bytearray()

mav20_unpacker instance-attribute

mav20_unpacker = Struct('<cBBBBBBHB')

mav10_unpacker instance-attribute

mav10_unpacker = Struct('<cBBBBB')

mav20_h3_unpacker instance-attribute

mav20_h3_unpacker = Struct('BBB')

mav_csum_unpacker instance-attribute

mav_csum_unpacker = Struct('<H')

mav_sign_unpacker instance-attribute

mav_sign_unpacker = Struct('<IH')

set_callback

set_callback(callback, *args, **kwargs)

set_send_callback

set_send_callback(callback, *args, **kwargs)

send

send(mavmsg, force_mavlink1=False)

send a MAVLink message

buf_len

buf_len()

bytes_needed

bytes_needed()

return number of bytes needed for next parsing stage

parse_char

parse_char(c)

input some data bytes, possibly returning a new message

parse_buffer

parse_buffer(s)

input some data bytes, possibly returning a list of new messages

check_signature

check_signature(msgbuf, src_system, src_component)

check signature on incoming message

decode

decode(msgbuf)

decode a buffer as a MAVLink message

system_time_encode staticmethod

system_time_encode(time_unix_usec, time_boot_ms)

The system time is the time of the master clock, typically the

system_time_send

system_time_send(time_unix_usec, time_boot_ms, force_mavlink1=False)

The system time is the time of the master clock, typically the

manual_control_encode staticmethod

manual_control_encode(target, x, y, z, r, buttons)

This message provides an API for manually controlling the vehicle

manual_control_send

manual_control_send(target, x, y, z, r, buttons, force_mavlink1=False)

This message provides an API for manually controlling the vehicle

manual_control2_encode staticmethod

manual_control2_encode(target, x, y, z, r, buttons)

This message provides an API for manually controlling the vehicle

manual_control2_send

manual_control2_send(target, x, y, z, r, buttons, force_mavlink1=False)

This message provides an API for manually controlling the vehicle

local_position_encode staticmethod

local_position_encode(yaw, vel_x, vel_y, vel_z, x, y, z)

Msg report flight data .

local_position_send

local_position_send(yaw, vel_x, vel_y, vel_z, x, y, z, force_mavlink1=False)

Msg report flight data .

optitrack_encode staticmethod

optitrack_encode(raw_data)

Optitrack raw data .

optitrack_send

optitrack_send(raw_data, force_mavlink1=False)

Optitrack raw data .

autopilot_version_encode staticmethod

autopilot_version_encode(autopilot_sw_version, autopilot_hw_version, product_id, autopilot_uid)

Msg report autopilot version and producd id .

autopilot_version_send

autopilot_version_send(autopilot_sw_version, autopilot_hw_version, product_id, autopilot_uid, force_mavlink1=False)

Msg report autopilot version and producd id .

position_control_setpoint_encode staticmethod

position_control_setpoint_encode(x, y, z, yaw, speed, yaw_rate)

Msg from vision control pilot .

position_control_setpoint_send

position_control_setpoint_send(x, y, z, yaw, speed, yaw_rate, force_mavlink1=False)

Msg from vision control pilot .

app_heartbeat_encode staticmethod

app_heartbeat_encode(user_mode)

Msg report pilot used mode .

app_heartbeat_send

app_heartbeat_send(user_mode, force_mavlink1=False)

Msg report pilot used mode .

report_flight_data_encode staticmethod

report_flight_data_encode(roll, pitch, yaw, accx, accy, accz, vel_x, vel_y, vel_z, x, y, z, distance, barrier, battery_volumn, baro_alt)

Msg report flight data .

report_flight_data_send

report_flight_data_send(roll, pitch, yaw, accx, accy, accz, vel_x, vel_y, vel_z, x, y, z, distance, barrier, battery_volumn, baro_alt, force_mavlink1=False)

Msg report flight data .

report_stats_encode staticmethod

report_stats_encode(utc, flight_time, lat, lon, alt, x, y, z, yaw, sensors_present, sensors_health, drone_id, firmware_version, system_version, dance_version, dance_name, dance_md5, product_id, aux_token, time_token, battery_volumn, formation_status, rgb_status, acc_clibration_status, mag_clibration_status, temperature, block_status, drone_status)

Msg report pilot status.

report_stats_send

report_stats_send(utc, flight_time, lat, lon, alt, x, y, z, yaw, sensors_present, sensors_health, drone_id, firmware_version, system_version, dance_version, dance_name, dance_md5, product_id, aux_token, time_token, battery_volumn, formation_status, rgb_status, acc_clibration_status, mag_clibration_status, temperature, block_status, drone_status, force_mavlink1=False)

Msg report pilot status.

formation_cmd_encode staticmethod

formation_cmd_encode(param1, param2, param3, param4, x, y, z, yaw, start_id, end_id, cmd, ack, command_type, token)

Send a formation cmd with parameters to the MAV.

formation_cmd_send

formation_cmd_send(param1, param2, param3, param4, x, y, z, yaw, start_id, end_id, token, cmd, ack, target_position, force_mavlink1=False)

Send a formation cmd with parameters to the MAV.

formation_cmd_ack_encode staticmethod

formation_cmd_ack_encode(msg_id, token, cmd, result, message_type)

Report status of a formation cmd.

formation_cmd_ack_send

formation_cmd_ack_send(msg_id, token, cmd, result, message_type, force_mavlink1=False)

Report status of a formation cmd.

console_encode staticmethod

console_encode(text)

Status text message.

console_send

console_send(text, force_mavlink1=False)

Status text message.

statustext_encode

statustext_encode(msg_id, severity, text)

Status text message.

statustext_send

statustext_send(msg_id, severity, text, force_mavlink1=False)

Status text message.

file_response_info_encode staticmethod

file_response_info_encode(token, target_info, plane_id)

the mavlink is file reponse info

file_response_info_send

file_response_info_send(token, target_info, plane_id, force_mavlink1=False)

the mavlink is file reponse info

wifi_sets_encode staticmethod

wifi_sets_encode(token, plane_id, wifi_type, ack, ssid, psk)

the mavlink is wifi settings

wifi_sets_send

wifi_sets_send(token, plane_id, wifi_type, ack, ssid, psk, force_mavlink1=False)

the mavlink is wifi settings

color_track_target_encode staticmethod

color_track_target_encode(fun_id, data_w, data_h, data, rect_x, rect_y, rect_w, rect_h)

color track target

color_track_target_send

color_track_target_send(fun_id, data_w, data_h, data, rect_x, rect_y, rect_w, rect_h, force_mavlink1=False)

color track target

color_track_target_ret_encode staticmethod

color_track_target_ret_encode(frame_id, rect_x, rect_y, rect_w, rect_h)

color track target ret

color_track_target_ret_send

color_track_target_ret_send(frame_id, rect_x, rect_y, rect_w, rect_h, force_mavlink1=False)

color track target ret

line_walking_encode staticmethod

line_walking_encode(fun_id, dist, tv, way_color, result)

line walking

line_walking_send

line_walking_send(fun_id, dist, tv, way_color, result, force_mavlink1=False)

line walking

file_heads_encode staticmethod

file_heads_encode(token, file_type, file_size, plane_id, info, array, version, md5, file_name)

the mavlink is file heads

file_heads_send

file_heads_send(token, file_type, file_size, plane_id, info, array, version, md5, file_name, force_mavlink1=False)

the mavlink is file heads

plane_ack_encode staticmethod

plane_ack_encode(token, plane_id, cmd, result, message_type)

the mavlink is plane ack command

plane_ack_send

plane_ack_send(token, plane_id, cmd, result, message_type, force_mavlink1=False)

the mavlink is plane ack command

plane_command_encode staticmethod

plane_command_encode(utc, token, data, plane_id, cmd, ack, message_type, reserve)

the mavlink is plane command

plane_command_send

plane_command_send(utc, token, data, plane_id, cmd, ack, message_type, reserve, force_mavlink1=False)

the mavlink is plane command

plane_ack_extend_encode staticmethod

plane_ack_extend_encode(token, plane_id, cmd, result, message_type, extend)

the mavlink is plane ack command extend

plane_ack_extend_send

plane_ack_extend_send(token, plane_id, cmd, result, message_type, extend, force_mavlink1=False)

the mavlink is plane ack command extend

plane_status_encode staticmethod

plane_status_encode(capacity, remaining, occupied, plane_id, rtp, dsp, qr, video, laser, pitch, line, wifi, extend)

the mavlink is plane status

plane_status_send

plane_status_send(capacity, remaining, occupied, plane_id, rtp, dsp, qr, video, laser, pitch, line, wifi, extend, force_mavlink1=False)

the mavlink is plane status

broadcast_plane_status_encode staticmethod

broadcast_plane_status_encode(sn, ip, plane_id, wifi_mode, bind_client, wifi_power)

broadcast mavlink plane status

broadcast_plane_status_send

broadcast_plane_status_send(sn, ip, plane_id, wifi_mode, bind_client, wifi_power, force_mavlink1=False)

broadcast mavlink plane status

qrrecognite_deal_encode staticmethod

qrrecognite_deal_encode(time_duration, search_radius, qr_size, run_rate, qr_id, x_com, y_com, z_com, yaw_com, mode, qr_background_grayscale, status)

qr recognite deal

qrrecognite_deal_send

qrrecognite_deal_send(time_duration, search_radius, qr_size, run_rate, qr_id, x_com, y_com, z_com, yaw_com, mode, qr_background_grayscale, status, force_mavlink1=False)

qr recognite deal

colorrecog_encode staticmethod

colorrecog_encode(mode, state, r, g, b)

qr recognite deal

colorrecog_send

colorrecog_send(mode, state, r, g, b, force_mavlink1=False)

qr recognite deal

camera_encode staticmethod

camera_encode(mode, camera_type, result, x, y, z, angle, time_duration)

recognite mark

camera_send

camera_send(mode, camera_type, result, x, y, z, angle, time_duration, force_mavlink1=False)

recognite mark

Slots

Event

wait_for_signal

wait_for_signal(slot_id, timeout=None)

create_signal

create_signal(signal_id, data)

reset_timeout

reset_timeout(slot_id, timeout)

Token

get_token

get_token()

TaskProcessor

user_task class-attribute instance-attribute

user_task = None

work

work()

get_return_value

get_return_value()

Plane_Linux_cmd

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Linux_cmd

work

work()

SFLamplight

Bases: TaskProcessor

one plane lamplight TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Lamplight

work

work()

SFTakeoffTP

Bases: TaskProcessor

one plane takeoff TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Takeoff

work

work()

SFTouchdownTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Touchdown

work

work()

SFForwardTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Forward

work

work()

SFBackTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Back

work

work()

SFLeftTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Left

work

work()

SFRightTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Right

work

work()

SFUpTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Up

work

work()

SFDownTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Down

work

work()

SFTurnLeftTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_TurnLeft

work

work()

SFTurnRightTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_TurnRight

work

work()

SFTurnLeft360TP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_TurnLeft360

work

work()

SFTurnRight360TP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_TurnRight360

work

work()

SFBounceTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Bounce

work

work()

SFStraightFlightTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_StraightFlight

work

work()

SFFlipForwardTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_FlipForward

work

work()

SFFlipBackTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_FlipBack

work

work()

SFFlipLeftTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_FlipLeft

work

work()

SFFlipRightTP

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_FlipRight

work

work()

SFCurvilinearFlight

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_CurvilinearFlight

work

work()

SFHoverFlight

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_HoverFlight

work

work()

SFBarrier_aircraft

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Barrier_aircraft

work

work()

SFLine_walking

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Line_walking

work

work()

SFAiIdentifies

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_AiIdentifies

work

work()

SFQr_code_tracking

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Qr_tracking

work

work()

SFQr_code_aligns

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Qr_align

work

work()

SF_ColorRecog

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_ColorRecog

work

work()

SF_unlock

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_unlock

work

work()

SF_lock

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_lock

work

work()

SFCircumvolant

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_RadiusAround

work

work()

SF_Plane_time

Bases: TaskProcessor

user_task class-attribute instance-attribute

user_task = S_Fly_Plane_time

work

work()

SF_Enable_LED

Bases: TaskProcessor

Enable LED task - formation cmd 0x0C (12)

user_task class-attribute instance-attribute

user_task = S_Fly_Enable_LED

work

work()

SF_Disable_LED

Bases: TaskProcessor

Disable LED task - formation cmd 0x0D (13)

user_task class-attribute instance-attribute

user_task = S_Fly_Disable_LED

work

work()

SF_Cancel_RGB

Bases: TaskProcessor

Cancel RGB animation task - formation cmd 0x1B (27)

user_task class-attribute instance-attribute

user_task = S_Fly_Cancel_RGB

work

work()

SF_Vertical_Circle

Bases: TaskProcessor

Vertical circle maneuver - formation cmd 0x27 (39)

Requires altitude >= 0.35m

user_task class-attribute instance-attribute

user_task = S_Fly_Vertical_Circle

work

work()

SF_Set_Avoidance

Bases: TaskProcessor

Set avoidance with direction - formation cmd 0x2A (42)

user_task class-attribute instance-attribute

user_task = S_Fly_Set_Avoidance

work

work()

SF_Get_Product_ID

Bases: TaskProcessor

Get product ID/autopilot version - formation cmd 0x2C (44)

user_task class-attribute instance-attribute

user_task = S_Fly_Get_Product_ID

work

work()

SF_Set_Velocity

Bases: TaskProcessor

Set velocity level - formation cmd 0x30 (48)

Level is velocity in cm/s (0-300): 100=1.0m/s, 200=2.0m/s, 300=3.0m/s

user_task class-attribute instance-attribute

user_task = S_Fly_Set_Velocity

work

work()

SF_Set_Yawrate

Bases: TaskProcessor

Set yaw rate level - formation cmd 0x31 (49)

user_task class-attribute instance-attribute

user_task = S_Fly_Set_Yawrate

work

work()

SF_Set_RGB_Brightness

Bases: TaskProcessor

Set RGB brightness - formation cmd 0x32 (50)

user_task class-attribute instance-attribute

user_task = S_Fly_Set_RGB_Brightness

work

work()

SF_Enable_Battery_FS

Bases: TaskProcessor

Enable battery failsafe - formation cmd 0x35 (53)

user_task class-attribute instance-attribute

user_task = S_Fly_Enable_Battery_FS

work

work()

SF_Disable_Battery_FS

Bases: TaskProcessor

Disable battery failsafe - formation cmd 0x36 (54)

user_task class-attribute instance-attribute

user_task = S_Fly_Disable_Battery_FS

work

work()

SF_Set_Parameter

Bases: TaskProcessor

Set multiple parameters - formation cmd 0x37 (55)

user_task class-attribute instance-attribute

user_task = S_Fly_Set_Parameter

work

work()

SF_Operate

Bases: TaskProcessor

Set formation operate status - formation cmd 0x3B (59)

user_task class-attribute instance-attribute

user_task = S_Fly_Operate

work

work()

SF_Set_Land_Speed

Bases: TaskProcessor

Set land speed - formation cmd 0x3C (60)

fast=False: slow landing, fast=True: fast landing

user_task class-attribute instance-attribute

user_task = S_Fly_Set_Land_Speed

work

work()

SF_Set_Video_Resolution

Bases: TaskProcessor

Set video resolution - plane cmd 0x16 (22)

resolution: 0=HIGH (1080p), 1=MEDIUM (720p), 2=LOW (program/AI mode)

Lower resolution = less encoder CPU = potentially better QR rate during RTP. Firmware handler: HandleMsgSelectRecordResolution @ avmanager:0x0001df7c

user_task class-attribute instance-attribute

user_task = S_Fly_Set_Video_Resolution

work

work()

SF_Set_WiFi_Mode

Bases: TaskProcessor

Set WiFi mode - plane cmd 0x04 (4)

WiFi mode values:

  • 0: Switch to 2.4GHz band
  • 1: Switch to 5GHz band
  • 2: Switch to AP mode
  • 3: Low WiFi power
  • 4: High WiFi power
  • 5: WiFi broadcast ON
  • 6: WiFi broadcast OFF
  • 7: Manual channel mode (requires channel_id)
  • 8: Auto channel mode
  • 9: Get channel strength

Firmware handler: HandleMsgWifiMode @ avmanager

user_task class-attribute instance-attribute

user_task = S_Fly_Set_WiFi_Mode

work

work()

TaskProcessorFactory

get_task_processor

get_task_processor(task_controller, utask, data)

to_string

to_string(s)

desperate attempt to convert a string regardless of what garbage we get

thread1

thread1()

thread2

thread2()

stop_thread

stop_thread(thread)

check_plane_status

check_plane_status(task_controller, token, timeout_seconds=4)

MAVLink protocol implementation (auto-generated by mavgen.py)

crc16tab module-attribute

crc16tab = [0, 4129, 8258, 12387, 16516, 20645, 24774, 28903, 33032, 37161, 41290, 45419, 49548, 53677, 57806, 61935, 4657, 528, 12915, 8786, 21173, 17044, 29431, 25302, 37689, 33560, 45947, 41818, 54205, 50076, 62463, 58334, 9314, 13379, 1056, 5121, 25830, 29895, 17572, 21637, 42346, 46411, 34088, 38153, 58862, 62927, 50604, 54669, 13907, 9842, 5649, 1584, 30423, 26358, 22165, 18100, 46939, 42874, 38681, 34616, 63455, 59390, 55197, 51132, 18628, 22757, 26758, 30887, 2112, 6241, 10242, 14371, 51660, 55789, 59790, 63919, 35144, 39273, 43274, 47403, 23285, 19156, 31415, 27286, 6769, 2640, 14899, 10770, 56317, 52188, 64447, 60318, 39801, 35672, 47931, 43802, 27814, 31879, 19684, 23749, 11298, 15363, 3168, 7233, 60846, 64911, 52716, 56781, 44330, 48395, 36200, 40265, 32407, 28342, 24277, 20212, 15891, 11826, 7761, 3696, 65439, 61374, 57309, 53244, 48923, 44858, 40793, 36728, 37256, 33193, 45514, 41451, 53516, 49453, 61774, 57711, 4224, 161, 12482, 8419, 20484, 16421, 28742, 24679, 33721, 37784, 41979, 46042, 49981, 54044, 58239, 62302, 689, 4752, 8947, 13010, 16949, 21012, 25207, 29270, 46570, 42443, 38312, 34185, 62830, 58703, 54572, 50445, 13538, 9411, 5280, 1153, 29798, 25671, 21540, 17413, 42971, 47098, 34713, 38840, 59231, 63358, 50973, 55100, 9939, 14066, 1681, 5808, 26199, 30326, 17941, 22068, 55628, 51565, 63758, 59695, 39368, 35305, 47498, 43435, 22596, 18533, 30726, 26663, 6336, 2273, 14466, 10403, 52093, 56156, 60223, 64286, 35833, 39896, 43963, 48026, 19061, 23124, 27191, 31254, 2801, 6864, 10931, 14994, 64814, 60687, 56684, 52557, 48554, 44427, 40424, 36297, 31782, 27655, 23652, 19525, 15522, 11395, 7392, 3265, 61215, 65342, 53085, 57212, 44955, 49082, 36825, 40952, 28183, 32310, 20053, 24180, 11923, 16050, 3793, 7920]

WIRE_PROTOCOL_VERSION module-attribute

WIRE_PROTOCOL_VERSION = '1.0'

DIALECT module-attribute

DIALECT = 'python'

PROTOCOL_MARKER_V1 module-attribute

PROTOCOL_MARKER_V1 = 254

PROTOCOL_MARKER_V2 module-attribute

PROTOCOL_MARKER_V2 = 253

HEADER_LEN_V1 module-attribute

HEADER_LEN_V1 = 6

HEADER_LEN_V2 module-attribute

HEADER_LEN_V2 = 10
MAVLINK_SIGNATURE_BLOCK_LEN = 13
MAVLINK_IFLAG_SIGNED = 1

native_force module-attribute

native_force = 'MAVNATIVE_FORCE' in environ

native_testing module-attribute

native_testing = 'MAVNATIVE_TESTING' in environ
MAVLINK_IGNORE_CRC = get('MAV_IGNORE_CRC', 1)
MAVLINK_TYPE_CHAR = 0
MAVLINK_TYPE_UINT8_T = 1
MAVLINK_TYPE_INT8_T = 2
MAVLINK_TYPE_UINT16_T = 3
MAVLINK_TYPE_INT16_T = 4
MAVLINK_TYPE_UINT32_T = 5
MAVLINK_TYPE_INT32_T = 6
MAVLINK_TYPE_UINT64_T = 7
MAVLINK_TYPE_INT64_T = 8
MAVLINK_TYPE_FLOAT = 9
MAVLINK_TYPE_DOUBLE = 10

enums module-attribute

enums = {'MAV_SYS_STATUS_SENSOR': {}}

MAV_SYS_STATUS_SENSOR_3D_GYRO module-attribute

MAV_SYS_STATUS_SENSOR_3D_GYRO = 1

MAV_SYS_STATUS_SENSOR_3D_ACCEL module-attribute

MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2

MAV_SYS_STATUS_SENSOR_3D_MAG module-attribute

MAV_SYS_STATUS_SENSOR_3D_MAG = 4

MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE module-attribute

MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8

MAV_SYS_STATUS_SENSOR_GPS module-attribute

MAV_SYS_STATUS_SENSOR_GPS = 16

MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW module-attribute

MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 32

MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL module-attribute

MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 64

MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL module-attribute

MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 128

MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS module-attribute

MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 256

MAV_SYS_STATUS_SENSOR_RC_RECEIVER module-attribute

MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 512

MAV_SYS_STATUS_AHRS module-attribute

MAV_SYS_STATUS_AHRS = 1024

MAV_SYS_STATUS_TERRAIN module-attribute

MAV_SYS_STATUS_TERRAIN = 2048

MAV_SYS_STATUS_BATTERY module-attribute

MAV_SYS_STATUS_BATTERY = 4096

MAV_SYS_STATUS_SENSOR_3D_GYRO_CALIBRATED module-attribute

MAV_SYS_STATUS_SENSOR_3D_GYRO_CALIBRATED = 8192

MAV_SYS_STATUS_SENSOR_3D_ACCEL_CALIBRATED module-attribute

MAV_SYS_STATUS_SENSOR_3D_ACCEL_CALIBRATED = 16384

MAV_SYS_STATUS_SENSOR_3D_MAG_CALIBRATED module-attribute

MAV_SYS_STATUS_SENSOR_3D_MAG_CALIBRATED = 32768

MAV_SYS_STATUS_APP_CONTROL module-attribute

MAV_SYS_STATUS_APP_CONTROL = 65536

MAV_SYS_STATUS_SENSOR_ENUM_END module-attribute

MAV_SYS_STATUS_SENSOR_ENUM_END = 65537

MAV_RGB_STATUS_ON module-attribute

MAV_RGB_STATUS_ON = 1

MAV_RGB_STATUS_OFF module-attribute

MAV_RGB_STATUS_OFF = 2

MAV_RGB_STATUS_RGB module-attribute

MAV_RGB_STATUS_RGB = 4

MAV_RGB_STATUS_FLOW module-attribute

MAV_RGB_STATUS_FLOW = 8

MAV_RGB_STATUS_COLOR module-attribute

MAV_RGB_STATUS_COLOR = 16
MAV_RGB_STATUS_FAST_BLINK = 32

MAV_RGB_STATUS_BREATHING module-attribute

MAV_RGB_STATUS_BREATHING = 64

MAV_RGB_STATUS_ENUM_END module-attribute

MAV_RGB_STATUS_ENUM_END = 65

DIRECTION_FORWARD module-attribute

DIRECTION_FORWARD = 0

DIRECTION_BACK module-attribute

DIRECTION_BACK = 1

DIRECTION_LEFT module-attribute

DIRECTION_LEFT = 2

DIRECTION_RIGHT module-attribute

DIRECTION_RIGHT = 3

DIRECTION_DOWN module-attribute

DIRECTION_DOWN = 4

DIRECTION_UP module-attribute

DIRECTION_UP = 5

DIRECTION_OF_MOTION_ENUM_END module-attribute

DIRECTION_OF_MOTION_ENUM_END = 6

FLIGHT_ELLIPTICAL_TRACE module-attribute

FLIGHT_ELLIPTICAL_TRACE = 0

FLIGHT_CICULAR_TRACE module-attribute

FLIGHT_CICULAR_TRACE = 1

FLIGHT_SPHE_SURFACE module-attribute

FLIGHT_SPHE_SURFACE = 2

CURVE_FLIGHT_MODE_ENUM_END module-attribute

CURVE_FLIGHT_MODE_ENUM_END = 3

MAV_SEVERITY_EMERGENCY module-attribute

MAV_SEVERITY_EMERGENCY = 0

MAV_SEVERITY_ALERT module-attribute

MAV_SEVERITY_ALERT = 1

MAV_SEVERITY_CRITICAL module-attribute

MAV_SEVERITY_CRITICAL = 2

MAV_SEVERITY_ERROR module-attribute

MAV_SEVERITY_ERROR = 3

MAV_SEVERITY_WARNING module-attribute

MAV_SEVERITY_WARNING = 4

MAV_SEVERITY_NOTICE module-attribute

MAV_SEVERITY_NOTICE = 5

MAV_SEVERITY_INFO module-attribute

MAV_SEVERITY_INFO = 6

MAV_SEVERITY_DEBUG module-attribute

MAV_SEVERITY_DEBUG = 7

MAV_SEVERITY_ENUM_END module-attribute

MAV_SEVERITY_ENUM_END = 8

MAV_FORMATION_CMD_TAKEOFF module-attribute

MAV_FORMATION_CMD_TAKEOFF = 1

MAV_FORMATION_CMD_LAND module-attribute

MAV_FORMATION_CMD_LAND = 2

MAV_FORMATION_CMD_PREPARE module-attribute

MAV_FORMATION_CMD_PREPARE = 3

MAV_FORMATION_CMD_ARM module-attribute

MAV_FORMATION_CMD_ARM = 4

MAV_FORMATION_CMD_DISARM module-attribute

MAV_FORMATION_CMD_DISARM = 5

MAV_FORMATION_CMD_TIME_SYNC module-attribute

MAV_FORMATION_CMD_TIME_SYNC = 6

MAV_FORMATION_CMD_AUX_SETUP module-attribute

MAV_FORMATION_CMD_AUX_SETUP = 7

MAV_FORMATION_CMD_ENTER_CALMAG module-attribute

MAV_FORMATION_CMD_ENTER_CALMAG = 8

MAV_FORMATION_CMD_EXIT_CALMAG module-attribute

MAV_FORMATION_CMD_EXIT_CALMAG = 9

MAV_FORMATION_CMD_SHOWON_WARNING_BATT module-attribute

MAV_FORMATION_CMD_SHOWON_WARNING_BATT = 10

MAV_FORMATION_CMD_SHOWOFF_WARNING_BATT module-attribute

MAV_FORMATION_CMD_SHOWOFF_WARNING_BATT = 11

MAV_FORMATION_CMD_ENABLE_LED module-attribute

MAV_FORMATION_CMD_ENABLE_LED = 12

MAV_FORMATION_CMD_DISABLE_LED module-attribute

MAV_FORMATION_CMD_DISABLE_LED = 13

MAV_FORMATION_CMD_ERASE_DANCE module-attribute

MAV_FORMATION_CMD_ERASE_DANCE = 14

MAV_FORMATION_CMD_REBOOT module-attribute

MAV_FORMATION_CMD_REBOOT = 15

MAV_FORMATION_CMD_ENABLE_RGB module-attribute

MAV_FORMATION_CMD_ENABLE_RGB = 16

MAV_FORMATION_CMD_DISABLE_RGB module-attribute

MAV_FORMATION_CMD_DISABLE_RGB = 17

MAV_FORMATION_CMD_ENABLE_FLOW module-attribute

MAV_FORMATION_CMD_ENABLE_FLOW = 18

MAV_FORMATION_CMD_DISABLE_FLOW module-attribute

MAV_FORMATION_CMD_DISABLE_FLOW = 19

MAV_FORMATION_CMD_CHANGE_ID module-attribute

MAV_FORMATION_CMD_CHANGE_ID = 20

MAV_FORMATION_CMD_ENTER_CALACC module-attribute

MAV_FORMATION_CMD_ENTER_CALACC = 21

MAV_FORMATION_CMD_EXIT_CALACC module-attribute

MAV_FORMATION_CMD_EXIT_CALACC = 22

MAV_FORMATION_CMD_ONE_KEY_TAKEOFF module-attribute

MAV_FORMATION_CMD_ONE_KEY_TAKEOFF = 23

MAV_FORMATION_CMD_EXIT_TAKEOFF module-attribute

MAV_FORMATION_CMD_EXIT_TAKEOFF = 24

MAV_FORMATION_CMD_CHANGE_DANCE module-attribute

MAV_FORMATION_CMD_CHANGE_DANCE = 25

MAV_FORMATION_CMD_SET_RGB module-attribute

MAV_FORMATION_CMD_SET_RGB = 26

MAV_FORMATION_CMD_CANSEL_RGB module-attribute

MAV_FORMATION_CMD_CANSEL_RGB = 27

MAV_FORMATION_CMD_MISSION module-attribute

MAV_FORMATION_CMD_MISSION = 28

MAV_FORMATION_CMD_UP_DOWN module-attribute

MAV_FORMATION_CMD_UP_DOWN = 29

MAV_FORMATION_CMD_FORWARD_BACK module-attribute

MAV_FORMATION_CMD_FORWARD_BACK = 30

MAV_FORMATION_CMD_LEFT_RIGHT module-attribute

MAV_FORMATION_CMD_LEFT_RIGHT = 31

MAV_FORMATION_CMD_YAW_ANGLE module-attribute

MAV_FORMATION_CMD_YAW_ANGLE = 32

MAV_FORMATION_CMD_BOUNCE module-attribute

MAV_FORMATION_CMD_BOUNCE = 33

MAV_FORMATION_CMD_CIRCLE module-attribute

MAV_FORMATION_CMD_CIRCLE = 34

MAV_FORMATION_CMD_STRAIGHT_FLIGHT module-attribute

MAV_FORMATION_CMD_STRAIGHT_FLIGHT = 35

MAV_FORMATION_CMD_YAW_TURN module-attribute

MAV_FORMATION_CMD_YAW_TURN = 36

MAV_FORMATION_CMD_FLIP module-attribute

MAV_FORMATION_CMD_FLIP = 37

MAV_FORMATION_CMD_CURVE_FLIGHT module-attribute

MAV_FORMATION_CMD_CURVE_FLIGHT = 38

MAV_FORMATION_CMD_VERTICAL_CIRCLE module-attribute

MAV_FORMATION_CMD_VERTICAL_CIRCLE = 39

MAV_FORMATION_CMD_ENABLE_AVOIDANCE module-attribute

MAV_FORMATION_CMD_ENABLE_AVOIDANCE = 40

MAV_FORMATION_CMD_DISABLE_AVOIDANCE module-attribute

MAV_FORMATION_CMD_DISABLE_AVOIDANCE = 41

MAV_FORMATION_CMD_SET_AVOIDANCE module-attribute

MAV_FORMATION_CMD_SET_AVOIDANCE = 42

MAV_FORMATION_CMD_GET_FLIGHT_DATA module-attribute

MAV_FORMATION_CMD_GET_FLIGHT_DATA = 43

MAV_FORMATION_CMD_GET_PRODUCT_ID module-attribute

MAV_FORMATION_CMD_GET_PRODUCT_ID = 44

MAV_FORMATION_CMD_CAL_GYRO module-attribute

MAV_FORMATION_CMD_CAL_GYRO = 45

MAV_FORMATION_CMD_HOLD module-attribute

MAV_FORMATION_CMD_HOLD = 46

MAV_FORMATION_CMD_GET_BARRIER_INFO module-attribute

MAV_FORMATION_CMD_GET_BARRIER_INFO = 47

MAV_FORMATION_CMD_SET_VELOCITY module-attribute

MAV_FORMATION_CMD_SET_VELOCITY = 48

MAV_FORMATION_CMD_SET_YAWRATE module-attribute

MAV_FORMATION_CMD_SET_YAWRATE = 49

MAV_FORMATION_CMD_SET_RGB_BRIGHTNESS module-attribute

MAV_FORMATION_CMD_SET_RGB_BRIGHTNESS = 50

MAV_FORMATION_CMD_ENTER_FOLLOW_LINE module-attribute

MAV_FORMATION_CMD_ENTER_FOLLOW_LINE = 51

MAV_FORMATION_CMD_EXIT_FOLLOW_LINE module-attribute

MAV_FORMATION_CMD_EXIT_FOLLOW_LINE = 52

MAV_FORMATION_CMD_ENABLE_BATTERY_FS module-attribute

MAV_FORMATION_CMD_ENABLE_BATTERY_FS = 53

MAV_FORMATION_CMD_DISABLE_BATTERY_FS module-attribute

MAV_FORMATION_CMD_DISABLE_BATTERY_FS = 54

MAV_FORMATION_CMD_SET_PARAMETER module-attribute

MAV_FORMATION_CMD_SET_PARAMETER = 55

MAV_FORMATION_CMD_CAL_INFRARED module-attribute

MAV_FORMATION_CMD_CAL_INFRARED = 56

MAV_FORMATION_CMD_CLEAR_FLIGHT_TIME module-attribute

MAV_FORMATION_CMD_CLEAR_FLIGHT_TIME = 57

MAV_FORMATION_CMD_CLEAR_LOG module-attribute

MAV_FORMATION_CMD_CLEAR_LOG = 58

MAV_FORMATION_CMD_OPERATE module-attribute

MAV_FORMATION_CMD_OPERATE = 59

MAV_FORMATION_CMD_ENUM_END module-attribute

MAV_FORMATION_CMD_ENUM_END = 60
MAVLINK_MSG_ID_BAD_DATA = -1
MAVLINK_MSG_ID_UNKNOWN = -2
MAVLINK_MSG_ID_SYSTEM_TIME = 2
MAVLINK_MSG_ID_MANUAL_CONTROL = 69
MAVLINK_MSG_ID_MANUAL_CONTROL2 = 71
MAVLINK_MSG_ID_LOCAL_POSITION = 72
MAVLINK_MSG_ID_OPTITRACK = 101
MAVLINK_MSG_ID_AUTOPILOT_VERSION = 148
MAVLINK_MSG_ID_POSITION_CONTROL_SETPOINT = 170
MAVLINK_MSG_ID_APP_HEARTBEAT = 204
MAVLINK_MSG_ID_REPORT_FLIGHT_DATA = 206
MAVLINK_MSG_ID_REPORT_STATS = 207
MAVLINK_MSG_ID_FORMATION_CMD = 208
MAVLINK_MSG_ID_FORMATION_CMD_ACK = 209
MAVLINK_MSG_ID_CONSOLE = 252
MAVLINK_MSG_ID_STATUSTEXT = 253
MAVLINK_MSG_ID_FILE_RESPONSE_INFO = 213
MAVLINK_MSG_ID_WIFI_SETS = 214
MAVLINK_MSG_ID_COLOR_TRACK_TARGET = 215
MAVLINK_MSG_ID_COLOR_TRACK_TARGET_RET = 216
MAVLINK_MSG_ID_LINE_WALKING = 219
MAVLINK_MSG_ID_FILE_HEADS = 227
MAVLINK_MSG_ID_PLANE_ACK = 228
MAVLINK_MSG_ID_PLANE_COMMAND = 229
MAVLINK_MSG_ID_PLANE_ACK_EXTEND = 230
MAVLINK_MSG_ID_PLANE_STATUS = 231
MAVLINK_MSG_ID_BROADCAST_PLANE_STATUS = 232
MAVLINK_MSG_ID_QRRECOGNITE_DEAL = 234
MAVLINK_MSG_ID_COLORRECOG = 235
MAVLINK_MSG_ID_CAMERA = 236
MAVLINK_MSG_ID_LONGITUDE_LATITUDE = 237
mavlink_map = {MAVLINK_MSG_ID_SYSTEM_TIME: MAVLink_system_time_message, MAVLINK_MSG_ID_MANUAL_CONTROL: MAVLink_manual_control_message, MAVLINK_MSG_ID_MANUAL_CONTROL2: MAVLink_manual_control2_message, MAVLINK_MSG_ID_LOCAL_POSITION: MAVLink_local_position_message, MAVLINK_MSG_ID_OPTITRACK: MAVLink_optitrack_message, MAVLINK_MSG_ID_AUTOPILOT_VERSION: MAVLink_autopilot_version_message, MAVLINK_MSG_ID_POSITION_CONTROL_SETPOINT: MAVLink_position_control_setpoint_message, MAVLINK_MSG_ID_APP_HEARTBEAT: MAVLink_app_heartbeat_message, MAVLINK_MSG_ID_REPORT_FLIGHT_DATA: MAVLink_report_flight_data_message, MAVLINK_MSG_ID_REPORT_STATS: MAVLink_report_stats_message, MAVLINK_MSG_ID_FORMATION_CMD: MAVLink_formation_cmd_message, MAVLINK_MSG_ID_FORMATION_CMD_ACK: MAVLink_formation_cmd_ack_message, MAVLINK_MSG_ID_CONSOLE: MAVLink_console_message, MAVLINK_MSG_ID_STATUSTEXT: MAVLink_statustext_message, MAVLINK_MSG_ID_FILE_RESPONSE_INFO: MAVLink_file_response_info_message, MAVLINK_MSG_ID_WIFI_SETS: MAVLink_wifi_sets_message, MAVLINK_MSG_ID_COLOR_TRACK_TARGET: MAVLink_color_track_target_message, MAVLINK_MSG_ID_COLOR_TRACK_TARGET_RET: MAVLink_color_track_target_ret_message, MAVLINK_MSG_ID_LINE_WALKING: MAVLink_line_walking_message, MAVLINK_MSG_ID_FILE_HEADS: MAVLink_file_heads_message, MAVLINK_MSG_ID_PLANE_ACK: MAVLink_plane_ack_message, MAVLINK_MSG_ID_PLANE_COMMAND: MAVLink_plane_command_message, MAVLINK_MSG_ID_PLANE_ACK_EXTEND: MAVLink_plane_ack_extend_message, MAVLINK_MSG_ID_PLANE_STATUS: MAVLink_plane_status_message, MAVLINK_MSG_ID_BROADCAST_PLANE_STATUS: MAVLink_broadcast_plane_status_message, MAVLINK_MSG_ID_QRRECOGNITE_DEAL: MAVLink_qrrecognite_deal_message, MAVLINK_MSG_ID_COLORRECOG: MAVLink_colorrecog_message, MAVLINK_MSG_ID_CAMERA: MAVLink_camera_message}

Bases: object

MAVLink message header

mlen = mlen
seq = seq
srcSystem = src_system
srcComponent = src_component
msgId = msg_id
incompat_flags = incompat_flags
compat_flags = compat_flags
pack(force_mavlink1=False)

Bases: object

base MAVLink message class

format_attr(field)

override field getter

get_msgbuf()
get_header()
get_payload()
get_crc()
get_fieldnames()
get_type()
get_msg_id()
get_src_system()
get_src_component()
get_seq()
get_signed()
get_link_id()
to_dict()
to_json()
sign_packet(mav)
pack(mav, crc_extra, payload, force_mavlink1=False)

EnumEntry

Bases: object

name instance-attribute

name = name

description instance-attribute

description = description

param instance-attribute

param = {}

Bases: MAVLink_message

The system time is the time of the master clock, typically the computer clock of the main onboard computer.

name = 'SYSTEM_TIME'
fieldnames = ['time_unix_usec', 'time_boot_ms']
ordered_fieldnames = ['time_unix_usec', 'time_boot_ms']
fieldtypes = ['uint64_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'time_unix_usec': 'us', 'time_boot_ms': 'ms'}
format = '<QI'
native_format = bytearray('<QI', 'ascii')
orders = [0, 1]
lengths = [1, 1]
array_lengths = [0, 0]
crc_extra = 137
unpacker = Struct('<QI')
instance_field = None
instance_offset = -1
time_unix_usec = time_unix_usec
time_boot_ms = time_boot_ms
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

This message provides an API for manually controlling the

buttons are also transmit as boolean values of their

name = 'MANUAL_CONTROL'
fieldnames = ['target', 'x', 'y', 'z', 'r', 'buttons']
ordered_fieldnames = ['x', 'y', 'z', 'r', 'buttons', 'target']
fieldtypes = ['uint8_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<hhhhHB'
native_format = bytearray('<hhhhHB', 'ascii')
orders = [5, 0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0]
crc_extra = 243
unpacker = Struct('<hhhhHB')
instance_field = None
instance_offset = -1
target = target
x = x
y = y
z = z
r = r
buttons = buttons
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

This message provides an API for manually controlling the

buttons are also transmit as boolean values of their

name = 'MANUAL_CONTROL2'
fieldnames = ['target', 'x', 'y', 'z', 'r', 'buttons']
ordered_fieldnames = ['x', 'y', 'z', 'r', 'buttons', 'target']
fieldtypes = ['uint8_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<hhhhHB'
native_format = bytearray('<hhhhHB', 'ascii')
orders = [5, 0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0]
crc_extra = 131
unpacker = Struct('<hhhhHB')
instance_field = None
instance_offset = -1
target = target
x = x
y = y
z = z
r = r
buttons = buttons
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report flight data .

name = 'LOCAL_POSITION'
fieldnames = ['yaw', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z']
ordered_fieldnames = ['yaw', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z']
fieldtypes = ['int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'yaw': '0.01 degree', 'vel_x': '0.01m/s', 'vel_y': '0.01m/s', 'vel_z': '0.01m/s', 'x': '0.01m', 'y': '0.01m', 'z': '0.01m'}
format = '<hhhhhhh'
native_format = bytearray('<hhhhhhh', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6]
lengths = [1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0]
crc_extra = 193
unpacker = Struct('<hhhhhhh')
instance_field = None
instance_offset = -1
yaw = yaw
vel_x = vel_x
vel_y = vel_y
vel_z = vel_z
x = x
y = y
z = z
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Optitrack raw data .

name = 'OPTITRACK'
fieldnames = ['raw_data']
ordered_fieldnames = ['raw_data']
fieldtypes = ['uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<189B'
native_format = bytearray('<B', 'ascii')
orders = [0]
lengths = [189]
array_lengths = [189]
crc_extra = 15
unpacker = Struct('<189B')
instance_field = None
instance_offset = -1
raw_data = raw_data
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report autopilot version and producd id .

name = 'AUTOPILOT_VERSION'
fieldnames = ['autopilot_sw_version', 'autopilot_hw_version', 'product_id', 'autopilot_uid']
ordered_fieldnames = ['autopilot_sw_version', 'autopilot_hw_version', 'product_id', 'autopilot_uid']
fieldtypes = ['uint32_t', 'uint32_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<II20B12B'
native_format = bytearray('<IIBB', 'ascii')
orders = [0, 1, 2, 3]
lengths = [1, 1, 20, 12]
array_lengths = [0, 0, 20, 12]
crc_extra = 184
unpacker = Struct('<II20B12B')
instance_field = None
instance_offset = -1
autopilot_sw_version = autopilot_sw_version
autopilot_hw_version = autopilot_hw_version
product_id = product_id
autopilot_uid = autopilot_uid
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg from vision control pilot .

name = 'POSITION_CONTROL_SETPOINT'
fieldnames = ['x', 'y', 'z', 'yaw', 'speed', 'yaw_rate']
ordered_fieldnames = ['x', 'y', 'z', 'yaw', 'speed', 'yaw_rate']
fieldtypes = ['float', 'float', 'float', 'float', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<ffffBB'
native_format = bytearray('<ffffBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0]
crc_extra = 107
unpacker = Struct('<ffffBB')
instance_field = None
instance_offset = -1
x = x
y = y
z = z
yaw = yaw
speed = speed
yaw_rate = yaw_rate
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report pilot used mode .

name = 'APP_HEARTBEAT'
fieldnames = ['user_mode']
ordered_fieldnames = ['user_mode']
fieldtypes = ['uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<B'
native_format = bytearray('<B', 'ascii')
orders = [0]
lengths = [1]
array_lengths = [0]
crc_extra = 227
unpacker = Struct('<B')
instance_field = None
instance_offset = -1
user_mode = user_mode
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report flight data .

name = 'REPORT_FLIGHT_DATA'
fieldnames = ['roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn', 'baro_alt']
ordered_fieldnames = ['baro_alt', 'roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn']
fieldtypes = ['int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint8_t', 'uint8_t', 'float']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'roll': '0.01 degree', 'pitch': '0.01 degree', 'yaw': '0.01 degree', 'accx': '0.01m/s2', 'accy': '0.01m/s2', 'accz': '0.01m/s2', 'vel_x': '0.01m/s', 'vel_y': '0.01m/s', 'vel_z': '0.01m/s', 'x': '0.01m', 'y': '0.01m', 'z': '0.01m', 'distance': '0.01m', 'baro_alt': '1m'}
format = '<fhhhhhhhhhhhhhBB'
native_format = bytearray('<fhhhhhhhhhhhhhBB', 'ascii')
orders = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 72
unpacker = Struct('<fhhhhhhhhhhhhhBB')
instance_field = None
instance_offset = -1
roll = roll
pitch = pitch
yaw = yaw
accx = accx
accy = accy
accz = accz
vel_x = vel_x
vel_y = vel_y
vel_z = vel_z
x = x
y = y
z = z
distance = distance
barrier = barrier
battery_volumn = battery_volumn
baro_alt = baro_alt
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Msg report pilot status.

name = 'REPORT_STATS'
fieldnames = ['utc', 'flight_time', 'lat', 'lon', 'alt', 'x', 'y', 'z', 'yaw', 'sensors_present', 'sensors_health', 'drone_id', 'firmware_version', 'system_version', 'dance_version', 'dance_name', 'dance_md5', 'product_id', 'aux_token', 'time_token', 'battery_volumn', 'formation_status', 'rgb_status', 'acc_clibration_status', 'mag_clibration_status', 'temperature', 'block_status', 'drone_status']
ordered_fieldnames = ['utc', 'flight_time', 'lat', 'lon', 'alt', 'x', 'y', 'z', 'yaw', 'sensors_present', 'sensors_health', 'drone_id', 'firmware_version', 'system_version', 'dance_version', 'dance_name', 'dance_md5', 'product_id', 'aux_token', 'time_token', 'battery_volumn', 'formation_status', 'rgb_status', 'acc_clibration_status', 'mag_clibration_status', 'temperature', 'block_status', 'drone_status']
fieldtypes = ['uint64_t', 'uint64_t', 'int32_t', 'int32_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'int8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<QQiihhhhHHHHHHH8B16B16BBBBBBBBbBB'
native_format = bytearray('<QQiihhhhHHHHHHHBBBBBBBBBBbBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 165
unpacker = Struct('<QQiihhhhHHHHHHH8B16B16BBBBBBBBbBB')
instance_field = None
instance_offset = -1
utc = utc
flight_time = flight_time
lat = lat
lon = lon
alt = alt
x = x
y = y
z = z
yaw = yaw
sensors_present = sensors_present
sensors_health = sensors_health
drone_id = drone_id
firmware_version = firmware_version
system_version = system_version
dance_version = dance_version
dance_name = dance_name
dance_md5 = dance_md5
product_id = product_id
aux_token = aux_token
time_token = time_token
battery_volumn = battery_volumn
formation_status = formation_status
rgb_status = rgb_status
acc_clibration_status = acc_clibration_status
mag_clibration_status = mag_clibration_status
temperature = temperature
block_status = block_status
drone_status = drone_status
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Send a formation cmd with parameters to the MAV.

name = 'FORMATION_CMD'
fieldnames = ['param1', 'param2', 'param3', 'param4', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
ordered_fieldnames = ['param3', 'param4', 'param1', 'param2', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
fieldtypes = ['int16_t', 'int16_t', 'int32_t', 'int32_t', 'int16_t', 'int16_t', 'int16_t', 'int16_t', 'uint16_t', 'uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {'x': '0.01m', 'y': '0.01m', 'z': '0.01m', 'yaw': '0.01 degree'}
format = '<iihhhhhhHHHBBB'
native_format = bytearray('<iihhhhhhHHHBBB', 'ascii')
orders = [2, 3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 118
unpacker = Struct('<iihhhhhhHHHBBB')
instance_field = None
instance_offset = -1
param1 = param1
param2 = param2
param3 = param3
param4 = param4
x = x
y = y
z = z
yaw = yaw
start_id = start_id
end_id = end_id
token = token
cmd = cmd
ack = ack
type = message_type
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Report status of a formation cmd.

name = 'FORMATION_CMD_ACK'
fieldnames = ['id', 'token', 'cmd', 'result', 'type']
ordered_fieldnames = ['id', 'token', 'cmd', 'result', 'type']
fieldtypes = ['uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<HHBBB'
native_format = bytearray('<HHBBB', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 158
unpacker = Struct('<HHBBB')
instance_field = None
instance_offset = -1
id = msg_id
token = token
cmd = cmd
result = result
type = message_type
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Status text message.

name = 'CONSOLE'
fieldnames = ['text']
ordered_fieldnames = ['text']
fieldtypes = ['char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<50s'
native_format = bytearray('<c', 'ascii')
orders = [0]
lengths = [1]
array_lengths = [50]
crc_extra = 109
unpacker = Struct('<50s')
instance_field = None
instance_offset = -1
text = text
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

Status text message.

name = 'STATUSTEXT'
fieldnames = ['id', 'severity', 'text']
ordered_fieldnames = ['id', 'severity', 'text']
fieldtypes = ['uint32_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {'severity': 'MAV_SEVERITY'}
fieldunits_by_name = {}
format = '<IB50s'
native_format = bytearray('<IBc', 'ascii')
orders = [0, 1, 2]
lengths = [1, 1, 1]
array_lengths = [0, 0, 50]
crc_extra = 245
unpacker = Struct('<IB50s')
instance_field = None
instance_offset = -1
id = msg_id
severity = severity
text = text
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is file reponse info

name = 'FILE_RESPONSE_INFO'
fieldnames = ['token', 'target_info', 'plane_id']
ordered_fieldnames = ['token', 'plane_id', 'target_info']
fieldtypes = ['uint32_t', 'uint8_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IIB'
native_format = bytearray('<IIB', 'ascii')
orders = [0, 2, 1]
lengths = [1, 1, 1]
array_lengths = [0, 0, 0]
crc_extra = 216
unpacker = Struct('<IIB')
instance_field = None
instance_offset = -1
token = token
target_info = target_info
plane_id = plane_id
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is wifi settings

name = 'WIFI_SETS'
fieldnames = ['token', 'plane_id', 'type', 'ack', 'ssid', 'psk']
ordered_fieldnames = ['token', 'plane_id', 'type', 'ack', 'ssid', 'psk']
fieldtypes = ['uint32_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IHBB20B20B'
native_format = bytearray('<IHBBBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 20, 20]
array_lengths = [0, 0, 0, 0, 20, 20]
crc_extra = 61
unpacker = Struct('<IHBB20B20B')
instance_field = None
instance_offset = -1
token = token
plane_id = plane_id
type = wifi_type
ack = ack
ssid = ssid
psk = psk
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

color track target

name = 'COLOR_TRACK_TARGET'
fieldnames = ['fun_id', 'data_w', 'data_h', 'data', 'rect_x', 'rect_y', 'rect_w', 'rect_h']
ordered_fieldnames = ['data_w', 'data_h', 'rect_x', 'rect_y', 'rect_w', 'rect_h', 'fun_id', 'data']
fieldtypes = ['uint8_t', 'uint32_t', 'uint32_t', 'uint8_t', 'uint32_t', 'uint32_t', 'uint32_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IIIIIIB147B'
native_format = bytearray('<IIIIIIBB', 'ascii')
orders = [6, 0, 1, 7, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1, 1, 147]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 147]
crc_extra = 135
unpacker = Struct('<IIIIIIB147B')
instance_field = None
instance_offset = -1
fun_id = fun_id
data_w = data_w
data_h = data_h
data = data
rect_x = rect_x
rect_y = rect_y
rect_w = rect_w
rect_h = rect_h
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

color track target ret

name = 'COLOR_TRACK_TARGET_RET'
fieldnames = ['frame_id', 'rect_x', 'rect_y', 'rect_w', 'rect_h']
ordered_fieldnames = ['frame_id', 'rect_x', 'rect_y', 'rect_w', 'rect_h']
fieldtypes = ['uint64_t', 'uint32_t', 'uint32_t', 'uint32_t', 'uint32_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<QIIII'
native_format = bytearray('<QIIII', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 159
unpacker = Struct('<QIIII')
instance_field = None
instance_offset = -1
frame_id = frame_id
rect_x = rect_x
rect_y = rect_y
rect_w = rect_w
rect_h = rect_h
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

line walking

name = 'LINE_WALKING'
fieldnames = ['fun_id', 'dist', 'tv', 'way_color', 'result']
ordered_fieldnames = ['fun_id', 'dist', 'tv', 'way_color', 'result']
fieldtypes = ['uint32_t', 'uint32_t', 'uint32_t', 'uint32_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IIIIB'
native_format = bytearray('<IIIIB', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 195
unpacker = Struct('<IIIIB')
instance_field = None
instance_offset = -1
fun_id = fun_id
dist = dist
tv = tv
way_color = way_color
result = result
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is file heads

name = 'FILE_HEADS'
fieldnames = ['token', 'file_type', 'file_size', 'plane_id', 'info', 'array', 'version', 'md5', 'file_name']
ordered_fieldnames = ['token', 'file_size', 'info', 'array', 'plane_id', 'file_type', 'version', 'md5', 'file_name']
fieldtypes = ['uint32_t', 'uint8_t', 'uint32_t', 'uint16_t', 'float', 'float', 'uint8_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<II4f6fHB3B16B50s'
native_format = bytearray('<IIffHBBBc', 'ascii')
orders = [0, 5, 1, 4, 2, 3, 6, 7, 8]
lengths = [1, 1, 4, 6, 1, 1, 3, 16, 1]
array_lengths = [0, 0, 4, 6, 0, 0, 3, 16, 50]
crc_extra = 199
unpacker = Struct('<II4f6fHB3B16B50s')
instance_field = None
instance_offset = -1
token = token
file_type = file_type
file_size = file_size
plane_id = plane_id
info = info
array = array
version = version
md5 = md5
file_name = file_name
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane ack command

name = 'PLANE_ACK'
fieldnames = ['token', 'plane_id', 'cmd', 'result', 'type']
ordered_fieldnames = ['plane_id', 'token', 'cmd', 'result', 'type']
fieldtypes = ['uint8_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<HBBBB'
native_format = bytearray('<HBBBB', 'ascii')
orders = [1, 0, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 200
unpacker = Struct('<HBBBB')
instance_field = None
instance_offset = -1
token = token
plane_id = plane_id
cmd = cmd
result = result
type = message_type
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane command

name = 'PLANE_COMMAND'
fieldnames = ['utc', 'token', 'data', 'plane_id', 'cmd', 'ack', 'type', 'reserve']
ordered_fieldnames = ['utc', 'token', 'data', 'plane_id', 'cmd', 'ack', 'type', 'reserve']
fieldtypes = ['uint64_t', 'uint32_t', 'uint16_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<QIHHBBBB'
native_format = bytearray('<QIHHBBBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7]
lengths = [1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 174
unpacker = Struct('<QIHHBBBB')
instance_field = None
instance_offset = -1
utc = utc
token = token
data = data
plane_id = plane_id
cmd = cmd
ack = ack
type = message_type
reserve = reserve
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane ack command extend

name = 'PLANE_ACK_EXTEND'
fieldnames = ['token', 'plane_id', 'cmd', 'result', 'type', 'extend']
ordered_fieldnames = ['token', 'plane_id', 'cmd', 'result', 'type', 'extend']
fieldtypes = ['uint32_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<IHBBB64s'
native_format = bytearray('<IHBBBc', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 64]
crc_extra = 150
unpacker = Struct('<IHBBB64s')
instance_field = None
instance_offset = -1
token = token
plane_id = plane_id
cmd = cmd
result = result
type = message_type
extend = extend
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

the mavlink is plane status

name = 'PLANE_STATUS'
fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
ordered_fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
fieldtypes = ['int64_t', 'int64_t', 'int64_t', 'uint16_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'int8_t', 'uint8_t', 'uint8_t', 'char']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<qqqHBBBBBbBB64s'
native_format = bytearray('<qqqHBBBBBbBBc', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64]
crc_extra = 103
unpacker = Struct('<qqqHBBBBBbBB64s')
instance_field = None
instance_offset = -1
capacity = capacity
remaining = remaining
occupied = occupied
plane_id = plane_id
rtp = rtp
dsp = dsp
qr = qr
video = video
laser = laser
pitch = pitch
line = line
wifi = wifi
extend = extend
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

broadcast mavlink plane status

name = 'BROADCAST_PLANE_STATUS'
fieldnames = ['sn', 'ip', 'plane_id', 'wifi_mode', 'bind_client', 'wifi_power']
ordered_fieldnames = ['sn', 'ip', 'plane_id', 'wifi_mode', 'bind_client', 'wifi_power']
fieldtypes = ['char', 'char', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<16s16sBBBB'
native_format = bytearray('<ccBBBB', 'ascii')
orders = [0, 1, 2, 3, 4, 5]
lengths = [1, 1, 1, 1, 1, 1]
array_lengths = [16, 16, 0, 0, 0, 0]
crc_extra = 32
unpacker = Struct('<16s16sBBBB')
instance_field = None
instance_offset = -1
sn = sn
ip = ip
plane_id = plane_id
wifi_mode = wifi_mode
bind_client = bind_client
wifi_power = wifi_power
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

qr recognite deal

name = 'QRRECOGNITE_DEAL'
fieldnames = ['time_duration', 'search_radius', 'qr_size', 'run_rate', 'qr_id', 'x_com', 'y_com', 'z_com', 'yaw_com', 'mode', 'qr_background_grayscale', 'status']
ordered_fieldnames = ['time_duration', 'search_radius', 'qr_size', 'run_rate', 'qr_id', 'x_com', 'y_com', 'z_com', 'yaw_com', 'mode', 'qr_background_grayscale', 'status']
fieldtypes = ['double', 'float', 'float', 'int32_t', 'int32_t', 'float', 'float', 'float', 'float', 'uint8_t', 'int8_t', 'int8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<dffiiffffBbb'
native_format = bytearray('<dffiiffffBbb', 'ascii')
orders = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 208
unpacker = Struct('<dffiiffffBbb')
instance_field = None
instance_offset = -1
time_duration = time_duration
search_radius = search_radius
qr_size = qr_size
run_rate = run_rate
qr_id = qr_id
x_com = x_com
y_com = y_com
z_com = z_com
yaw_com = yaw_com
mode = mode
qr_background_grayscale = qr_background_grayscale
status = status
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

qr recognite deal

name = 'COLORRECOG'
fieldnames = ['mode', 'state', 'r', 'g', 'b']
ordered_fieldnames = ['mode', 'state', 'r', 'g', 'b']
fieldtypes = ['uint8_t', 'uint8_t', 'uint8_t', 'uint8_t', 'uint8_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<BBBBB'
native_format = bytearray('<BBBBB', 'ascii')
orders = [0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0]
crc_extra = 173
unpacker = Struct('<BBBBB')
instance_field = None
instance_offset = -1
mode = mode
state = state
r = r
g = g
b = b
pack(mav, force_mavlink1=False)

Bases: MAVLink_message

recognite mark

name = 'CAMERA'
fieldnames = ['mode', 'type', 'result', 'x', 'y', 'z', 'angle', 'time_duration']
ordered_fieldnames = ['x', 'y', 'z', 'angle', 'time_duration', 'mode', 'type', 'result']
fieldtypes = ['uint8_t', 'uint8_t', 'uint8_t', 'float', 'float', 'float', 'float', 'uint16_t']
fielddisplays_by_name = {}
fieldenums_by_name = {}
fieldunits_by_name = {}
format = '<ffffHBBB'
native_format = bytearray('<ffffHBBB', 'ascii')
orders = [5, 6, 7, 0, 1, 2, 3, 4]
lengths = [1, 1, 1, 1, 1, 1, 1, 1]
array_lengths = [0, 0, 0, 0, 0, 0, 0, 0]
crc_extra = 120
unpacker = Struct('<ffffHBBB')
instance_field = None
instance_offset = -1
mode = mode
type = camera_type
result = result
x = x
y = y
z = z
angle = angle
time_duration = time_duration
pack(mav, force_mavlink1=False)

MAVError

Bases: Exception

MAVLink error class

message instance-attribute

message = msg

MAVString

Bases: str

NUL terminated string

Bases: MAVLink_message

a piece of bad data in a mavlink stream

data = data
reason = reason

Bases: MAVLink_message

a message that we don't have in the XML used when built

data = data

MAVLinkSigning

Bases: object

MAVLink signing state class

secret_key instance-attribute

secret_key = None

timestamp instance-attribute

timestamp = 0
link_id = 0

sign_outgoing instance-attribute

sign_outgoing = False

allow_unsigned_callback instance-attribute

allow_unsigned_callback = None

stream_timestamps instance-attribute

stream_timestamps = {}

sig_count instance-attribute

sig_count = 0

badsig_count instance-attribute

badsig_count = 0

goodsig_count instance-attribute

goodsig_count = 0

unsigned_count instance-attribute

unsigned_count = 0

reject_count instance-attribute

reject_count = 0

Bases: object

MAVLink protocol handling class

seq instance-attribute

seq = 0

file instance-attribute

file = file

srcSystem instance-attribute

srcSystem = src_system

srcComponent instance-attribute

srcComponent = src_component

callback instance-attribute

callback = None

callback_args instance-attribute

callback_args = None

callback_kwargs instance-attribute

callback_kwargs = None

send_callback instance-attribute

send_callback = None

send_callback_args instance-attribute

send_callback_args = None

send_callback_kwargs instance-attribute

send_callback_kwargs = None

buf instance-attribute

buf = bytearray()

buf_index instance-attribute

buf_index = 0

expected_length instance-attribute

expected_length = HEADER_LEN_V1 + 2

have_prefix_error instance-attribute

have_prefix_error = False

robust_parsing instance-attribute

robust_parsing = False

protocol_marker instance-attribute

protocol_marker = 254

little_endian instance-attribute

little_endian = True

crc_extra instance-attribute

crc_extra = True

sort_fields instance-attribute

sort_fields = True

total_packets_sent instance-attribute

total_packets_sent = 0

total_bytes_sent instance-attribute

total_bytes_sent = 0

total_packets_received instance-attribute

total_packets_received = 0

total_bytes_received instance-attribute

total_bytes_received = 0

total_receive_errors instance-attribute

total_receive_errors = 0

startup_time instance-attribute

startup_time = time()

signing instance-attribute

signing = MAVLinkSigning()

native instance-attribute

native = None

test_buf instance-attribute

test_buf = bytearray()

mav20_unpacker instance-attribute

mav20_unpacker = Struct('<cBBBBBBHB')

mav10_unpacker instance-attribute

mav10_unpacker = Struct('<cBBBBB')

mav20_h3_unpacker instance-attribute

mav20_h3_unpacker = Struct('BBB')

mav_csum_unpacker instance-attribute

mav_csum_unpacker = Struct('<H')

mav_sign_unpacker instance-attribute

mav_sign_unpacker = Struct('<IH')

set_callback

set_callback(callback, *args, **kwargs)

set_send_callback

set_send_callback(callback, *args, **kwargs)

send

send(mavmsg, force_mavlink1=False)

send a MAVLink message

buf_len

buf_len()

bytes_needed

bytes_needed()

return number of bytes needed for next parsing stage

parse_char

parse_char(c)

input some data bytes, possibly returning a new message

parse_buffer

parse_buffer(s)

input some data bytes, possibly returning a list of new messages

check_signature

check_signature(msgbuf, src_system, src_component)

check signature on incoming message

decode

decode(msgbuf)

decode a buffer as a MAVLink message

system_time_encode staticmethod

system_time_encode(time_unix_usec, time_boot_ms)

The system time is the time of the master clock, typically the

system_time_send

system_time_send(time_unix_usec, time_boot_ms, force_mavlink1=False)

The system time is the time of the master clock, typically the

manual_control_encode staticmethod

manual_control_encode(target, x, y, z, r, buttons)

This message provides an API for manually controlling the vehicle

manual_control_send

manual_control_send(target, x, y, z, r, buttons, force_mavlink1=False)

This message provides an API for manually controlling the vehicle

manual_control2_encode staticmethod

manual_control2_encode(target, x, y, z, r, buttons)

This message provides an API for manually controlling the vehicle

manual_control2_send

manual_control2_send(target, x, y, z, r, buttons, force_mavlink1=False)

This message provides an API for manually controlling the vehicle

local_position_encode staticmethod

local_position_encode(yaw, vel_x, vel_y, vel_z, x, y, z)

Msg report flight data .

local_position_send

local_position_send(yaw, vel_x, vel_y, vel_z, x, y, z, force_mavlink1=False)

Msg report flight data .

optitrack_encode staticmethod

optitrack_encode(raw_data)

Optitrack raw data .

optitrack_send

optitrack_send(raw_data, force_mavlink1=False)

Optitrack raw data .

autopilot_version_encode staticmethod

autopilot_version_encode(autopilot_sw_version, autopilot_hw_version, product_id, autopilot_uid)

Msg report autopilot version and producd id .

autopilot_version_send

autopilot_version_send(autopilot_sw_version, autopilot_hw_version, product_id, autopilot_uid, force_mavlink1=False)

Msg report autopilot version and producd id .

position_control_setpoint_encode staticmethod

position_control_setpoint_encode(x, y, z, yaw, speed, yaw_rate)

Msg from vision control pilot .

position_control_setpoint_send

position_control_setpoint_send(x, y, z, yaw, speed, yaw_rate, force_mavlink1=False)

Msg from vision control pilot .

app_heartbeat_encode staticmethod

app_heartbeat_encode(user_mode)

Msg report pilot used mode .

app_heartbeat_send

app_heartbeat_send(user_mode, force_mavlink1=False)

Msg report pilot used mode .

report_flight_data_encode staticmethod

report_flight_data_encode(roll, pitch, yaw, accx, accy, accz, vel_x, vel_y, vel_z, x, y, z, distance, barrier, battery_volumn, baro_alt)

Msg report flight data .

report_flight_data_send

report_flight_data_send(roll, pitch, yaw, accx, accy, accz, vel_x, vel_y, vel_z, x, y, z, distance, barrier, battery_volumn, baro_alt, force_mavlink1=False)

Msg report flight data .

report_stats_encode staticmethod

report_stats_encode(utc, flight_time, lat, lon, alt, x, y, z, yaw, sensors_present, sensors_health, drone_id, firmware_version, system_version, dance_version, dance_name, dance_md5, product_id, aux_token, time_token, battery_volumn, formation_status, rgb_status, acc_clibration_status, mag_clibration_status, temperature, block_status, drone_status)

Msg report pilot status.

report_stats_send

report_stats_send(utc, flight_time, lat, lon, alt, x, y, z, yaw, sensors_present, sensors_health, drone_id, firmware_version, system_version, dance_version, dance_name, dance_md5, product_id, aux_token, time_token, battery_volumn, formation_status, rgb_status, acc_clibration_status, mag_clibration_status, temperature, block_status, drone_status, force_mavlink1=False)

Msg report pilot status.

formation_cmd_encode staticmethod

formation_cmd_encode(param1, param2, param3, param4, x, y, z, yaw, start_id, end_id, cmd, ack, command_type, token)

Send a formation cmd with parameters to the MAV.

formation_cmd_send

formation_cmd_send(param1, param2, param3, param4, x, y, z, yaw, start_id, end_id, token, cmd, ack, target_position, force_mavlink1=False)

Send a formation cmd with parameters to the MAV.

formation_cmd_ack_encode staticmethod

formation_cmd_ack_encode(msg_id, token, cmd, result, message_type)

Report status of a formation cmd.

formation_cmd_ack_send

formation_cmd_ack_send(msg_id, token, cmd, result, message_type, force_mavlink1=False)

Report status of a formation cmd.

console_encode staticmethod

console_encode(text)

Status text message.

console_send

console_send(text, force_mavlink1=False)

Status text message.

statustext_encode

statustext_encode(msg_id, severity, text)

Status text message.

statustext_send

statustext_send(msg_id, severity, text, force_mavlink1=False)

Status text message.

file_response_info_encode staticmethod

file_response_info_encode(token, target_info, plane_id)

the mavlink is file reponse info

file_response_info_send

file_response_info_send(token, target_info, plane_id, force_mavlink1=False)

the mavlink is file reponse info

wifi_sets_encode staticmethod

wifi_sets_encode(token, plane_id, wifi_type, ack, ssid, psk)

the mavlink is wifi settings

wifi_sets_send

wifi_sets_send(token, plane_id, wifi_type, ack, ssid, psk, force_mavlink1=False)

the mavlink is wifi settings

color_track_target_encode staticmethod

color_track_target_encode(fun_id, data_w, data_h, data, rect_x, rect_y, rect_w, rect_h)

color track target

color_track_target_send

color_track_target_send(fun_id, data_w, data_h, data, rect_x, rect_y, rect_w, rect_h, force_mavlink1=False)

color track target

color_track_target_ret_encode staticmethod

color_track_target_ret_encode(frame_id, rect_x, rect_y, rect_w, rect_h)

color track target ret

color_track_target_ret_send

color_track_target_ret_send(frame_id, rect_x, rect_y, rect_w, rect_h, force_mavlink1=False)

color track target ret

line_walking_encode staticmethod

line_walking_encode(fun_id, dist, tv, way_color, result)

line walking

line_walking_send

line_walking_send(fun_id, dist, tv, way_color, result, force_mavlink1=False)

line walking

file_heads_encode staticmethod

file_heads_encode(token, file_type, file_size, plane_id, info, array, version, md5, file_name)

the mavlink is file heads

file_heads_send

file_heads_send(token, file_type, file_size, plane_id, info, array, version, md5, file_name, force_mavlink1=False)

the mavlink is file heads

plane_ack_encode staticmethod

plane_ack_encode(token, plane_id, cmd, result, message_type)

the mavlink is plane ack command

plane_ack_send

plane_ack_send(token, plane_id, cmd, result, message_type, force_mavlink1=False)

the mavlink is plane ack command

plane_command_encode staticmethod

plane_command_encode(utc, token, data, plane_id, cmd, ack, message_type, reserve)

the mavlink is plane command

plane_command_send

plane_command_send(utc, token, data, plane_id, cmd, ack, message_type, reserve, force_mavlink1=False)

the mavlink is plane command

plane_ack_extend_encode staticmethod

plane_ack_extend_encode(token, plane_id, cmd, result, message_type, extend)

the mavlink is plane ack command extend

plane_ack_extend_send

plane_ack_extend_send(token, plane_id, cmd, result, message_type, extend, force_mavlink1=False)

the mavlink is plane ack command extend

plane_status_encode staticmethod

plane_status_encode(capacity, remaining, occupied, plane_id, rtp, dsp, qr, video, laser, pitch, line, wifi, extend)

the mavlink is plane status

plane_status_send

plane_status_send(capacity, remaining, occupied, plane_id, rtp, dsp, qr, video, laser, pitch, line, wifi, extend, force_mavlink1=False)

the mavlink is plane status

broadcast_plane_status_encode staticmethod

broadcast_plane_status_encode(sn, ip, plane_id, wifi_mode, bind_client, wifi_power)

broadcast mavlink plane status

broadcast_plane_status_send

broadcast_plane_status_send(sn, ip, plane_id, wifi_mode, bind_client, wifi_power, force_mavlink1=False)

broadcast mavlink plane status

qrrecognite_deal_encode staticmethod

qrrecognite_deal_encode(time_duration, search_radius, qr_size, run_rate, qr_id, x_com, y_com, z_com, yaw_com, mode, qr_background_grayscale, status)

qr recognite deal

qrrecognite_deal_send

qrrecognite_deal_send(time_duration, search_radius, qr_size, run_rate, qr_id, x_com, y_com, z_com, yaw_com, mode, qr_background_grayscale, status, force_mavlink1=False)

qr recognite deal

colorrecog_encode staticmethod

colorrecog_encode(mode, state, r, g, b)

qr recognite deal

colorrecog_send

colorrecog_send(mode, state, r, g, b, force_mavlink1=False)

qr recognite deal

camera_encode staticmethod

camera_encode(mode, camera_type, result, x, y, z, angle, time_duration)

recognite mark

camera_send

camera_send(mode, camera_type, result, x, y, z, angle, time_duration, force_mavlink1=False)

recognite mark

to_string

to_string(s)

desperate attempt to convert a string regardless of what garbage we get

UWB Helpers

uwb

UWB_MSG_ID_HEARTBEAT module-attribute

UWB_MSG_ID_HEARTBEAT = 1

UWB_MSG_ID_STATE module-attribute

UWB_MSG_ID_STATE = 2

UWB_MSG_ID_LOCATION_RESPONSE module-attribute

UWB_MSG_ID_LOCATION_RESPONSE = 3

UWB_MSG_ID_FILE module-attribute

UWB_MSG_ID_FILE = 4

UWB_MSG_ID_SWITCH_MODE module-attribute

UWB_MSG_ID_SWITCH_MODE = 5

UWB_MSG_ID_GET_STATE module-attribute

UWB_MSG_ID_GET_STATE = 6

UWB_MSG_ID_DEMARCATE module-attribute

UWB_MSG_ID_DEMARCATE = 7

uwb_msg_list module-attribute

sum_val module-attribute

sum_val = 0

srl module-attribute

srl = Serial('COM6', 921600, timeout=2)

uwb module-attribute

uwb = Uwb()

msg module-attribute

msg = uwb_switch_mode_encode('Location')

buf module-attribute

buf = pack()

recv module-attribute

recv = []

HeadError

Bases: Exception

message instance-attribute

message = msg

UwbError

Bases: Exception

message instance-attribute

message = msg

UwbMsg

msg_id class-attribute instance-attribute

msg_id = None

msg_len class-attribute instance-attribute

msg_len = None

msg_header class-attribute instance-attribute

msg_header = None

msg_function_mark class-attribute instance-attribute

msg_function_mark = None

decode

decode(buf)

pack

pack()

get_msg_id

get_msg_id()

UwbHeartbeat

Bases: UwbMsg

msg_id class-attribute instance-attribute

msg_len class-attribute instance-attribute

msg_len = 896

msg_header class-attribute instance-attribute

msg_header = 85

msg_function_mark class-attribute instance-attribute

msg_function_mark = 0

msg_sumcheck class-attribute instance-attribute

msg_sumcheck = 238

decode

decode(buf)

UwbState

Bases: UwbMsg

msg_id class-attribute instance-attribute

msg_len class-attribute instance-attribute

msg_len = 128

msg_header class-attribute instance-attribute

msg_header = 84

msg_function_mark class-attribute instance-attribute

msg_function_mark = 0

translate_mode instance-attribute

translate_mode = None

buf instance-attribute

buf = None

get_coordinate staticmethod

get_coordinate(buf)

decode

decode(buf)

UwbLocationResponse

Bases: UwbMsg

msg_id class-attribute instance-attribute

msg_len class-attribute instance-attribute

msg_len = 28

msg_header class-attribute instance-attribute

msg_header = 85

msg_function_mark class-attribute instance-attribute

msg_function_mark = 3

decode

decode(buf)

UwbFile

Bases: UwbMsg

msg_id class-attribute instance-attribute

msg_id = UWB_MSG_ID_FILE

pack

pack()

UwbSwitchMode

Bases: UwbMsg

msg_id class-attribute instance-attribute

location_mode_list1 class-attribute instance-attribute

location_mode_list1 = [0, 0, 2, 0, 0]

location_mode_list2 class-attribute instance-attribute

location_mode_list2 = [203, 0, 205, 0, 0]

pack

pack()

UwbGetState

Bases: UwbMsg

msg_id class-attribute instance-attribute

pack

pack()

UwbDemarcate

Bases: UwbMsg

msg_id class-attribute instance-attribute

msg_len class-attribute instance-attribute

msg_len = 128

pack

pack()

Uwb

is_uwb_msg staticmethod

is_uwb_msg(buf)

return msg len while buf is belong to uwbmsg

decode staticmethod

decode(buf)

uwb_switch_mode_encode staticmethod

uwb_switch_mode_encode(translate_mode, location_mode=0)

uwb_file_encode staticmethod

uwb_file_encode(buf, tar_type, tar_no)

uwb_get_state_encode staticmethod

uwb_get_state_encode()

uwb_demarcate_encode staticmethod

uwb_demarcate_encode(uwb_state)