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 21, 2024
1 parent 9f865a8 commit 013769a
Show file tree
Hide file tree
Showing 47 changed files with 508 additions and 250 deletions.
3 changes: 1 addition & 2 deletions pkg/dialects/all/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ var dial = &dialect.Dialect{
&MessageDebugFloatArray{},
&MessageOrbitExecutionStatus{},
&MessageSmartBatteryInfo{},
&MessageFuelStatus{},
&MessageBatteryInfo{},
&MessageGeneratorStatus{},
&MessageActuatorOutputStatus{},
Expand Down Expand Up @@ -350,12 +351,10 @@ var dial = &dialect.Dialect{
// development
&MessageParamAckTransaction{},
&MessageAirspeed{},
&MessageWifiNetworkInfo{},
&MessageSetVelocityLimits{},
&MessageVelocityLimits{},
&MessageFigureEightExecutionStatus{},
&MessageBatteryStatusV2{},
&MessageFuelStatus{},
&MessageGroupStart{},
&MessageGroupEnd{},
&MessageRadioRcChannels{},
Expand Down
14 changes: 0 additions & 14 deletions pkg/dialects/all/enum_mav_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,6 @@ const (
// The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation.
// Command protocol information: https://mavlink.io/en/services/command.html.
MAV_CMD_DO_UPGRADE MAV_CMD = 247
// Define start of a group of mission items. When control reaches this command a GROUP_START message is emitted.
// The end of a group is marked using MAV_CMD_GROUP_END with the same group id.
// Group ids are expected, but not required, to iterate sequentially.
// Groups can be nested.
MAV_CMD_GROUP_START MAV_CMD = 301
// Define end of a group of mission items. When control reaches this command a GROUP_END message is emitted.
// The start of the group is marked is marked using MAV_CMD_GROUP_START with the same group id.
// Group ids are expected, but not required, to iterate sequentially.
// Groups can be nested.
MAV_CMD_GROUP_END MAV_CMD = 302
// Enable the specified standard MAVLink mode.
// If the mode is not supported the vehicle should ACK with MAV_RESULT_FAILED.
MAV_CMD_DO_SET_STANDARD_MODE MAV_CMD = 262
Expand Down Expand Up @@ -753,8 +743,6 @@ var labels_MAV_CMD = map[MAV_CMD]string{
MAV_CMD_DO_FIGURE_EIGHT: "MAV_CMD_DO_FIGURE_EIGHT",
MAV_CMD_PARAM_TRANSACTION: "MAV_CMD_PARAM_TRANSACTION",
MAV_CMD_DO_UPGRADE: "MAV_CMD_DO_UPGRADE",
MAV_CMD_GROUP_START: "MAV_CMD_GROUP_START",
MAV_CMD_GROUP_END: "MAV_CMD_GROUP_END",
MAV_CMD_DO_SET_STANDARD_MODE: "MAV_CMD_DO_SET_STANDARD_MODE",
MAV_CMD_SET_AT_S_PARAM: "MAV_CMD_SET_AT_S_PARAM",
MAV_CMD_DO_SET_SYS_CMP_ID: "MAV_CMD_DO_SET_SYS_CMP_ID",
Expand Down Expand Up @@ -974,8 +962,6 @@ var values_MAV_CMD = map[string]MAV_CMD{
"MAV_CMD_DO_FIGURE_EIGHT": MAV_CMD_DO_FIGURE_EIGHT,
"MAV_CMD_PARAM_TRANSACTION": MAV_CMD_PARAM_TRANSACTION,
"MAV_CMD_DO_UPGRADE": MAV_CMD_DO_UPGRADE,
"MAV_CMD_GROUP_START": MAV_CMD_GROUP_START,
"MAV_CMD_GROUP_END": MAV_CMD_GROUP_END,
"MAV_CMD_DO_SET_STANDARD_MODE": MAV_CMD_DO_SET_STANDARD_MODE,
"MAV_CMD_SET_AT_S_PARAM": MAV_CMD_SET_AT_S_PARAM,
"MAV_CMD_DO_SET_SYS_CMP_ID": MAV_CMD_DO_SET_SYS_CMP_ID,
Expand Down
12 changes: 6 additions & 6 deletions pkg/dialects/all/enum_mav_fuel_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
package all

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

// Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.
type MAV_FUEL_TYPE = development.MAV_FUEL_TYPE
type MAV_FUEL_TYPE = common.MAV_FUEL_TYPE

const (
// Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1.
MAV_FUEL_TYPE_UNKNOWN MAV_FUEL_TYPE = development.MAV_FUEL_TYPE_UNKNOWN
// Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1).
MAV_FUEL_TYPE_UNKNOWN MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_UNKNOWN
// A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second.
MAV_FUEL_TYPE_LIQUID MAV_FUEL_TYPE = development.MAV_FUEL_TYPE_LIQUID
MAV_FUEL_TYPE_LIQUID MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_LIQUID
// A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).
MAV_FUEL_TYPE_GAS MAV_FUEL_TYPE = development.MAV_FUEL_TYPE_GAS
MAV_FUEL_TYPE_GAS MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_GAS
)
25 changes: 0 additions & 25 deletions pkg/dialects/all/enum_wifi_network_security.go

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/dialects/all/message_fuel_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package all

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

// Fuel status.
Expand All @@ -16,4 +16,4 @@ import (
// This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.
// If both messages are sent for the same fuel system, the ids and corresponding information must match.
// This should be streamed (nominally at 0.1 Hz).
type MessageFuelStatus = development.MessageFuelStatus
type MessageFuelStatus = common.MessageFuelStatus
10 changes: 0 additions & 10 deletions pkg/dialects/all/message_wifi_network_info.go

This file was deleted.

1 change: 1 addition & 0 deletions pkg/dialects/ardupilotmega/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ var dial = &dialect.Dialect{
&MessageDebugFloatArray{},
&MessageOrbitExecutionStatus{},
&MessageSmartBatteryInfo{},
&MessageFuelStatus{},
&MessageBatteryInfo{},
&MessageGeneratorStatus{},
&MessageActuatorOutputStatus{},
Expand Down
19 changes: 19 additions & 0 deletions pkg/dialects/ardupilotmega/enum_mav_fuel_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"
)

// Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.
type MAV_FUEL_TYPE = common.MAV_FUEL_TYPE

const (
// Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1).
MAV_FUEL_TYPE_UNKNOWN MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_UNKNOWN
// A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second.
MAV_FUEL_TYPE_LIQUID MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_LIQUID
// A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).
MAV_FUEL_TYPE_GAS MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_GAS
)
19 changes: 19 additions & 0 deletions pkg/dialects/ardupilotmega/message_fuel_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll
package ardupilotmega

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

// Fuel status.
// This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot.
// The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.
// The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.
// A recipient can assume that if these fields are supplied they are accurate.
// If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).
// Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).
// This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.
// If both messages are sent for the same fuel system, the ids and corresponding information must match.
// This should be streamed (nominally at 0.1 Hz).
type MessageFuelStatus = common.MessageFuelStatus
1 change: 1 addition & 0 deletions pkg/dialects/asluav/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ var dial = &dialect.Dialect{
&MessageDebugFloatArray{},
&MessageOrbitExecutionStatus{},
&MessageSmartBatteryInfo{},
&MessageFuelStatus{},
&MessageBatteryInfo{},
&MessageGeneratorStatus{},
&MessageActuatorOutputStatus{},
Expand Down
19 changes: 19 additions & 0 deletions pkg/dialects/asluav/enum_mav_fuel_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"
)

// Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.
type MAV_FUEL_TYPE = common.MAV_FUEL_TYPE

const (
// Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1).
MAV_FUEL_TYPE_UNKNOWN MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_UNKNOWN
// A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second.
MAV_FUEL_TYPE_LIQUID MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_LIQUID
// A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).
MAV_FUEL_TYPE_GAS MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_GAS
)
19 changes: 19 additions & 0 deletions pkg/dialects/asluav/message_fuel_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll
package asluav

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

// Fuel status.
// This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot.
// The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.
// The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.
// A recipient can assume that if these fields are supplied they are accurate.
// If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).
// Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).
// This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.
// If both messages are sent for the same fuel system, the ids and corresponding information must match.
// This should be streamed (nominally at 0.1 Hz).
type MessageFuelStatus = common.MessageFuelStatus
1 change: 1 addition & 0 deletions pkg/dialects/avssuas/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ var dial = &dialect.Dialect{
&MessageDebugFloatArray{},
&MessageOrbitExecutionStatus{},
&MessageSmartBatteryInfo{},
&MessageFuelStatus{},
&MessageBatteryInfo{},
&MessageGeneratorStatus{},
&MessageActuatorOutputStatus{},
Expand Down
19 changes: 19 additions & 0 deletions pkg/dialects/avssuas/enum_mav_fuel_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"
)

// Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.
type MAV_FUEL_TYPE = common.MAV_FUEL_TYPE

const (
// Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1).
MAV_FUEL_TYPE_UNKNOWN MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_UNKNOWN
// A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second.
MAV_FUEL_TYPE_LIQUID MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_LIQUID
// A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).
MAV_FUEL_TYPE_GAS MAV_FUEL_TYPE = common.MAV_FUEL_TYPE_GAS
)
19 changes: 19 additions & 0 deletions pkg/dialects/avssuas/message_fuel_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll
package avssuas

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

// Fuel status.
// This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot.
// The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.
// The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.
// A recipient can assume that if these fields are supplied they are accurate.
// If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).
// Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).
// This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.
// If both messages are sent for the same fuel system, the ids and corresponding information must match.
// This should be streamed (nominally at 0.1 Hz).
type MessageFuelStatus = common.MessageFuelStatus
1 change: 1 addition & 0 deletions pkg/dialects/common/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ var dial = &dialect.Dialect{
&MessageDebugFloatArray{},
&MessageOrbitExecutionStatus{},
&MessageSmartBatteryInfo{},
&MessageFuelStatus{},
&MessageBatteryInfo{},
&MessageGeneratorStatus{},
&MessageActuatorOutputStatus{},
Expand Down
58 changes: 58 additions & 0 deletions pkg/dialects/common/enum_mav_fuel_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll,dupl,gocritic
package common

import (
"fmt"
"strconv"
)

// Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.
type MAV_FUEL_TYPE uint64

const (
// Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1).
MAV_FUEL_TYPE_UNKNOWN MAV_FUEL_TYPE = 0
// A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second.
MAV_FUEL_TYPE_LIQUID MAV_FUEL_TYPE = 1
// A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).
MAV_FUEL_TYPE_GAS MAV_FUEL_TYPE = 2
)

var labels_MAV_FUEL_TYPE = map[MAV_FUEL_TYPE]string{
MAV_FUEL_TYPE_UNKNOWN: "MAV_FUEL_TYPE_UNKNOWN",
MAV_FUEL_TYPE_LIQUID: "MAV_FUEL_TYPE_LIQUID",
MAV_FUEL_TYPE_GAS: "MAV_FUEL_TYPE_GAS",
}

var values_MAV_FUEL_TYPE = map[string]MAV_FUEL_TYPE{
"MAV_FUEL_TYPE_UNKNOWN": MAV_FUEL_TYPE_UNKNOWN,
"MAV_FUEL_TYPE_LIQUID": MAV_FUEL_TYPE_LIQUID,
"MAV_FUEL_TYPE_GAS": MAV_FUEL_TYPE_GAS,
}

// MarshalText implements the encoding.TextMarshaler interface.
func (e MAV_FUEL_TYPE) MarshalText() ([]byte, error) {
if name, ok := labels_MAV_FUEL_TYPE[e]; ok {
return []byte(name), nil
}
return []byte(strconv.Itoa(int(e))), nil
}

// UnmarshalText implements the encoding.TextUnmarshaler interface.
func (e *MAV_FUEL_TYPE) UnmarshalText(text []byte) error {
if value, ok := values_MAV_FUEL_TYPE[string(text)]; ok {
*e = value
} else if value, err := strconv.Atoi(string(text)); err == nil {
*e = MAV_FUEL_TYPE(value)
} else {
return fmt.Errorf("invalid label '%s'", text)
}
return nil
}

// String implements the fmt.Stringer interface.
func (e MAV_FUEL_TYPE) String() string {
val, _ := e.MarshalText()
return string(val)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//autogenerated:yes
//nolint:revive,govet,errcheck
package development
package common

import (
"testing"
Expand Down
37 changes: 37 additions & 0 deletions pkg/dialects/common/message_fuel_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//autogenerated:yes
//nolint:revive,misspell,govet,lll
package common

// Fuel status.
// This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot.
// The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.
// The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.
// A recipient can assume that if these fields are supplied they are accurate.
// If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).
// Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).
// This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.
// If both messages are sent for the same fuel system, the ids and corresponding information must match.
// This should be streamed (nominally at 0.1 Hz).
type MessageFuelStatus struct {
// Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
Id uint8
// Capacity when full. Must be provided.
MaximumFuel float32
// Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
ConsumedFuel float32
// Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
RemainingFuel float32
// Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
PercentRemaining uint8
// Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
FlowRate float32
// Fuel temperature. NaN: field not provided.
Temperature float32
// Fuel type. Defines units for fuel capacity and consumption fields above.
FuelType MAV_FUEL_TYPE `mavenum:"uint32"`
}

// GetID implements the message.Message interface.
func (*MessageFuelStatus) GetID() uint32 {
return 371
}
1 change: 1 addition & 0 deletions pkg/dialects/cubepilot/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ var dial = &dialect.Dialect{
&MessageDebugFloatArray{},
&MessageOrbitExecutionStatus{},
&MessageSmartBatteryInfo{},
&MessageFuelStatus{},
&MessageBatteryInfo{},
&MessageGeneratorStatus{},
&MessageActuatorOutputStatus{},
Expand Down
Loading

0 comments on commit 013769a

Please sign in to comment.