Skip to content

Commit

Permalink
(automatic) update dialects to rev https://github.com/mavlink/mavlink…
Browse files Browse the repository at this point in the history
  • Loading branch information
gomavlib-bot committed Nov 7, 2024
1 parent 277e1b6 commit a0b7119
Show file tree
Hide file tree
Showing 62 changed files with 602 additions and 70 deletions.
1 change: 1 addition & 0 deletions pkg/dialects/all/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ var dial = &dialect.Dialect{
&MessageGnssIntegrity{},
&MessageTargetAbsolute{},
&MessageTargetRelative{},
&MessageControlStatus{},
// pythonarraytest
&MessageArrayTest_0{},
&MessageArrayTest_1{},
Expand Down
17 changes: 17 additions & 0 deletions pkg/dialects/all/enum_gcs_control_status_flags.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package all

import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/development"
)

// CONTROL_STATUS flags.
type GCS_CONTROL_STATUS_FLAGS = development.GCS_CONTROL_STATUS_FLAGS

const (
// If set, this CONTROL_STATUS publishes the controlling GCS for the whole system. If unset, the CONTROL_STATUS indicates the controlling GCS for just the component emitting the message. Note that to request control of the system a GCS should send MAV_CMD_REQUEST_OPERATOR_CONTROL to the component emitting CONTROL_STATUS with this flag set.
GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER GCS_CONTROL_STATUS_FLAGS = development.GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER
// Takeover allowed (requests for control will be granted). If not set requests for control will be rejected, but the controlling GCS will be notified (and may release control or allow takeover).
GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED GCS_CONTROL_STATUS_FLAGS = development.GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED
)
25 changes: 25 additions & 0 deletions pkg/dialects/all/enum_mav_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,29 @@ const (
// Set an external estimate of wind direction and speed.
// This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself.
MAV_CMD_EXTERNAL_WIND_ESTIMATE MAV_CMD = 43004
// Request GCS control of a system (or of a specific component in a system).
// A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id.
// Commands from other systems should be rejected with MAV_RESULT_PERMISSION_DENIED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted).
// Command-like messages should be ignored (or rejected if that is supported by their associated protocol).
// GCS control of the whole system is managed via a single component that we will refer to here as the "system manager component".
// This component streams the CONTROL_STATUS message and sets the GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER flag.
// Other components in the system should monitor for the CONTROL_STATUS message with this flag, and set their controlling GCS to match its published system id.
// A GCS that wants to control the system should also monitor for the same message and flag, and address the MAV_CMD_REQUEST_OPERATOR_CONTROL to its component id.
// Note that integrators are required to ensure that there is only one system manager component in the system (i.e. one component emitting the message with GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER set).
// The MAV_CMD_REQUEST_OPERATOR_CONTROL command is sent by a GCS to the system manager component to request or release control of a system, specifying whether subsequent takeover requests from another GCS are automatically granted, or require permission.
// The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with MAV_RESULT_ACCEPTED.
// The system manager component should then stream CONTROL_STATUS indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component.
// If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_PERMISSION_DENIED.
// The system manager component should then send this same command to the current owning GCS in order to notify of the request.
// The owning GCS would ACK with MAV_RESULT_ACCEPTED, and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.
// Note that the pilots of both GCS should co-ordinate safe handover offline.
// Note that in most systems the only controlled component will be the "system manager component", and that will be the autopilot.
// However separate GCS control of a particular component is also permitted, if supported by the component.
// In this case the GCS will address MAV_CMD_REQUEST_OPERATOR_CONTROL to the specific component it wants to control.
// The component will then stream CONTROL_STATUS for its controlling GCS (it must not set GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER).
// The component should fall back to the system GCS (if any) when it is not directly controlled, and may stop emitting CONTROL_STATUS.
// The flow is otherwise the same as for requesting control over the whole system.
MAV_CMD_REQUEST_OPERATOR_CONTROL MAV_CMD = 43005
// Command to a gimbal manager to control the gimbal tilt and pan angles. It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. A gimbal device is never to react to this command.
MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW MAV_CMD = 60002
// Command to configure a gimbal manager. A gimbal device is never to react to this command. The selected profile is reported in the STORM32_GIMBAL_MANAGER_STATUS message.
Expand Down Expand Up @@ -737,6 +760,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{
MAV_CMD_DO_SET_SYS_CMP_ID: "MAV_CMD_DO_SET_SYS_CMP_ID",
MAV_CMD_ODID_SET_EMERGENCY: "MAV_CMD_ODID_SET_EMERGENCY",
MAV_CMD_EXTERNAL_WIND_ESTIMATE: "MAV_CMD_EXTERNAL_WIND_ESTIMATE",
MAV_CMD_REQUEST_OPERATOR_CONTROL: "MAV_CMD_REQUEST_OPERATOR_CONTROL",
MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW: "MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW",
MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP: "MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP",
MAV_CMD_QSHOT_DO_CONFIGURE: "MAV_CMD_QSHOT_DO_CONFIGURE",
Expand Down Expand Up @@ -957,6 +981,7 @@ var values_MAV_CMD = map[string]MAV_CMD{
"MAV_CMD_DO_SET_SYS_CMP_ID": MAV_CMD_DO_SET_SYS_CMP_ID,
"MAV_CMD_ODID_SET_EMERGENCY": MAV_CMD_ODID_SET_EMERGENCY,
"MAV_CMD_EXTERNAL_WIND_ESTIMATE": MAV_CMD_EXTERNAL_WIND_ESTIMATE,
"MAV_CMD_REQUEST_OPERATOR_CONTROL": MAV_CMD_REQUEST_OPERATOR_CONTROL,
"MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW": MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW,
"MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP": MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP,
"MAV_CMD_QSHOT_DO_CONFIGURE": MAV_CMD_QSHOT_DO_CONFIGURE,
Expand Down
2 changes: 2 additions & 0 deletions pkg/dialects/all/enum_mav_protocol_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ const (
MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST
// This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER
// Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL).
MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL
)
2 changes: 2 additions & 0 deletions pkg/dialects/all/enum_mav_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ const (
MAV_RESULT_COMMAND_INT_ONLY MAV_RESULT = common.MAV_RESULT_COMMAND_INT_ONLY
// Command is invalid because a frame is required and the specified frame is not supported.
MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME MAV_RESULT = common.MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME
// Sender is not authorized to control this MAV component. Control may be requested using MAV_CMD_REQUEST_OPERATOR_CONTROL.
MAV_RESULT_PERMISSION_DENIED MAV_RESULT = common.MAV_RESULT_PERMISSION_DENIED
)
19 changes: 19 additions & 0 deletions pkg/dialects/all/enum_rc_sub_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package all

import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE.
type RC_SUB_TYPE = common.RC_SUB_TYPE

const (
// Spektrum DSM2
RC_SUB_TYPE_SPEKTRUM_DSM2 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_SUB_TYPE_SPEKTRUM_DSMX RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX
// Spektrum DSMX8
RC_SUB_TYPE_SPEKTRUM_DSMX8 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX8
)
10 changes: 5 additions & 5 deletions pkg/dialects/all/enum_rc_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC type
// RC type. Used in MAV_CMD_START_RX_PAIR.
type RC_TYPE = common.RC_TYPE

const (
// Spektrum DSM2
RC_TYPE_SPEKTRUM_DSM2 RC_TYPE = common.RC_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_TYPE_SPEKTRUM_DSMX RC_TYPE = common.RC_TYPE_SPEKTRUM_DSMX
// Spektrum
RC_TYPE_SPEKTRUM RC_TYPE = common.RC_TYPE_SPEKTRUM
// CRSF
RC_TYPE_CRSF RC_TYPE = common.RC_TYPE_CRSF
)
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_control_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll
package all

import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/development"
)

// Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL.
type MessageControlStatus = development.MessageControlStatus
2 changes: 2 additions & 0 deletions pkg/dialects/ardupilotmega/enum_mav_protocol_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ const (
MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST
// This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER
// Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL).
MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL
)
2 changes: 2 additions & 0 deletions pkg/dialects/ardupilotmega/enum_mav_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ const (
MAV_RESULT_COMMAND_INT_ONLY MAV_RESULT = common.MAV_RESULT_COMMAND_INT_ONLY
// Command is invalid because a frame is required and the specified frame is not supported.
MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME MAV_RESULT = common.MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME
// Sender is not authorized to control this MAV component. Control may be requested using MAV_CMD_REQUEST_OPERATOR_CONTROL.
MAV_RESULT_PERMISSION_DENIED MAV_RESULT = common.MAV_RESULT_PERMISSION_DENIED
)
19 changes: 19 additions & 0 deletions pkg/dialects/ardupilotmega/enum_rc_sub_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package ardupilotmega

import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE.
type RC_SUB_TYPE = common.RC_SUB_TYPE

const (
// Spektrum DSM2
RC_SUB_TYPE_SPEKTRUM_DSM2 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_SUB_TYPE_SPEKTRUM_DSMX RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX
// Spektrum DSMX8
RC_SUB_TYPE_SPEKTRUM_DSMX8 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX8
)
10 changes: 5 additions & 5 deletions pkg/dialects/ardupilotmega/enum_rc_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC type
// RC type. Used in MAV_CMD_START_RX_PAIR.
type RC_TYPE = common.RC_TYPE

const (
// Spektrum DSM2
RC_TYPE_SPEKTRUM_DSM2 RC_TYPE = common.RC_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_TYPE_SPEKTRUM_DSMX RC_TYPE = common.RC_TYPE_SPEKTRUM_DSMX
// Spektrum
RC_TYPE_SPEKTRUM RC_TYPE = common.RC_TYPE_SPEKTRUM
// CRSF
RC_TYPE_CRSF RC_TYPE = common.RC_TYPE_CRSF
)
2 changes: 2 additions & 0 deletions pkg/dialects/asluav/enum_mav_protocol_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ const (
MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST
// This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER
// Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL).
MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL
)
2 changes: 2 additions & 0 deletions pkg/dialects/asluav/enum_mav_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ const (
MAV_RESULT_COMMAND_INT_ONLY MAV_RESULT = common.MAV_RESULT_COMMAND_INT_ONLY
// Command is invalid because a frame is required and the specified frame is not supported.
MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME MAV_RESULT = common.MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME
// Sender is not authorized to control this MAV component. Control may be requested using MAV_CMD_REQUEST_OPERATOR_CONTROL.
MAV_RESULT_PERMISSION_DENIED MAV_RESULT = common.MAV_RESULT_PERMISSION_DENIED
)
19 changes: 19 additions & 0 deletions pkg/dialects/asluav/enum_rc_sub_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package asluav

import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE.
type RC_SUB_TYPE = common.RC_SUB_TYPE

const (
// Spektrum DSM2
RC_SUB_TYPE_SPEKTRUM_DSM2 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_SUB_TYPE_SPEKTRUM_DSMX RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX
// Spektrum DSMX8
RC_SUB_TYPE_SPEKTRUM_DSMX8 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX8
)
10 changes: 5 additions & 5 deletions pkg/dialects/asluav/enum_rc_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC type
// RC type. Used in MAV_CMD_START_RX_PAIR.
type RC_TYPE = common.RC_TYPE

const (
// Spektrum DSM2
RC_TYPE_SPEKTRUM_DSM2 RC_TYPE = common.RC_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_TYPE_SPEKTRUM_DSMX RC_TYPE = common.RC_TYPE_SPEKTRUM_DSMX
// Spektrum
RC_TYPE_SPEKTRUM RC_TYPE = common.RC_TYPE_SPEKTRUM
// CRSF
RC_TYPE_CRSF RC_TYPE = common.RC_TYPE_CRSF
)
2 changes: 2 additions & 0 deletions pkg/dialects/avssuas/enum_mav_protocol_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ const (
MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST
// This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER
// Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL).
MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL MAV_PROTOCOL_CAPABILITY = common.MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL
)
2 changes: 2 additions & 0 deletions pkg/dialects/avssuas/enum_mav_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ const (
MAV_RESULT_COMMAND_INT_ONLY MAV_RESULT = common.MAV_RESULT_COMMAND_INT_ONLY
// Command is invalid because a frame is required and the specified frame is not supported.
MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME MAV_RESULT = common.MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME
// Sender is not authorized to control this MAV component. Control may be requested using MAV_CMD_REQUEST_OPERATOR_CONTROL.
MAV_RESULT_PERMISSION_DENIED MAV_RESULT = common.MAV_RESULT_PERMISSION_DENIED
)
19 changes: 19 additions & 0 deletions pkg/dialects/avssuas/enum_rc_sub_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package avssuas

import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE.
type RC_SUB_TYPE = common.RC_SUB_TYPE

const (
// Spektrum DSM2
RC_SUB_TYPE_SPEKTRUM_DSM2 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_SUB_TYPE_SPEKTRUM_DSMX RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX
// Spektrum DSMX8
RC_SUB_TYPE_SPEKTRUM_DSMX8 RC_SUB_TYPE = common.RC_SUB_TYPE_SPEKTRUM_DSMX8
)
10 changes: 5 additions & 5 deletions pkg/dialects/avssuas/enum_rc_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"github.com/bluenviron/gomavlib/v3/pkg/dialects/common"
)

// RC type
// RC type. Used in MAV_CMD_START_RX_PAIR.
type RC_TYPE = common.RC_TYPE

const (
// Spektrum DSM2
RC_TYPE_SPEKTRUM_DSM2 RC_TYPE = common.RC_TYPE_SPEKTRUM_DSM2
// Spektrum DSMX
RC_TYPE_SPEKTRUM_DSMX RC_TYPE = common.RC_TYPE_SPEKTRUM_DSMX
// Spektrum
RC_TYPE_SPEKTRUM RC_TYPE = common.RC_TYPE_SPEKTRUM
// CRSF
RC_TYPE_CRSF RC_TYPE = common.RC_TYPE_CRSF
)
6 changes: 5 additions & 1 deletion pkg/dialects/common/enum_mav_protocol_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const (
MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST MAV_PROTOCOL_CAPABILITY = 131072
// This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER MAV_PROTOCOL_CAPABILITY = 262144
// Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL).
MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL MAV_PROTOCOL_CAPABILITY = 524288
)

var labels_MAV_PROTOCOL_CAPABILITY = map[MAV_PROTOCOL_CAPABILITY]string{
Expand All @@ -76,6 +78,7 @@ var labels_MAV_PROTOCOL_CAPABILITY = map[MAV_PROTOCOL_CAPABILITY]string{
MAV_PROTOCOL_CAPABILITY_RESERVED2: "MAV_PROTOCOL_CAPABILITY_RESERVED2",
MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST: "MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST",
MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER: "MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER",
MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL: "MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL",
}

var values_MAV_PROTOCOL_CAPABILITY = map[string]MAV_PROTOCOL_CAPABILITY{
Expand All @@ -98,6 +101,7 @@ var values_MAV_PROTOCOL_CAPABILITY = map[string]MAV_PROTOCOL_CAPABILITY{
"MAV_PROTOCOL_CAPABILITY_RESERVED2": MAV_PROTOCOL_CAPABILITY_RESERVED2,
"MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST": MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST,
"MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER": MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER,
"MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL": MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL,
}

// MarshalText implements the encoding.TextMarshaler interface.
Expand All @@ -106,7 +110,7 @@ func (e MAV_PROTOCOL_CAPABILITY) MarshalText() ([]byte, error) {
return []byte("0"), nil
}
var names []string
for i := 0; i < 19; i++ {
for i := 0; i < 20; i++ {
mask := MAV_PROTOCOL_CAPABILITY(1 << i)
if e&mask == mask {
names = append(names, labels_MAV_PROTOCOL_CAPABILITY[mask])
Expand Down
Loading

0 comments on commit a0b7119

Please sign in to comment.