Param

class mavsdk.param.AllParams(int_params, float_params)

Bases: object

Type collecting all integer and float parameters.

Parameters
  • int_params ([IntParam]) – Collection of all parameter names and values of type int

  • float_params ([FloatParam]) – Collection of all parameter names and values of type float

class mavsdk.param.FloatParam(name, value)

Bases: object

Type for float paramters.

Parameters
  • name (std::string) – Name of the parameter

  • value (float) – Value of the parameter

class mavsdk.param.IntParam(name, value)

Bases: object

Type for integer parameters.

Parameters
  • name (std::string) – Name of the parameter

  • value (int32_t) – Value of the parameter

class mavsdk.param.Param(async_plugin_manager)

Bases: mavsdk._base.AsyncBase

Provide raw access to get and set parameters.

Generated by dcsdkgen - MAVSDK Param API

async get_all_params()

Get all parameters.

Returns

params – Collection of all parameters

Return type

AllParams

async get_param_float(name)

Get a float parameter.

If the type is wrong, the result will be WRONG_TYPE.

Parameters

name (std::string) – Name of the parameter

Returns

value – Value of the requested parameter

Return type

float

Raises

ParamError – If the request fails. The error contains the reason for the failure.

async get_param_int(name)

Get an int parameter.

If the type is wrong, the result will be WRONG_TYPE.

Parameters

name (std::string) – Name of the parameter

Returns

value – Value of the requested parameter

Return type

int32_t

Raises

ParamError – If the request fails. The error contains the reason for the failure.

name = 'Param'
async set_param_float(name, value)

Set a float parameter.

If the type is wrong, the result will be WRONG_TYPE.

Parameters
  • name (std::string) – Name of the parameter to set

  • value (float) – Value the parameter should be set to

Raises

ParamError – If the request fails. The error contains the reason for the failure.

async set_param_int(name, value)

Set an int parameter.

If the type is wrong, the result will be WRONG_TYPE.

Parameters
  • name (std::string) – Name of the parameter to set

  • value (int32_t) – Value the parameter should be set to

Raises

ParamError – If the request fails. The error contains the reason for the failure.

exception mavsdk.param.ParamError(result, origin, *params)

Bases: Exception

Raised when a ParamResult is a fail code

class mavsdk.param.ParamResult(result, result_str)

Bases: object

Result type.

Parameters
  • result (Result) – Result enum value

  • result_str (std::string) – Human-readable English string describing the result

class Result(value)

Bases: enum.Enum

Possible results returned for param requests.

UNKNOWN

Unknown result

SUCCESS

Request succeeded

TIMEOUT

Request timed out

CONNECTION_ERROR

Connection error

WRONG_TYPE

Wrong type

PARAM_NAME_TOO_LONG

Parameter name too long (> 16)

CONNECTION_ERROR = 3
PARAM_NAME_TOO_LONG = 5
SUCCESS = 1
TIMEOUT = 2
UNKNOWN = 0
WRONG_TYPE = 4