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 Dec 4, 2024
1 parent 967fc9d commit a63b96f
Show file tree
Hide file tree
Showing 56 changed files with 1,281 additions and 2 deletions.
9 changes: 9 additions & 0 deletions pkg/dialects/all/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ var dial = &dialect.Dialect{
// icarous
&MessageIcarousHeartbeat{},
&MessageIcarousKinematicBands{},
// loweheiser
&MessageLoweheiserGovEfi{},
// cubepilot
&MessageCubepilotRawRc{},
&MessageHerelinkVideoStreamInformation{},
Expand Down Expand Up @@ -317,6 +319,8 @@ var dial = &dialect.Dialect{
&MessageDeviceOpReadReply{},
&MessageDeviceOpWrite{},
&MessageDeviceOpWriteReply{},
&MessageSecureCommand{},
&MessageSecureCommandReply{},
&MessageAdapTuning{},
&MessageVisionPositionDelta{},
&MessageAoaSsa{},
Expand All @@ -330,6 +334,11 @@ var dial = &dialect.Dialect{
&MessageObstacleDistance_3d{},
&MessageWaterDepth{},
&MessageMcuStatus{},
&MessageEscTelemetry_13To_16{},
&MessageEscTelemetry_17To_20{},
&MessageEscTelemetry_21To_24{},
&MessageEscTelemetry_25To_28{},
&MessageEscTelemetry_29To_32{},
// asluav
&MessageCommandIntStamped{},
&MessageCommandLongStamped{},
Expand Down
2 changes: 2 additions & 0 deletions pkg/dialects/all/enum_ekf_status_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const (
EKF_PRED_POS_HORIZ_REL EKF_STATUS_FLAGS = ardupilotmega.EKF_PRED_POS_HORIZ_REL
// Set if EKF's predicted horizontal position (absolute) estimate is good.
EKF_PRED_POS_HORIZ_ABS EKF_STATUS_FLAGS = ardupilotmega.EKF_PRED_POS_HORIZ_ABS
// Set if EKF believes the GPS input data is faulty.
EKF_GPS_GLITCHING EKF_STATUS_FLAGS = ardupilotmega.EKF_GPS_GLITCHING
// Set if EKF has never been healthy.
EKF_UNINITIALIZED EKF_STATUS_FLAGS = ardupilotmega.EKF_UNINITIALIZED
)
1 change: 1 addition & 0 deletions pkg/dialects/all/enum_heading_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ type HEADING_TYPE = ardupilotmega.HEADING_TYPE
const (
HEADING_TYPE_COURSE_OVER_GROUND HEADING_TYPE = ardupilotmega.HEADING_TYPE_COURSE_OVER_GROUND
HEADING_TYPE_HEADING HEADING_TYPE = ardupilotmega.HEADING_TYPE_HEADING
HEADING_TYPE_DEFAULT HEADING_TYPE = ardupilotmega.HEADING_TYPE_DEFAULT
)
8 changes: 8 additions & 0 deletions pkg/dialects/all/enum_mav_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ const (
MAV_CMD_USER_5 MAV_CMD = 31014
// Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages
MAV_CMD_CAN_FORWARD MAV_CMD = 32000
// Set Loweheiser desired states
MAV_CMD_LOWEHEISER_SET_STATE MAV_CMD = 10151
// Set the distance to be repeated on mission resume
MAV_CMD_DO_SET_RESUME_REPEAT_DIST MAV_CMD = 215
// Control attached liquid sprayer
Expand Down Expand Up @@ -463,6 +465,8 @@ const (
MAV_CMD_GUIDED_CHANGE_ALTITUDE MAV_CMD = 43001
// Change to target heading at a given rate, overriding previous heading/s. This slews the vehicle at a controllable rate between it's previous heading and the new one. (affects GUIDED only. Exiting GUIDED returns aircraft to normal behaviour defined elsewhere. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.)
MAV_CMD_GUIDED_CHANGE_HEADING MAV_CMD = 43002
// Provide a value for height above ground level. This can be used for things like fixed wing and VTOL landing.
MAV_CMD_SET_HAGL MAV_CMD = 43005
// Mission command to reset Maximum Power Point Tracker (MPPT)
MAV_CMD_RESET_MPPT MAV_CMD = 40001
// Mission command to perform a power cycle on payload
Expand Down Expand Up @@ -708,6 +712,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{
MAV_CMD_USER_4: "MAV_CMD_USER_4",
MAV_CMD_USER_5: "MAV_CMD_USER_5",
MAV_CMD_CAN_FORWARD: "MAV_CMD_CAN_FORWARD",
MAV_CMD_LOWEHEISER_SET_STATE: "MAV_CMD_LOWEHEISER_SET_STATE",
MAV_CMD_DO_SET_RESUME_REPEAT_DIST: "MAV_CMD_DO_SET_RESUME_REPEAT_DIST",
MAV_CMD_DO_SPRAYER: "MAV_CMD_DO_SPRAYER",
MAV_CMD_DO_SEND_SCRIPT_MESSAGE: "MAV_CMD_DO_SEND_SCRIPT_MESSAGE",
Expand Down Expand Up @@ -739,6 +744,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{
MAV_CMD_GUIDED_CHANGE_SPEED: "MAV_CMD_GUIDED_CHANGE_SPEED",
MAV_CMD_GUIDED_CHANGE_ALTITUDE: "MAV_CMD_GUIDED_CHANGE_ALTITUDE",
MAV_CMD_GUIDED_CHANGE_HEADING: "MAV_CMD_GUIDED_CHANGE_HEADING",
MAV_CMD_SET_HAGL: "MAV_CMD_SET_HAGL",
MAV_CMD_RESET_MPPT: "MAV_CMD_RESET_MPPT",
MAV_CMD_PAYLOAD_CONTROL: "MAV_CMD_PAYLOAD_CONTROL",
MAV_CMD_DO_FIGURE_EIGHT: "MAV_CMD_DO_FIGURE_EIGHT",
Expand Down Expand Up @@ -927,6 +933,7 @@ var values_MAV_CMD = map[string]MAV_CMD{
"MAV_CMD_USER_4": MAV_CMD_USER_4,
"MAV_CMD_USER_5": MAV_CMD_USER_5,
"MAV_CMD_CAN_FORWARD": MAV_CMD_CAN_FORWARD,
"MAV_CMD_LOWEHEISER_SET_STATE": MAV_CMD_LOWEHEISER_SET_STATE,
"MAV_CMD_DO_SET_RESUME_REPEAT_DIST": MAV_CMD_DO_SET_RESUME_REPEAT_DIST,
"MAV_CMD_DO_SPRAYER": MAV_CMD_DO_SPRAYER,
"MAV_CMD_DO_SEND_SCRIPT_MESSAGE": MAV_CMD_DO_SEND_SCRIPT_MESSAGE,
Expand Down Expand Up @@ -958,6 +965,7 @@ var values_MAV_CMD = map[string]MAV_CMD{
"MAV_CMD_GUIDED_CHANGE_SPEED": MAV_CMD_GUIDED_CHANGE_SPEED,
"MAV_CMD_GUIDED_CHANGE_ALTITUDE": MAV_CMD_GUIDED_CHANGE_ALTITUDE,
"MAV_CMD_GUIDED_CHANGE_HEADING": MAV_CMD_GUIDED_CHANGE_HEADING,
"MAV_CMD_SET_HAGL": MAV_CMD_SET_HAGL,
"MAV_CMD_RESET_MPPT": MAV_CMD_RESET_MPPT,
"MAV_CMD_PAYLOAD_CONTROL": MAV_CMD_PAYLOAD_CONTROL,
"MAV_CMD_DO_FIGURE_EIGHT": MAV_CMD_DO_FIGURE_EIGHT,
Expand Down
4 changes: 4 additions & 0 deletions pkg/dialects/all/enum_rally_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ const (
FAVORABLE_WIND RALLY_FLAGS = ardupilotmega.FAVORABLE_WIND
// Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land.
LAND_IMMEDIATELY RALLY_FLAGS = ardupilotmega.LAND_IMMEDIATELY
// True if the following altitude frame value is valid.
ALT_FRAME_VALID RALLY_FLAGS = ardupilotmega.ALT_FRAME_VALID
// 2 bit value representing altitude frame. 0: absolute, 1: relative home, 2: relative origin, 3: relative terrain
ALT_FRAME RALLY_FLAGS = ardupilotmega.ALT_FRAME
)
28 changes: 28 additions & 0 deletions pkg/dialects/all/enum_secure_command_op.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package all

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

type SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_OP

const (
// Get an 8 byte session key which is used for remote secure updates which operate on flight controller data such as bootloader public keys. Return data will be 8 bytes on success. The session key remains valid until either the flight controller reboots or another SECURE_COMMAND_GET_SESSION_KEY is run.
SECURE_COMMAND_GET_SESSION_KEY SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_GET_SESSION_KEY
// Get an 8 byte session key which is used for remote secure updates which operate on RemoteID module data. Return data will be 8 bytes on success. The session key remains valid until either the remote ID module reboots or another SECURE_COMMAND_GET_REMOTEID_SESSION_KEY is run.
SECURE_COMMAND_GET_REMOTEID_SESSION_KEY SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_GET_REMOTEID_SESSION_KEY
// Remove range of public keys from the bootloader. Command data consists of two bytes, first byte if index of first public key to remove. Second byte is the number of keys to remove. If all keys are removed then secure boot is disabled and insecure firmware can be loaded.
SECURE_COMMAND_REMOVE_PUBLIC_KEYS SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_REMOVE_PUBLIC_KEYS
// Get current public keys from the bootloader. Command data consists of two bytes, first byte is index of first public key to fetch, 2nd byte is number of keys to fetch. Total data needs to fit in data portion of reply (max 6 keys for 32 byte keys). Reply data has the index of the first key in the first byte, followed by the keys. Returned keys may be less than the number of keys requested if there are less keys installed than requested.
SECURE_COMMAND_GET_PUBLIC_KEYS SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_GET_PUBLIC_KEYS
// Set current public keys in the bootloader. Data consists of a one byte public key index followed by the public keys. With 32 byte keys this allows for up to 6 keys to be set in one request. Keys outside of the range that is being set will remain unchanged.
SECURE_COMMAND_SET_PUBLIC_KEYS SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_SET_PUBLIC_KEYS
// Get config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details.
SECURE_COMMAND_GET_REMOTEID_CONFIG SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_GET_REMOTEID_CONFIG
// Set config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details.
SECURE_COMMAND_SET_REMOTEID_CONFIG SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_SET_REMOTEID_CONFIG
// Flash bootloader from local storage. Data is the filename to use for the bootloader. This is intended to be used with MAVFtp to upload a new bootloader to a microSD before flashing.
SECURE_COMMAND_FLASH_BOOTLOADER SECURE_COMMAND_OP = ardupilotmega.SECURE_COMMAND_FLASH_BOOTLOADER
)
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_esc_telemetry_13_to_16.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/ardupilotmega"
)

// ESC Telemetry Data for ESCs 13 to 16, matching data sent by BLHeli ESCs.
type MessageEscTelemetry_13To_16 = ardupilotmega.MessageEscTelemetry_13To_16
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_esc_telemetry_17_to_20.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/ardupilotmega"
)

// ESC Telemetry Data for ESCs 17 to 20, matching data sent by BLHeli ESCs.
type MessageEscTelemetry_17To_20 = ardupilotmega.MessageEscTelemetry_17To_20
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_esc_telemetry_21_to_24.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/ardupilotmega"
)

// ESC Telemetry Data for ESCs 21 to 24, matching data sent by BLHeli ESCs.
type MessageEscTelemetry_21To_24 = ardupilotmega.MessageEscTelemetry_21To_24
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_esc_telemetry_25_to_28.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/ardupilotmega"
)

// ESC Telemetry Data for ESCs 25 to 28, matching data sent by BLHeli ESCs.
type MessageEscTelemetry_25To_28 = ardupilotmega.MessageEscTelemetry_25To_28
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_esc_telemetry_29_to_32.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/ardupilotmega"
)

// ESC Telemetry Data for ESCs 29 to 32, matching data sent by BLHeli ESCs.
type MessageEscTelemetry_29To_32 = ardupilotmega.MessageEscTelemetry_29To_32
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_loweheiser_gov_efi.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/loweheiser"
)

// Composite EFI and Governor data from Loweheiser equipment. This message is created by the EFI unit based on its own data and data received from a governor attached to that EFI unit.
type MessageLoweheiserGovEfi = loweheiser.MessageLoweheiserGovEfi
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_secure_command.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/ardupilotmega"
)

// Send a secure command. Data should be signed with a private key corresponding with a public key known to the recipient. Signature should be over the concatenation of the sequence number (little-endian format), the operation (little-endian format) the data and the session key. For SECURE_COMMAND_GET_SESSION_KEY the session key should be zero length. The data array consists of the data followed by the signature. The sum of the data_length and the sig_length cannot be more than 220. The format of the data is command specific.
type MessageSecureCommand = ardupilotmega.MessageSecureCommand
10 changes: 10 additions & 0 deletions pkg/dialects/all/message_secure_command_reply.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/ardupilotmega"
)

// Reply from secure command.
type MessageSecureCommandReply = ardupilotmega.MessageSecureCommandReply
9 changes: 9 additions & 0 deletions pkg/dialects/ardupilotmega/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ var dial = &dialect.Dialect{
// icarous
&MessageIcarousHeartbeat{},
&MessageIcarousKinematicBands{},
// loweheiser
&MessageLoweheiserGovEfi{},
// cubepilot
&MessageCubepilotRawRc{},
&MessageHerelinkVideoStreamInformation{},
Expand Down Expand Up @@ -317,6 +319,8 @@ var dial = &dialect.Dialect{
&MessageDeviceOpReadReply{},
&MessageDeviceOpWrite{},
&MessageDeviceOpWriteReply{},
&MessageSecureCommand{},
&MessageSecureCommandReply{},
&MessageAdapTuning{},
&MessageVisionPositionDelta{},
&MessageAoaSsa{},
Expand All @@ -330,5 +334,10 @@ var dial = &dialect.Dialect{
&MessageObstacleDistance_3d{},
&MessageWaterDepth{},
&MessageMcuStatus{},
&MessageEscTelemetry_13To_16{},
&MessageEscTelemetry_17To_20{},
&MessageEscTelemetry_21To_24{},
&MessageEscTelemetry_25To_28{},
&MessageEscTelemetry_29To_32{},
},
}
6 changes: 5 additions & 1 deletion pkg/dialects/ardupilotmega/enum_ekf_status_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const (
EKF_PRED_POS_HORIZ_REL EKF_STATUS_FLAGS = 256
// Set if EKF's predicted horizontal position (absolute) estimate is good.
EKF_PRED_POS_HORIZ_ABS EKF_STATUS_FLAGS = 512
// Set if EKF believes the GPS input data is faulty.
EKF_GPS_GLITCHING EKF_STATUS_FLAGS = 32768
// Set if EKF has never been healthy.
EKF_UNINITIALIZED EKF_STATUS_FLAGS = 1024
)
Expand All @@ -47,6 +49,7 @@ var labels_EKF_STATUS_FLAGS = map[EKF_STATUS_FLAGS]string{
EKF_CONST_POS_MODE: "EKF_CONST_POS_MODE",
EKF_PRED_POS_HORIZ_REL: "EKF_PRED_POS_HORIZ_REL",
EKF_PRED_POS_HORIZ_ABS: "EKF_PRED_POS_HORIZ_ABS",
EKF_GPS_GLITCHING: "EKF_GPS_GLITCHING",
EKF_UNINITIALIZED: "EKF_UNINITIALIZED",
}

Expand All @@ -61,6 +64,7 @@ var values_EKF_STATUS_FLAGS = map[string]EKF_STATUS_FLAGS{
"EKF_CONST_POS_MODE": EKF_CONST_POS_MODE,
"EKF_PRED_POS_HORIZ_REL": EKF_PRED_POS_HORIZ_REL,
"EKF_PRED_POS_HORIZ_ABS": EKF_PRED_POS_HORIZ_ABS,
"EKF_GPS_GLITCHING": EKF_GPS_GLITCHING,
"EKF_UNINITIALIZED": EKF_UNINITIALIZED,
}

Expand All @@ -70,7 +74,7 @@ func (e EKF_STATUS_FLAGS) MarshalText() ([]byte, error) {
return []byte("0"), nil
}
var names []string
for i := 0; i < 11; i++ {
for i := 0; i < 12; i++ {
mask := EKF_STATUS_FLAGS(1 << i)
if e&mask == mask {
names = append(names, labels_EKF_STATUS_FLAGS[mask])
Expand Down
3 changes: 3 additions & 0 deletions pkg/dialects/ardupilotmega/enum_heading_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ type HEADING_TYPE uint64
const (
HEADING_TYPE_COURSE_OVER_GROUND HEADING_TYPE = 0
HEADING_TYPE_HEADING HEADING_TYPE = 1
HEADING_TYPE_DEFAULT HEADING_TYPE = 2
)

var labels_HEADING_TYPE = map[HEADING_TYPE]string{
HEADING_TYPE_COURSE_OVER_GROUND: "HEADING_TYPE_COURSE_OVER_GROUND",
HEADING_TYPE_HEADING: "HEADING_TYPE_HEADING",
HEADING_TYPE_DEFAULT: "HEADING_TYPE_DEFAULT",
}

var values_HEADING_TYPE = map[string]HEADING_TYPE{
"HEADING_TYPE_COURSE_OVER_GROUND": HEADING_TYPE_COURSE_OVER_GROUND,
"HEADING_TYPE_HEADING": HEADING_TYPE_HEADING,
"HEADING_TYPE_DEFAULT": HEADING_TYPE_DEFAULT,
}

// MarshalText implements the encoding.TextMarshaler interface.
Expand Down
8 changes: 8 additions & 0 deletions pkg/dialects/ardupilotmega/enum_mav_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ const (
MAV_CMD_USER_5 MAV_CMD = 31014
// Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages
MAV_CMD_CAN_FORWARD MAV_CMD = 32000
// Set Loweheiser desired states
MAV_CMD_LOWEHEISER_SET_STATE MAV_CMD = 10151
// Set the distance to be repeated on mission resume
MAV_CMD_DO_SET_RESUME_REPEAT_DIST MAV_CMD = 215
// Control attached liquid sprayer
Expand Down Expand Up @@ -463,6 +465,8 @@ const (
MAV_CMD_GUIDED_CHANGE_ALTITUDE MAV_CMD = 43001
// Change to target heading at a given rate, overriding previous heading/s. This slews the vehicle at a controllable rate between it's previous heading and the new one. (affects GUIDED only. Exiting GUIDED returns aircraft to normal behaviour defined elsewhere. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.)
MAV_CMD_GUIDED_CHANGE_HEADING MAV_CMD = 43002
// Provide a value for height above ground level. This can be used for things like fixed wing and VTOL landing.
MAV_CMD_SET_HAGL MAV_CMD = 43005
)

var labels_MAV_CMD = map[MAV_CMD]string{
Expand Down Expand Up @@ -630,6 +634,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{
MAV_CMD_USER_4: "MAV_CMD_USER_4",
MAV_CMD_USER_5: "MAV_CMD_USER_5",
MAV_CMD_CAN_FORWARD: "MAV_CMD_CAN_FORWARD",
MAV_CMD_LOWEHEISER_SET_STATE: "MAV_CMD_LOWEHEISER_SET_STATE",
MAV_CMD_DO_SET_RESUME_REPEAT_DIST: "MAV_CMD_DO_SET_RESUME_REPEAT_DIST",
MAV_CMD_DO_SPRAYER: "MAV_CMD_DO_SPRAYER",
MAV_CMD_DO_SEND_SCRIPT_MESSAGE: "MAV_CMD_DO_SEND_SCRIPT_MESSAGE",
Expand Down Expand Up @@ -661,6 +666,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{
MAV_CMD_GUIDED_CHANGE_SPEED: "MAV_CMD_GUIDED_CHANGE_SPEED",
MAV_CMD_GUIDED_CHANGE_ALTITUDE: "MAV_CMD_GUIDED_CHANGE_ALTITUDE",
MAV_CMD_GUIDED_CHANGE_HEADING: "MAV_CMD_GUIDED_CHANGE_HEADING",
MAV_CMD_SET_HAGL: "MAV_CMD_SET_HAGL",
}

var values_MAV_CMD = map[string]MAV_CMD{
Expand Down Expand Up @@ -828,6 +834,7 @@ var values_MAV_CMD = map[string]MAV_CMD{
"MAV_CMD_USER_4": MAV_CMD_USER_4,
"MAV_CMD_USER_5": MAV_CMD_USER_5,
"MAV_CMD_CAN_FORWARD": MAV_CMD_CAN_FORWARD,
"MAV_CMD_LOWEHEISER_SET_STATE": MAV_CMD_LOWEHEISER_SET_STATE,
"MAV_CMD_DO_SET_RESUME_REPEAT_DIST": MAV_CMD_DO_SET_RESUME_REPEAT_DIST,
"MAV_CMD_DO_SPRAYER": MAV_CMD_DO_SPRAYER,
"MAV_CMD_DO_SEND_SCRIPT_MESSAGE": MAV_CMD_DO_SEND_SCRIPT_MESSAGE,
Expand Down Expand Up @@ -859,6 +866,7 @@ var values_MAV_CMD = map[string]MAV_CMD{
"MAV_CMD_GUIDED_CHANGE_SPEED": MAV_CMD_GUIDED_CHANGE_SPEED,
"MAV_CMD_GUIDED_CHANGE_ALTITUDE": MAV_CMD_GUIDED_CHANGE_ALTITUDE,
"MAV_CMD_GUIDED_CHANGE_HEADING": MAV_CMD_GUIDED_CHANGE_HEADING,
"MAV_CMD_SET_HAGL": MAV_CMD_SET_HAGL,
}

// MarshalText implements the encoding.TextMarshaler interface.
Expand Down
10 changes: 9 additions & 1 deletion pkg/dialects/ardupilotmega/enum_rally_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@ const (
FAVORABLE_WIND RALLY_FLAGS = 1
// Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land.
LAND_IMMEDIATELY RALLY_FLAGS = 2
// True if the following altitude frame value is valid.
ALT_FRAME_VALID RALLY_FLAGS = 4
// 2 bit value representing altitude frame. 0: absolute, 1: relative home, 2: relative origin, 3: relative terrain
ALT_FRAME RALLY_FLAGS = 24
)

var labels_RALLY_FLAGS = map[RALLY_FLAGS]string{
FAVORABLE_WIND: "FAVORABLE_WIND",
LAND_IMMEDIATELY: "LAND_IMMEDIATELY",
ALT_FRAME_VALID: "ALT_FRAME_VALID",
ALT_FRAME: "ALT_FRAME",
}

var values_RALLY_FLAGS = map[string]RALLY_FLAGS{
"FAVORABLE_WIND": FAVORABLE_WIND,
"LAND_IMMEDIATELY": LAND_IMMEDIATELY,
"ALT_FRAME_VALID": ALT_FRAME_VALID,
"ALT_FRAME": ALT_FRAME,
}

// MarshalText implements the encoding.TextMarshaler interface.
Expand All @@ -34,7 +42,7 @@ func (e RALLY_FLAGS) MarshalText() ([]byte, error) {
return []byte("0"), nil
}
var names []string
for i := 0; i < 2; i++ {
for i := 0; i < 4; i++ {
mask := RALLY_FLAGS(1 << i)
if e&mask == mask {
names = append(names, labels_RALLY_FLAGS[mask])
Expand Down
Loading

0 comments on commit a63b96f

Please sign in to comment.