mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:33:33 +08:00
Parameter server
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Service to control non-volatile parameter storage.
|
||||
#
|
||||
|
||||
uint2 OPCODE_SAVE = 0 # Save all parameters to non-volatile storage
|
||||
uint2 OPCODE_ERASE = 1 # Clear the non-volatile storage; actual parameter values may or may not be affected
|
||||
uint2 opcode
|
||||
|
||||
---
|
||||
|
||||
bool ok
|
||||
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Get or set a parameter by name or by index.
|
||||
#
|
||||
|
||||
# If set - parameter will be assigned this value, then the new value will be returned
|
||||
# If not set - current parameter value will be returned
|
||||
Value value
|
||||
|
||||
# Index of the parameter starting from 0; ignored if name is nonempty
|
||||
uint8 index
|
||||
|
||||
# Name of the parameter; always preferred over index if nonempty
|
||||
uint8[<=40] name
|
||||
|
||||
---
|
||||
|
||||
# Actual parameter value. For write requests it must contain the newly assigned parameter value.
|
||||
# Empty value indicates that there is no such parameter.
|
||||
Value value
|
||||
|
||||
Value default_value # Optional
|
||||
Value max_value # Optional
|
||||
Value min_value # Optional
|
||||
|
||||
# Empty name in response indicates that there is no such parameter
|
||||
uint8[<=40] name
|
||||
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Single parameter value.
|
||||
# The actual type should be detected from the available values, as described below.
|
||||
#
|
||||
|
||||
bool[<=1] value_bool # Preferred over int and float if ambiguous
|
||||
int64[<=1] value_int # Preferred over float if ambiguous
|
||||
float32[<=1] value_float
|
||||
Reference in New Issue
Block a user