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
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
¶
ManualFlyFrameCallback
module-attribute
¶
Obstacles
¶
Bases: BaseModel
Obstacle detection state from barrier sensors.
Parsed from the barrier bitmask in REPORT_FLIGHT_DATA.
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_baro
class-attribute
instance-attribute
¶
battery_percent
class-attribute
instance-attribute
¶
barrier
class-attribute
instance-attribute
¶
from_mavlink
classmethod
¶
from_mavlink(msg) -> FlightData
Create FlightData from MAVLink report_flight_data message.
DataCenter
¶
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 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 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
¶
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
¶
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
¶
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 |
Controlserver
¶
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_curvilinearFlight
¶
single_fly_straight_flight
¶
vertical_circle
¶
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
|
set_velocity
¶
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 yaw rate level - formation cmd 0x31 (49)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int
|
Yaw rate level |
required |
set_rgb_brightness
¶
Set RGB brightness - formation cmd 0x32 (50)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
brightness
|
int
|
Brightness level |
required |
enable_battery_failsafe
¶
Enable battery failsafe - formation cmd 0x35 (53)
disable_battery_failsafe
¶
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 formation operate status - formation cmd 0x3B (59)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
int
|
Operate status value |
required |
set_land_speed
¶
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 - 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 - 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):
|
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:
stop_manual_control
¶
Send zero inputs to stop manual movement.
Returns:
| Type | Description |
|---|---|
bool
|
True if message was sent successfully. |
send_app_heartbeat
¶
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 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 |
Command Processor¶
commandprocessor
¶
command_processor_list
module-attribute
¶
command_processor_list = [SFTakeoffCP, SFTouchdownCP, SFForwardCP, SFBackCP, SFLeftCP, SFRightCP, SFUpCP, SFDownCP, SFTurnLeftCP, SFTurnRightCP, SFTurnLeft360CP, SFTurnRight360CP, SFBounceCP, SFStraightFlightCP, SFFlipForwardCP, SFFlipBackCP, SFFlipLeftCP, SFFlipRightCP, SFLamplight, Plane_Linux_cmd, SFCurvilinearFlight, SFHoverFlight, SFBarrier_aircraft, SFLine_walking, SFAiIdentifies, SFQr_code_tracking, SFQr_code_aligns, SF_ColorRecog, SF_unlock, SF_lock, SFCircumvolant, SF_Plane_time, SF_Enable_LED, SF_Disable_LED, SF_Cancel_RGB, SF_Vertical_Circle, SF_Set_Avoidance, SF_Get_Product_ID, SF_Set_Velocity, SF_Set_Yawrate, SF_Set_RGB_Brightness, SF_Enable_Battery_FS, SF_Disable_Battery_FS, SF_Set_Parameter, SF_Operate, SF_Set_Land_Speed, SF_Set_Video_Resolution, SF_Set_WiFi_Mode]
Plane_Linux_cmd
¶
Bases: CommandProcessor
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]
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)
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.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
SFBarrier_aircraft
¶
Bases: CommandProcessor
Enable/disable obstacle avoidance - Formation CMD 40/41.
True enables avoidance (CMD 40). False disables it (CMD 41).
SFLine_walking
¶
Bases: CommandProcessor
SFAiIdentifies
¶
Bases: CommandProcessor
SFQr_code_tracking
¶
Bases: CommandProcessor
SFQr_code_aligns
¶
Bases: CommandProcessor
SF_ColorRecog
¶
Bases: CommandProcessor
SF_unlock
¶
Bases: CommandProcessor
Arm motors - Formation CMD 4 (ARM).
Unlocks/arms the drone motors for flight.
SF_lock
¶
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)
SF_Plane_time
¶
Bases: CommandProcessor
SF_Enable_LED
¶
Bases: CommandProcessor
Enable LED - formation cmd 0x0C (12)
SF_Disable_LED
¶
Bases: CommandProcessor
Disable LED - formation cmd 0x0D (13)
SF_Cancel_RGB
¶
Bases: CommandProcessor
Cancel RGB animation - formation cmd 0x1B (27)
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
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
SF_Get_Product_ID
¶
Bases: CommandProcessor
Get product ID/autopilot version - formation cmd 0x2C (44)
Firmware: send_autopilot_version()
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
SF_Set_Yawrate
¶
Bases: CommandProcessor
Set yaw rate level - formation cmd 0x31 (49)
Firmware: set_manual_yaw_rate(level)
SF_Set_RGB_Brightness
¶
Bases: CommandProcessor
Set RGB brightness - formation cmd 0x32 (50)
Firmware: set_rgb_brightness(brightness)
SF_Enable_Battery_FS
¶
Bases: CommandProcessor
Enable battery failsafe - formation cmd 0x35 (53)
Firmware: set_battery_failsafe(1)
SF_Disable_Battery_FS
¶
Bases: CommandProcessor
Disable battery failsafe - formation cmd 0x36 (54)
Firmware: set_battery_failsafe(0)
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)
SF_Operate
¶
Bases: CommandProcessor
Set formation operate status - formation cmd 0x3B (59)
Firmware: set_formation_operate_status(status)
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
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.
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
refresh_runtime_config
¶
Refresh cached MAVLink encoders after runtime config changes.
State Processor¶
stateprocessor
¶
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
¶
mavlink_state_processor_list
module-attribute
¶
mavlink_state_processor_list = [Plane_REPORT_FLIGHT_DATA, HeartbeatSP, FormationAckSP, PLANE_STATUS, BROADCAST_PLANE_STATUS, PLANE_CAMERA, PLANE_QRRecognite_Deal, PLANE_ColorRecog, mavlink_statustext_t, mavlink_WALKING, mavlink_MSG_ID_PLANE_ACK, PhotoresponseSP, SYSTEM_TIME_SP, MANUAL_CONTROL_SP, MANUAL_CONTROL2_SP, LOCAL_POSITION_SP, OPTITRACK_SP, AUTOPILOT_VERSION_SP, POSITION_CONTROL_SETPOINT_SP, APP_HEARTBEAT_SP, FORMATION_CMD_SP, FILE_RESPONSE_INFO_SP, WIFI_SETS_SP, COLOR_TRACK_TARGET_SP, COLOR_TRACK_TARGET_RET_SP, FILE_HEADS_SP, PLANE_COMMAND_SP, LONGITUDE_LATITUDE_SP, CONSOLE_SP]
uwb_state_process_list
module-attribute
¶
uwb_state_process_list = [UwbHeartBeatSP, UwbStateSP, UwbLocationResponse]
Obstacles
¶
Bases: BaseModel
Obstacle detection state from barrier sensors.
Parsed from the barrier bitmask in REPORT_FLIGHT_DATA.
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_baro
class-attribute
instance-attribute
¶
battery_percent
class-attribute
instance-attribute
¶
barrier
class-attribute
instance-attribute
¶
from_mavlink
classmethod
¶
from_mavlink(msg) -> FlightData
Create FlightData from MAVLink report_flight_data message.
DataCenter
¶
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 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 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
¶
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
¶
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
¶
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
¶
FormationRequestInfoSP
¶
Bases: StateProcessor
FirmwareHeadsSP
¶
Bases: StateProcessor
HeartbeatSP
¶
Bases: StateProcessor
Plane_REPORT_FLIGHT_DATA
¶
Bases: StateProcessor
PhotoresponseSP
¶
Bases: StateProcessor
FormationAckSP
¶
Bases: StateProcessor
PSysResponseSP
¶
Bases: StateProcessor
BROADCAST_PLANE_STATUS
¶
Bases: StateProcessor
PLANE_STATUS
¶
Bases: StateProcessor
PLANE_CAMERA
¶
Bases: StateProcessor
PLANE_QRRecognite_Deal
¶
Bases: StateProcessor
PLANE_ColorRecog
¶
Bases: StateProcessor
mavlink_statustext_t
¶
Bases: StateProcessor
mavlink_WALKING
¶
Bases: StateProcessor
mavlink_MSG_ID_PLANE_ACK
¶
Bases: StateProcessor
SYSTEM_TIME_SP
¶
Bases: StateProcessor
SYSTEM_TIME (msg 2) - Time sync from app
MANUAL_CONTROL_SP
¶
Bases: StateProcessor
MANUAL_CONTROL (msg 69) - Joystick input
MANUAL_CONTROL2_SP
¶
Bases: StateProcessor
MANUAL_CONTROL2 (msg 71) - Follow mode joystick
LOCAL_POSITION_SP
¶
Bases: StateProcessor
LOCAL_POSITION (msg 72) - HIGH-FREQUENCY 500Hz position stream
OPTITRACK_SP
¶
Bases: StateProcessor
OPTITRACK (msg 101) - External motion capture data
AUTOPILOT_VERSION_SP
¶
Bases: StateProcessor
AUTOPILOT_VERSION (msg 148) - Product info
POSITION_CONTROL_SETPOINT_SP
¶
Bases: StateProcessor
POSITION_CONTROL_SETPOINT (msg 170) - Target position control
APP_HEARTBEAT_SP
¶
Bases: StateProcessor
APP_HEARTBEAT (msg 204) - Keep-alive from app
FORMATION_CMD_SP
¶
Bases: StateProcessor
FORMATION_CMD (msg 208) - Flight commands sent from app
FILE_RESPONSE_INFO_SP
¶
Bases: StateProcessor
FILE_RESPONSE_INFO (msg 213) - File transfer response
WIFI_SETS_SP
¶
Bases: StateProcessor
WIFI_SETS (msg 214) - WiFi configuration
COLOR_TRACK_TARGET_SP
¶
Bases: StateProcessor
COLOR_TRACK_TARGET (msg 215) - Color tracking setup
COLOR_TRACK_TARGET_RET_SP
¶
Bases: StateProcessor
COLOR_TRACK_TARGET_RET (msg 216) - Color tracking result
FILE_HEADS_SP
¶
Bases: StateProcessor
FILE_HEADS (msg 227) - File transfer header
PLANE_COMMAND_SP
¶
Bases: StateProcessor
PLANE_COMMAND (msg 229) - Camera/laser/magnet commands to Linux
LONGITUDE_LATITUDE_SP
¶
Bases: StateProcessor
LONGITUDE_LATITUDE (msg 237) - GPS coordinates
CONSOLE_SP
¶
Bases: StateProcessor
CONSOLE (msg 252) - Debug console commands
UwbHeartBeatSP
¶
Bases: StateProcessor
UwbStateSP
¶
Bases: StateProcessor
UwbLocationResponse
¶
Bases: StateProcessor
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'))
MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE
module-attribute
¶
MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL
module-attribute
¶
MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL
module-attribute
¶
MAV_SYS_STATUS_SENSOR_3D_GYRO_CALIBRATED
module-attribute
¶
MAV_SYS_STATUS_SENSOR_3D_ACCEL_CALIBRATED
module-attribute
¶
MAV_SYS_STATUS_SENSOR_3D_MAG_CALIBRATED
module-attribute
¶
MAV_FORMATION_CMD_SHOWOFF_WARNING_BATT
module-attribute
¶
MAVLINK_MSG_ID_POSITION_CONTROL_SETPOINT
module-attribute
¶
MAVLINK_MSG_ID_COLOR_TRACK_TARGET_RET
module-attribute
¶
MAVLINK_MSG_ID_BROADCAST_PLANE_STATUS
module-attribute
¶
mavlink_map
module-attribute
¶
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
¶
task_processor_list
module-attribute
¶
task_processor_list = [SFTakeoffTP, SFTouchdownTP, SFForwardTP, SFBackTP, SFLeftTP, SFRightTP, SFUpTP, SFDownTP, SFTurnLeftTP, SFTurnRightTP, SFTurnLeft360TP, SFTurnRight360TP, SFBounceTP, SFStraightFlightTP, SFFlipForwardTP, SFFlipBackTP, SFFlipLeftTP, SFFlipRightTP, SFLamplight, Plane_Linux_cmd, SFCurvilinearFlight, SFHoverFlight, SFBarrier_aircraft, SFLine_walking, SFAiIdentifies, SFQr_code_tracking, SFQr_code_aligns, SF_ColorRecog, SF_unlock, SF_lock, SFCircumvolant, SF_Plane_time, SF_Enable_LED, SF_Disable_LED, SF_Cancel_RGB, SF_Vertical_Circle, SF_Set_Avoidance, SF_Get_Product_ID, SF_Set_Velocity, SF_Set_Yawrate, SF_Set_RGB_Brightness, SF_Enable_Battery_FS, SF_Disable_Battery_FS, SF_Set_Parameter, SF_Operate, SF_Set_Land_Speed, SF_Set_Video_Resolution, SF_Set_WiFi_Mode]
State
¶
x25crc
¶
MAVLink_header
¶
Bases: object
MAVLink message header
MAVLink_message
¶
Bases: object
base MAVLink message class
EnumEntry
¶
MAVLink_system_time_message
¶
Bases: MAVLink_message
The system time is the time of the master clock, typically the computer clock of the main onboard computer.
MAVLink_manual_control_message
¶
Bases: MAVLink_message
This message provides an API for manually controlling the
buttons are also transmit as boolean values of their
MAVLink_manual_control2_message
¶
Bases: MAVLink_message
This message provides an API for manually controlling the
buttons are also transmit as boolean values of their
MAVLink_local_position_message
¶
Bases: MAVLink_message
Msg report flight data .
fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames
class-attribute
instance-attribute
¶
fieldtypes
class-attribute
instance-attribute
¶
fieldunits_by_name
class-attribute
instance-attribute
¶
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'}
MAVLink_optitrack_message
¶
MAVLink_autopilot_version_message
¶
Bases: MAVLink_message
Msg report autopilot version and producd id .
MAVLink_position_control_setpoint_message
¶
Bases: MAVLink_message
Msg from vision control pilot .
MAVLink_app_heartbeat_message
¶
MAVLink_report_flight_data_message
¶
Bases: MAVLink_message
Msg report flight data .
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn', 'baro_alt']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['baro_alt', 'roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn']
fieldtypes
class-attribute
instance-attribute
¶
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']
fieldunits_by_name
class-attribute
instance-attribute
¶
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'}
native_format
class-attribute
instance-attribute
¶
orders
class-attribute
instance-attribute
¶
lengths
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_report_stats_message
¶
Bases: MAVLink_message
Msg report pilot status.
fieldnames
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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']
native_format
class-attribute
instance-attribute
¶
orders
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
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]
unpacker
class-attribute
instance-attribute
¶
MAVLink_formation_cmd_message
¶
Bases: MAVLink_message
Send a formation cmd with parameters to the MAV.
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['param1', 'param2', 'param3', 'param4', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['param3', 'param4', 'param1', 'param2', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
fieldtypes
class-attribute
instance-attribute
¶
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']
fieldunits_by_name
class-attribute
instance-attribute
¶
native_format
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_formation_cmd_ack_message
¶
Bases: MAVLink_message
Report status of a formation cmd.
MAVLink_console_message
¶
MAVLink_statustext_message
¶
Bases: MAVLink_message
Status text message.
MAVLink_file_response_info_message
¶
Bases: MAVLink_message
the mavlink is file reponse info
ordered_fieldnames
class-attribute
instance-attribute
¶
MAVLink_wifi_sets_message
¶
Bases: MAVLink_message
the mavlink is wifi settings
MAVLink_color_track_target_message
¶
Bases: MAVLink_message
color track target
MAVLink_color_track_target_ret_message
¶
Bases: MAVLink_message
color track target ret
MAVLink_line_walking_message
¶
Bases: MAVLink_message
line walking
MAVLink_file_heads_message
¶
Bases: MAVLink_message
the mavlink is file heads
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['token', 'file_type', 'file_size', 'plane_id', 'info', 'array', 'version', 'md5', 'file_name']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['token', 'file_size', 'info', 'array', 'plane_id', 'file_type', 'version', 'md5', 'file_name']
fieldtypes
class-attribute
instance-attribute
¶
fieldtypes = ['uint32_t', 'uint8_t', 'uint32_t', 'uint16_t', 'float', 'float', 'uint8_t', 'uint8_t', 'char']
MAVLink_plane_ack_message
¶
Bases: MAVLink_message
the mavlink is plane ack command
MAVLink_plane_command_message
¶
Bases: MAVLink_message
the mavlink is plane command
MAVLink_plane_ack_extend_message
¶
Bases: MAVLink_message
the mavlink is plane ack command extend
MAVLink_plane_status_message
¶
Bases: MAVLink_message
the mavlink is plane status
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
fieldtypes
class-attribute
instance-attribute
¶
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']
native_format
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_broadcast_plane_status_message
¶
Bases: MAVLink_message
broadcast mavlink plane status
MAVLink_qrrecognite_deal_message
¶
Bases: MAVLink_message
qr recognite deal
fieldnames
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
fieldtypes = ['double', 'float', 'float', 'int32_t', 'int32_t', 'float', 'float', 'float', 'float', 'uint8_t', 'int8_t', 'int8_t']
native_format
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_colorrecog_message
¶
Bases: MAVLink_message
qr recognite deal
MAVLink_camera_message
¶
Bases: MAVLink_message
recognite mark
MAVString
¶
Bases: str
NUL terminated string
MAVLink_bad_data
¶
Bases: MAVLink_message
a piece of bad data in a mavlink stream
MAVLink_unknown
¶
MAVLinkSigning
¶
Bases: object
MAVLink signing state class
MAVLink
¶
Bases: object
MAVLink protocol handling class
check_signature
¶
check signature on incoming message
system_time_encode
staticmethod
¶
The system time is the time of the master clock, typically the
system_time_send
¶
The system time is the time of the master clock, typically the
manual_control_encode
staticmethod
¶
This message provides an API for manually controlling the vehicle
manual_control_send
¶
This message provides an API for manually controlling the vehicle
manual_control2_encode
staticmethod
¶
This message provides an API for manually controlling the vehicle
manual_control2_send
¶
This message provides an API for manually controlling the vehicle
local_position_encode
staticmethod
¶
Msg report flight data .
local_position_send
¶
Msg report flight data .
autopilot_version_encode
staticmethod
¶
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
¶
Msg from vision control pilot .
position_control_setpoint_send
¶
Msg from vision control pilot .
app_heartbeat_send
¶
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
¶
Report status of a formation cmd.
formation_cmd_ack_send
¶
Report status of a formation cmd.
statustext_send
¶
Status text message.
file_response_info_encode
staticmethod
¶
the mavlink is file reponse info
file_response_info_send
¶
the mavlink is file reponse info
wifi_sets_encode
staticmethod
¶
the mavlink is wifi settings
wifi_sets_send
¶
the mavlink is wifi settings
color_track_target_encode
staticmethod
¶
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
color_track_target_ret_send
¶
color track target ret
line_walking_encode
staticmethod
¶
line walking
line_walking_send
¶
line walking
file_heads_encode
staticmethod
¶
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
¶
the mavlink is plane ack command
plane_ack_send
¶
the mavlink is plane ack command
plane_command_encode
staticmethod
¶
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
¶
the mavlink is plane ack command extend
plane_ack_extend_send
¶
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 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
camera_encode
staticmethod
¶
recognite mark
camera_send
¶
recognite mark
Slots
¶
Event
¶
TaskProcessor
¶
Plane_Linux_cmd
¶
Bases: TaskProcessor
SFLamplight
¶
Bases: TaskProcessor
one plane lamplight TaskProcessor
SFTakeoffTP
¶
Bases: TaskProcessor
one plane takeoff TaskProcessor
SFTouchdownTP
¶
Bases: TaskProcessor
SFForwardTP
¶
Bases: TaskProcessor
SFBackTP
¶
Bases: TaskProcessor
SFLeftTP
¶
Bases: TaskProcessor
SFRightTP
¶
Bases: TaskProcessor
SFUpTP
¶
Bases: TaskProcessor
SFDownTP
¶
Bases: TaskProcessor
SFTurnLeftTP
¶
Bases: TaskProcessor
SFTurnRightTP
¶
Bases: TaskProcessor
SFTurnLeft360TP
¶
Bases: TaskProcessor
SFTurnRight360TP
¶
Bases: TaskProcessor
SFBounceTP
¶
Bases: TaskProcessor
SFStraightFlightTP
¶
Bases: TaskProcessor
SFFlipForwardTP
¶
Bases: TaskProcessor
SFFlipBackTP
¶
Bases: TaskProcessor
SFFlipLeftTP
¶
Bases: TaskProcessor
SFFlipRightTP
¶
Bases: TaskProcessor
SFCurvilinearFlight
¶
Bases: TaskProcessor
SFHoverFlight
¶
Bases: TaskProcessor
SFBarrier_aircraft
¶
Bases: TaskProcessor
SFLine_walking
¶
Bases: TaskProcessor
SFAiIdentifies
¶
Bases: TaskProcessor
SFQr_code_tracking
¶
Bases: TaskProcessor
SFQr_code_aligns
¶
Bases: TaskProcessor
SF_ColorRecog
¶
Bases: TaskProcessor
SF_unlock
¶
Bases: TaskProcessor
SF_lock
¶
Bases: TaskProcessor
SFCircumvolant
¶
Bases: TaskProcessor
SF_Plane_time
¶
Bases: TaskProcessor
SF_Enable_LED
¶
Bases: TaskProcessor
Enable LED task - formation cmd 0x0C (12)
SF_Disable_LED
¶
Bases: TaskProcessor
Disable LED task - formation cmd 0x0D (13)
SF_Cancel_RGB
¶
Bases: TaskProcessor
Cancel RGB animation task - formation cmd 0x1B (27)
SF_Vertical_Circle
¶
SF_Set_Avoidance
¶
Bases: TaskProcessor
Set avoidance with direction - formation cmd 0x2A (42)
SF_Get_Product_ID
¶
Bases: TaskProcessor
Get product ID/autopilot version - formation cmd 0x2C (44)
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
SF_Set_Yawrate
¶
Bases: TaskProcessor
Set yaw rate level - formation cmd 0x31 (49)
SF_Set_RGB_Brightness
¶
Bases: TaskProcessor
Set RGB brightness - formation cmd 0x32 (50)
SF_Enable_Battery_FS
¶
Bases: TaskProcessor
Enable battery failsafe - formation cmd 0x35 (53)
SF_Disable_Battery_FS
¶
Bases: TaskProcessor
Disable battery failsafe - formation cmd 0x36 (54)
SF_Set_Parameter
¶
Bases: TaskProcessor
Set multiple parameters - formation cmd 0x37 (55)
SF_Operate
¶
Bases: TaskProcessor
Set formation operate status - formation cmd 0x3B (59)
SF_Set_Land_Speed
¶
Bases: TaskProcessor
Set land speed - formation cmd 0x3C (60)
fast=False: slow landing, fast=True: fast landing
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
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
MAVLink Helpers¶
mavlink
¶
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]
MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE
module-attribute
¶
MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL
module-attribute
¶
MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL
module-attribute
¶
MAV_SYS_STATUS_SENSOR_3D_GYRO_CALIBRATED
module-attribute
¶
MAV_SYS_STATUS_SENSOR_3D_ACCEL_CALIBRATED
module-attribute
¶
MAV_SYS_STATUS_SENSOR_3D_MAG_CALIBRATED
module-attribute
¶
MAV_FORMATION_CMD_SHOWOFF_WARNING_BATT
module-attribute
¶
MAVLINK_MSG_ID_POSITION_CONTROL_SETPOINT
module-attribute
¶
MAVLINK_MSG_ID_COLOR_TRACK_TARGET_RET
module-attribute
¶
MAVLINK_MSG_ID_BROADCAST_PLANE_STATUS
module-attribute
¶
mavlink_map
module-attribute
¶
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}
MAVLink_header
¶
Bases: object
MAVLink message header
MAVLink_message
¶
Bases: object
base MAVLink message class
EnumEntry
¶
MAVLink_system_time_message
¶
Bases: MAVLink_message
The system time is the time of the master clock, typically the computer clock of the main onboard computer.
MAVLink_manual_control_message
¶
Bases: MAVLink_message
This message provides an API for manually controlling the
buttons are also transmit as boolean values of their
MAVLink_manual_control2_message
¶
Bases: MAVLink_message
This message provides an API for manually controlling the
buttons are also transmit as boolean values of their
MAVLink_local_position_message
¶
Bases: MAVLink_message
Msg report flight data .
fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames
class-attribute
instance-attribute
¶
fieldtypes
class-attribute
instance-attribute
¶
fieldunits_by_name
class-attribute
instance-attribute
¶
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'}
MAVLink_optitrack_message
¶
MAVLink_autopilot_version_message
¶
Bases: MAVLink_message
Msg report autopilot version and producd id .
MAVLink_position_control_setpoint_message
¶
Bases: MAVLink_message
Msg from vision control pilot .
MAVLink_app_heartbeat_message
¶
MAVLink_report_flight_data_message
¶
Bases: MAVLink_message
Msg report flight data .
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn', 'baro_alt']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['baro_alt', 'roll', 'pitch', 'yaw', 'accx', 'accy', 'accz', 'vel_x', 'vel_y', 'vel_z', 'x', 'y', 'z', 'distance', 'barrier', 'battery_volumn']
fieldtypes
class-attribute
instance-attribute
¶
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']
fieldunits_by_name
class-attribute
instance-attribute
¶
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'}
native_format
class-attribute
instance-attribute
¶
orders
class-attribute
instance-attribute
¶
lengths
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_report_stats_message
¶
Bases: MAVLink_message
Msg report pilot status.
fieldnames
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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']
native_format
class-attribute
instance-attribute
¶
orders
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
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]
unpacker
class-attribute
instance-attribute
¶
MAVLink_formation_cmd_message
¶
Bases: MAVLink_message
Send a formation cmd with parameters to the MAV.
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['param1', 'param2', 'param3', 'param4', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['param3', 'param4', 'param1', 'param2', 'x', 'y', 'z', 'yaw', 'start_id', 'end_id', 'token', 'cmd', 'ack', 'type']
fieldtypes
class-attribute
instance-attribute
¶
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']
fieldunits_by_name
class-attribute
instance-attribute
¶
native_format
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_formation_cmd_ack_message
¶
Bases: MAVLink_message
Report status of a formation cmd.
MAVLink_console_message
¶
MAVLink_statustext_message
¶
Bases: MAVLink_message
Status text message.
MAVLink_file_response_info_message
¶
Bases: MAVLink_message
the mavlink is file reponse info
ordered_fieldnames
class-attribute
instance-attribute
¶
MAVLink_wifi_sets_message
¶
Bases: MAVLink_message
the mavlink is wifi settings
MAVLink_color_track_target_message
¶
Bases: MAVLink_message
color track target
MAVLink_color_track_target_ret_message
¶
Bases: MAVLink_message
color track target ret
MAVLink_line_walking_message
¶
Bases: MAVLink_message
line walking
MAVLink_file_heads_message
¶
Bases: MAVLink_message
the mavlink is file heads
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['token', 'file_type', 'file_size', 'plane_id', 'info', 'array', 'version', 'md5', 'file_name']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['token', 'file_size', 'info', 'array', 'plane_id', 'file_type', 'version', 'md5', 'file_name']
fieldtypes
class-attribute
instance-attribute
¶
fieldtypes = ['uint32_t', 'uint8_t', 'uint32_t', 'uint16_t', 'float', 'float', 'uint8_t', 'uint8_t', 'char']
MAVLink_plane_ack_message
¶
Bases: MAVLink_message
the mavlink is plane ack command
MAVLink_plane_command_message
¶
Bases: MAVLink_message
the mavlink is plane command
MAVLink_plane_ack_extend_message
¶
Bases: MAVLink_message
the mavlink is plane ack command extend
MAVLink_plane_status_message
¶
Bases: MAVLink_message
the mavlink is plane status
fieldnames
class-attribute
instance-attribute
¶
fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
ordered_fieldnames
class-attribute
instance-attribute
¶
ordered_fieldnames = ['capacity', 'remaining', 'occupied', 'plane_id', 'rtp', 'dsp', 'qr', 'video', 'laser', 'pitch', 'line', 'wifi', 'extend']
fieldtypes
class-attribute
instance-attribute
¶
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']
native_format
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_broadcast_plane_status_message
¶
Bases: MAVLink_message
broadcast mavlink plane status
MAVLink_qrrecognite_deal_message
¶
Bases: MAVLink_message
qr recognite deal
fieldnames
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
fieldtypes = ['double', 'float', 'float', 'int32_t', 'int32_t', 'float', 'float', 'float', 'float', 'uint8_t', 'int8_t', 'int8_t']
native_format
class-attribute
instance-attribute
¶
array_lengths
class-attribute
instance-attribute
¶
MAVLink_colorrecog_message
¶
Bases: MAVLink_message
qr recognite deal
MAVLink_camera_message
¶
Bases: MAVLink_message
recognite mark
MAVString
¶
Bases: str
NUL terminated string
MAVLink_bad_data
¶
Bases: MAVLink_message
a piece of bad data in a mavlink stream
MAVLink_unknown
¶
MAVLinkSigning
¶
Bases: object
MAVLink signing state class
MAVLink
¶
Bases: object
MAVLink protocol handling class
check_signature
¶
check signature on incoming message
system_time_encode
staticmethod
¶
The system time is the time of the master clock, typically the
system_time_send
¶
The system time is the time of the master clock, typically the
manual_control_encode
staticmethod
¶
This message provides an API for manually controlling the vehicle
manual_control_send
¶
This message provides an API for manually controlling the vehicle
manual_control2_encode
staticmethod
¶
This message provides an API for manually controlling the vehicle
manual_control2_send
¶
This message provides an API for manually controlling the vehicle
local_position_encode
staticmethod
¶
Msg report flight data .
local_position_send
¶
Msg report flight data .
autopilot_version_encode
staticmethod
¶
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
¶
Msg from vision control pilot .
position_control_setpoint_send
¶
Msg from vision control pilot .
app_heartbeat_send
¶
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
¶
Report status of a formation cmd.
formation_cmd_ack_send
¶
Report status of a formation cmd.
statustext_send
¶
Status text message.
file_response_info_encode
staticmethod
¶
the mavlink is file reponse info
file_response_info_send
¶
the mavlink is file reponse info
wifi_sets_encode
staticmethod
¶
the mavlink is wifi settings
wifi_sets_send
¶
the mavlink is wifi settings
color_track_target_encode
staticmethod
¶
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
color_track_target_ret_send
¶
color track target ret
line_walking_encode
staticmethod
¶
line walking
line_walking_send
¶
line walking
file_heads_encode
staticmethod
¶
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
¶
the mavlink is plane ack command
plane_ack_send
¶
the mavlink is plane ack command
plane_command_encode
staticmethod
¶
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
¶
the mavlink is plane ack command extend
plane_ack_extend_send
¶
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 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
camera_encode
staticmethod
¶
recognite mark
camera_send
¶
recognite mark