diff --git a/pkg/dialects/all/dialect.go b/pkg/dialects/all/dialect.go index ca18d6325..5700ee7d4 100644 --- a/pkg/dialects/all/dialect.go +++ b/pkg/dialects/all/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, @@ -351,7 +353,6 @@ var dial = &dialect.Dialect{ &MessageVelocityLimits{}, &MessageFigureEightExecutionStatus{}, &MessageBatteryStatusV2{}, - &MessageComponentInformationBasic{}, &MessageGroupStart{}, &MessageGroupEnd{}, &MessageRadioRcChannels{}, diff --git a/pkg/dialects/all/enum_illuminator_error_flags.go b/pkg/dialects/all/enum_illuminator_error_flags.go new file mode 100644 index 000000000..dfb981932 --- /dev/null +++ b/pkg/dialects/all/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package all + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/all/enum_illuminator_mode.go b/pkg/dialects/all/enum_illuminator_mode.go new file mode 100644 index 000000000..6766b5ade --- /dev/null +++ b/pkg/dialects/all/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package all + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/all/enum_mav_cmd.go b/pkg/dialects/all/enum_mav_cmd.go index c800c556c..b62fc470f 100644 --- a/pkg/dialects/all/enum_mav_cmd.go +++ b/pkg/dialects/all/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -611,6 +613,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -829,6 +832,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/all/enum_mav_component.go b/pkg/dialects/all/enum_mav_component.go index ee6a4c673..a4215ddf5 100644 --- a/pkg/dialects/all/enum_mav_component.go +++ b/pkg/dialects/all/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/all/enum_mav_type.go b/pkg/dialects/all/enum_mav_type.go index 0a4fe7abf..6de6c6e1b 100644 --- a/pkg/dialects/all/enum_mav_type.go +++ b/pkg/dialects/all/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/all/message_component_information_basic.go b/pkg/dialects/all/message_component_information_basic.go index 45fdfecd6..d55409f46 100644 --- a/pkg/dialects/all/message_component_information_basic.go +++ b/pkg/dialects/all/message_component_information_basic.go @@ -3,8 +3,8 @@ package all import ( - "github.com/bluenviron/gomavlib/v2/pkg/dialects/development" + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" ) // Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. -type MessageComponentInformationBasic = development.MessageComponentInformationBasic +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/all/message_illuminator_status.go b/pkg/dialects/all/message_illuminator_status.go new file mode 100644 index 000000000..1b44a4b5b --- /dev/null +++ b/pkg/dialects/all/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package all + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/ardupilotmega/dialect.go b/pkg/dialects/ardupilotmega/dialect.go index 2260b59fb..048c3d2ed 100644 --- a/pkg/dialects/ardupilotmega/dialect.go +++ b/pkg/dialects/ardupilotmega/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/ardupilotmega/enum_illuminator_error_flags.go b/pkg/dialects/ardupilotmega/enum_illuminator_error_flags.go new file mode 100644 index 000000000..63611f541 --- /dev/null +++ b/pkg/dialects/ardupilotmega/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package ardupilotmega + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/ardupilotmega/enum_illuminator_mode.go b/pkg/dialects/ardupilotmega/enum_illuminator_mode.go new file mode 100644 index 000000000..8549185bf --- /dev/null +++ b/pkg/dialects/ardupilotmega/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package ardupilotmega + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/ardupilotmega/enum_mav_cmd.go b/pkg/dialects/ardupilotmega/enum_mav_cmd.go index c6233428a..f5226db7c 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_cmd.go +++ b/pkg/dialects/ardupilotmega/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -550,6 +552,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -747,6 +750,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/ardupilotmega/enum_mav_component.go b/pkg/dialects/ardupilotmega/enum_mav_component.go index 5cc1d9fbc..b4a69d91f 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_component.go +++ b/pkg/dialects/ardupilotmega/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/ardupilotmega/enum_mav_type.go b/pkg/dialects/ardupilotmega/enum_mav_type.go index 2010ae314..c5550a2fc 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_type.go +++ b/pkg/dialects/ardupilotmega/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/ardupilotmega/message_component_information_basic.go b/pkg/dialects/ardupilotmega/message_component_information_basic.go new file mode 100644 index 000000000..3add7adb5 --- /dev/null +++ b/pkg/dialects/ardupilotmega/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package ardupilotmega + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/ardupilotmega/message_illuminator_status.go b/pkg/dialects/ardupilotmega/message_illuminator_status.go new file mode 100644 index 000000000..caf6379e8 --- /dev/null +++ b/pkg/dialects/ardupilotmega/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package ardupilotmega + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/asluav/dialect.go b/pkg/dialects/asluav/dialect.go index 3a68b1e17..44160b86b 100644 --- a/pkg/dialects/asluav/dialect.go +++ b/pkg/dialects/asluav/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/asluav/enum_illuminator_error_flags.go b/pkg/dialects/asluav/enum_illuminator_error_flags.go new file mode 100644 index 000000000..0f6bbae03 --- /dev/null +++ b/pkg/dialects/asluav/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package asluav + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/asluav/enum_illuminator_mode.go b/pkg/dialects/asluav/enum_illuminator_mode.go new file mode 100644 index 000000000..7ef08fb2b --- /dev/null +++ b/pkg/dialects/asluav/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package asluav + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/asluav/enum_mav_cmd.go b/pkg/dialects/asluav/enum_mav_cmd.go index 4cf92274b..8316ab3bb 100644 --- a/pkg/dialects/asluav/enum_mav_cmd.go +++ b/pkg/dialects/asluav/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -491,6 +493,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -659,6 +662,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/asluav/enum_mav_component.go b/pkg/dialects/asluav/enum_mav_component.go index cbc1ff2c2..89c793e39 100644 --- a/pkg/dialects/asluav/enum_mav_component.go +++ b/pkg/dialects/asluav/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/asluav/enum_mav_type.go b/pkg/dialects/asluav/enum_mav_type.go index 47c79d1ef..743e80bcb 100644 --- a/pkg/dialects/asluav/enum_mav_type.go +++ b/pkg/dialects/asluav/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/asluav/message_component_information_basic.go b/pkg/dialects/asluav/message_component_information_basic.go new file mode 100644 index 000000000..d5b86f189 --- /dev/null +++ b/pkg/dialects/asluav/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package asluav + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/asluav/message_illuminator_status.go b/pkg/dialects/asluav/message_illuminator_status.go new file mode 100644 index 000000000..297ca044f --- /dev/null +++ b/pkg/dialects/asluav/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package asluav + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/avssuas/dialect.go b/pkg/dialects/avssuas/dialect.go index da0777ae1..7b6653178 100644 --- a/pkg/dialects/avssuas/dialect.go +++ b/pkg/dialects/avssuas/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/avssuas/enum_illuminator_error_flags.go b/pkg/dialects/avssuas/enum_illuminator_error_flags.go new file mode 100644 index 000000000..6a6f3933e --- /dev/null +++ b/pkg/dialects/avssuas/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package avssuas + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/avssuas/enum_illuminator_mode.go b/pkg/dialects/avssuas/enum_illuminator_mode.go new file mode 100644 index 000000000..16a9dbc89 --- /dev/null +++ b/pkg/dialects/avssuas/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package avssuas + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/avssuas/enum_mav_cmd.go b/pkg/dialects/avssuas/enum_mav_cmd.go index 39bcbe52b..ee9701358 100644 --- a/pkg/dialects/avssuas/enum_mav_cmd.go +++ b/pkg/dialects/avssuas/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -501,6 +503,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -674,6 +677,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/avssuas/enum_mav_component.go b/pkg/dialects/avssuas/enum_mav_component.go index 0f98d1866..e5c6ae058 100644 --- a/pkg/dialects/avssuas/enum_mav_component.go +++ b/pkg/dialects/avssuas/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/avssuas/enum_mav_type.go b/pkg/dialects/avssuas/enum_mav_type.go index ae02d0135..20425ca44 100644 --- a/pkg/dialects/avssuas/enum_mav_type.go +++ b/pkg/dialects/avssuas/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/avssuas/message_component_information_basic.go b/pkg/dialects/avssuas/message_component_information_basic.go new file mode 100644 index 000000000..5652c85f8 --- /dev/null +++ b/pkg/dialects/avssuas/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package avssuas + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/avssuas/message_illuminator_status.go b/pkg/dialects/avssuas/message_illuminator_status.go new file mode 100644 index 000000000..0327cf849 --- /dev/null +++ b/pkg/dialects/avssuas/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package avssuas + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/common/dialect.go b/pkg/dialects/common/dialect.go index 260339f98..a35ec0588 100644 --- a/pkg/dialects/common/dialect.go +++ b/pkg/dialects/common/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/common/enum_illuminator_error_flags.go b/pkg/dialects/common/enum_illuminator_error_flags.go new file mode 100644 index 000000000..453e7a3c4 --- /dev/null +++ b/pkg/dialects/common/enum_illuminator_error_flags.go @@ -0,0 +1,71 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package common + +import ( + "fmt" + "strconv" + "strings" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS uint64 + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = 1 + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = 2 + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = 3 +) + +var labels_ILLUMINATOR_ERROR_FLAGS = map[ILLUMINATOR_ERROR_FLAGS]string{ + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING: "ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING", + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN: "ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN", + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE: "ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE", +} + +var values_ILLUMINATOR_ERROR_FLAGS = map[string]ILLUMINATOR_ERROR_FLAGS{ + "ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING": ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING, + "ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN": ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN, + "ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE": ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE, +} + +// MarshalText implements the encoding.TextMarshaler interface. +func (e ILLUMINATOR_ERROR_FLAGS) MarshalText() ([]byte, error) { + if e == 0 { + return []byte("0"), nil + } + var names []string + for i := 0; i < 3; i++ { + mask := ILLUMINATOR_ERROR_FLAGS(1 << i) + if e&mask == mask { + names = append(names, labels_ILLUMINATOR_ERROR_FLAGS[mask]) + } + } + return []byte(strings.Join(names, " | ")), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (e *ILLUMINATOR_ERROR_FLAGS) UnmarshalText(text []byte) error { + labels := strings.Split(string(text), " | ") + var mask ILLUMINATOR_ERROR_FLAGS + for _, label := range labels { + if value, ok := values_ILLUMINATOR_ERROR_FLAGS[label]; ok { + mask |= value + } else if value, err := strconv.Atoi(label); err == nil { + mask |= ILLUMINATOR_ERROR_FLAGS(value) + } else { + return fmt.Errorf("invalid label '%s'", label) + } + } + *e = mask + return nil +} + +// String implements the fmt.Stringer interface. +func (e ILLUMINATOR_ERROR_FLAGS) String() string { + val, _ := e.MarshalText() + return string(val) +} diff --git a/pkg/dialects/common/enum_illuminator_mode.go b/pkg/dialects/common/enum_illuminator_mode.go new file mode 100644 index 000000000..60853cd35 --- /dev/null +++ b/pkg/dialects/common/enum_illuminator_mode.go @@ -0,0 +1,58 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package common + +import ( + "fmt" + "strconv" +) + +// Modes of illuminator +type ILLUMINATOR_MODE uint64 + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = 0 + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = 1 + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = 2 +) + +var labels_ILLUMINATOR_MODE = map[ILLUMINATOR_MODE]string{ + ILLUMINATOR_MODE_UNKNOWN: "ILLUMINATOR_MODE_UNKNOWN", + ILLUMINATOR_MODE_INTERNAL_CONTROL: "ILLUMINATOR_MODE_INTERNAL_CONTROL", + ILLUMINATOR_MODE_EXTERNAL_SYNC: "ILLUMINATOR_MODE_EXTERNAL_SYNC", +} + +var values_ILLUMINATOR_MODE = map[string]ILLUMINATOR_MODE{ + "ILLUMINATOR_MODE_UNKNOWN": ILLUMINATOR_MODE_UNKNOWN, + "ILLUMINATOR_MODE_INTERNAL_CONTROL": ILLUMINATOR_MODE_INTERNAL_CONTROL, + "ILLUMINATOR_MODE_EXTERNAL_SYNC": ILLUMINATOR_MODE_EXTERNAL_SYNC, +} + +// MarshalText implements the encoding.TextMarshaler interface. +func (e ILLUMINATOR_MODE) MarshalText() ([]byte, error) { + if name, ok := labels_ILLUMINATOR_MODE[e]; ok { + return []byte(name), nil + } + return []byte(strconv.Itoa(int(e))), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (e *ILLUMINATOR_MODE) UnmarshalText(text []byte) error { + if value, ok := values_ILLUMINATOR_MODE[string(text)]; ok { + *e = value + } else if value, err := strconv.Atoi(string(text)); err == nil { + *e = ILLUMINATOR_MODE(value) + } else { + return fmt.Errorf("invalid label '%s'", text) + } + return nil +} + +// String implements the fmt.Stringer interface. +func (e ILLUMINATOR_MODE) String() string { + val, _ := e.MarshalText() + return string(val) +} diff --git a/pkg/dialects/common/enum_mav_cmd.go b/pkg/dialects/common/enum_mav_cmd.go index f8c580d8c..222ad6733 100644 --- a/pkg/dialects/common/enum_mav_cmd.go +++ b/pkg/dialects/common/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -487,6 +489,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -653,6 +656,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/common/enum_mav_component.go b/pkg/dialects/common/enum_mav_component.go index 9d721c0b0..94e28d26c 100644 --- a/pkg/dialects/common/enum_mav_component.go +++ b/pkg/dialects/common/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/common/enum_mav_type.go b/pkg/dialects/common/enum_mav_type.go index 7ca1dc355..5638fd0d5 100644 --- a/pkg/dialects/common/enum_mav_type.go +++ b/pkg/dialects/common/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/common/message_component_information_basic.go b/pkg/dialects/common/message_component_information_basic.go new file mode 100644 index 000000000..b93fbe46a --- /dev/null +++ b/pkg/dialects/common/message_component_information_basic.go @@ -0,0 +1,28 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package common + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic struct { + // Timestamp (time since system boot). + TimeBootMs uint32 + // Component capability flags + Capabilities MAV_PROTOCOL_CAPABILITY `mavenum:"uint64"` + // Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. + TimeManufactureS uint32 + // Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. + VendorName string `mavlen:"32"` + // Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. + ModelName string `mavlen:"32"` + // Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. + SoftwareVersion string `mavlen:"24"` + // Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. + HardwareVersion string `mavlen:"24"` + // Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. + SerialNumber string `mavlen:"32"` +} + +// GetID implements the message.Message interface. +func (*MessageComponentInformationBasic) GetID() uint32 { + return 396 +} diff --git a/pkg/dialects/common/message_illuminator_status.go b/pkg/dialects/common/message_illuminator_status.go new file mode 100644 index 000000000..0001e7858 --- /dev/null +++ b/pkg/dialects/common/message_illuminator_status.go @@ -0,0 +1,34 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package common + +// Illuminator status +type MessageIlluminatorStatus struct { + // Time since the start-up of the illuminator in ms + UptimeMs uint32 + // 0: Illuminators OFF, 1: Illuminators ON + Enable uint8 + // Supported illuminator modes + ModeBitmask ILLUMINATOR_MODE `mavenum:"uint8"` + // Errors + ErrorStatus ILLUMINATOR_ERROR_FLAGS `mavenum:"uint32"` + // Illuminator mode + Mode ILLUMINATOR_MODE `mavenum:"uint8"` + // Illuminator brightness + Brightness float32 + // Illuminator strobing period in seconds + StrobePeriod float32 + // Illuminator strobing duty cycle + StrobeDutyCycle float32 + // Temperature in Celsius + TempC float32 + // Minimum strobing period in seconds + MinStrobePeriod float32 + // Maximum strobing period in seconds + MaxStrobePeriod float32 +} + +// GetID implements the message.Message interface. +func (*MessageIlluminatorStatus) GetID() uint32 { + return 440 +} diff --git a/pkg/dialects/cubepilot/dialect.go b/pkg/dialects/cubepilot/dialect.go index 6295f7bd5..5d06f97b0 100644 --- a/pkg/dialects/cubepilot/dialect.go +++ b/pkg/dialects/cubepilot/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/cubepilot/enum_illuminator_error_flags.go b/pkg/dialects/cubepilot/enum_illuminator_error_flags.go new file mode 100644 index 000000000..d04354dac --- /dev/null +++ b/pkg/dialects/cubepilot/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package cubepilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/cubepilot/enum_illuminator_mode.go b/pkg/dialects/cubepilot/enum_illuminator_mode.go new file mode 100644 index 000000000..3841edf7e --- /dev/null +++ b/pkg/dialects/cubepilot/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package cubepilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/cubepilot/enum_mav_cmd.go b/pkg/dialects/cubepilot/enum_mav_cmd.go index bb4c1ac7d..ae6fe5a49 100644 --- a/pkg/dialects/cubepilot/enum_mav_cmd.go +++ b/pkg/dialects/cubepilot/enum_mav_cmd.go @@ -218,6 +218,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = common.MAV_CMD_RUN_PREARM_CHECKS // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = common.MAV_CMD_ILLUMINATOR_ON_OFF + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = common.MAV_CMD_DO_ILLUMINATOR_CONFIGURE // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = common.MAV_CMD_GET_HOME_POSITION diff --git a/pkg/dialects/cubepilot/enum_mav_component.go b/pkg/dialects/cubepilot/enum_mav_component.go index 444578f2b..1baa4f9ec 100644 --- a/pkg/dialects/cubepilot/enum_mav_component.go +++ b/pkg/dialects/cubepilot/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/cubepilot/enum_mav_type.go b/pkg/dialects/cubepilot/enum_mav_type.go index 00cdf2c85..2bbf1a969 100644 --- a/pkg/dialects/cubepilot/enum_mav_type.go +++ b/pkg/dialects/cubepilot/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/cubepilot/message_component_information_basic.go b/pkg/dialects/cubepilot/message_component_information_basic.go new file mode 100644 index 000000000..6cb9caee9 --- /dev/null +++ b/pkg/dialects/cubepilot/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package cubepilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/cubepilot/message_illuminator_status.go b/pkg/dialects/cubepilot/message_illuminator_status.go new file mode 100644 index 000000000..0acefd05a --- /dev/null +++ b/pkg/dialects/cubepilot/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package cubepilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/development/dialect.go b/pkg/dialects/development/dialect.go index 34b28fb09..950e23463 100644 --- a/pkg/dialects/development/dialect.go +++ b/pkg/dialects/development/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, @@ -247,7 +249,6 @@ var dial = &dialect.Dialect{ &MessageVelocityLimits{}, &MessageFigureEightExecutionStatus{}, &MessageBatteryStatusV2{}, - &MessageComponentInformationBasic{}, &MessageGroupStart{}, &MessageGroupEnd{}, &MessageRadioRcChannels{}, diff --git a/pkg/dialects/development/enum_illuminator_error_flags.go b/pkg/dialects/development/enum_illuminator_error_flags.go new file mode 100644 index 000000000..e02d16819 --- /dev/null +++ b/pkg/dialects/development/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package development + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/development/enum_illuminator_mode.go b/pkg/dialects/development/enum_illuminator_mode.go new file mode 100644 index 000000000..cf8376ecf --- /dev/null +++ b/pkg/dialects/development/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package development + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/development/enum_mav_cmd.go b/pkg/dialects/development/enum_mav_cmd.go index 30f89c524..2f2d39db1 100644 --- a/pkg/dialects/development/enum_mav_cmd.go +++ b/pkg/dialects/development/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -524,6 +526,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -699,6 +702,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/development/enum_mav_component.go b/pkg/dialects/development/enum_mav_component.go index 64bb1d3d8..542a0edfe 100644 --- a/pkg/dialects/development/enum_mav_component.go +++ b/pkg/dialects/development/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/development/enum_mav_type.go b/pkg/dialects/development/enum_mav_type.go index 83f6b4a12..28a60b118 100644 --- a/pkg/dialects/development/enum_mav_type.go +++ b/pkg/dialects/development/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/development/message_component_information_basic.go b/pkg/dialects/development/message_component_information_basic.go index 9b7e550a5..5da157b5d 100644 --- a/pkg/dialects/development/message_component_information_basic.go +++ b/pkg/dialects/development/message_component_information_basic.go @@ -2,27 +2,9 @@ //nolint:revive,misspell,govet,lll package development -// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. -type MessageComponentInformationBasic struct { - // Timestamp (time since system boot). - TimeBootMs uint32 - // Component capability flags - Capabilities MAV_PROTOCOL_CAPABILITY `mavenum:"uint64"` - // Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - TimeManufactureS uint32 - // Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - VendorName string `mavlen:"32"` - // Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - ModelName string `mavlen:"32"` - // Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - SoftwareVersion string `mavlen:"24"` - // Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - HardwareVersion string `mavlen:"24"` - // Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - SerialNumber string `mavlen:"32"` -} +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) -// GetID implements the message.Message interface. -func (*MessageComponentInformationBasic) GetID() uint32 { - return 396 -} +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/development/message_illuminator_status.go b/pkg/dialects/development/message_illuminator_status.go new file mode 100644 index 000000000..dcab91f10 --- /dev/null +++ b/pkg/dialects/development/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package development + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/matrixpilot/dialect.go b/pkg/dialects/matrixpilot/dialect.go index 8efacc591..200560ead 100644 --- a/pkg/dialects/matrixpilot/dialect.go +++ b/pkg/dialects/matrixpilot/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/matrixpilot/enum_illuminator_error_flags.go b/pkg/dialects/matrixpilot/enum_illuminator_error_flags.go new file mode 100644 index 000000000..a6ea0cc92 --- /dev/null +++ b/pkg/dialects/matrixpilot/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package matrixpilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/matrixpilot/enum_illuminator_mode.go b/pkg/dialects/matrixpilot/enum_illuminator_mode.go new file mode 100644 index 000000000..016ad987d --- /dev/null +++ b/pkg/dialects/matrixpilot/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package matrixpilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/matrixpilot/enum_mav_cmd.go b/pkg/dialects/matrixpilot/enum_mav_cmd.go index c80597aa8..cfb87b7bd 100644 --- a/pkg/dialects/matrixpilot/enum_mav_cmd.go +++ b/pkg/dialects/matrixpilot/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -489,6 +491,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -656,6 +659,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/matrixpilot/enum_mav_component.go b/pkg/dialects/matrixpilot/enum_mav_component.go index 44c120a88..aac02004c 100644 --- a/pkg/dialects/matrixpilot/enum_mav_component.go +++ b/pkg/dialects/matrixpilot/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/matrixpilot/enum_mav_type.go b/pkg/dialects/matrixpilot/enum_mav_type.go index effe13f81..89cc157a0 100644 --- a/pkg/dialects/matrixpilot/enum_mav_type.go +++ b/pkg/dialects/matrixpilot/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/matrixpilot/message_component_information_basic.go b/pkg/dialects/matrixpilot/message_component_information_basic.go new file mode 100644 index 000000000..e12011894 --- /dev/null +++ b/pkg/dialects/matrixpilot/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package matrixpilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/matrixpilot/message_illuminator_status.go b/pkg/dialects/matrixpilot/message_illuminator_status.go new file mode 100644 index 000000000..792c7a453 --- /dev/null +++ b/pkg/dialects/matrixpilot/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package matrixpilot + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/minimal/enum_mav_component.go b/pkg/dialects/minimal/enum_mav_component.go index d1cdbc0d6..1c3a19db3 100644 --- a/pkg/dialects/minimal/enum_mav_component.go +++ b/pkg/dialects/minimal/enum_mav_component.go @@ -281,6 +281,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = 241 // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = 242 + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = 243 // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = 250 ) @@ -420,6 +422,7 @@ var labels_MAV_COMPONENT = map[MAV_COMPONENT]string{ MAV_COMP_ID_UDP_BRIDGE: "MAV_COMP_ID_UDP_BRIDGE", MAV_COMP_ID_UART_BRIDGE: "MAV_COMP_ID_UART_BRIDGE", MAV_COMP_ID_TUNNEL_NODE: "MAV_COMP_ID_TUNNEL_NODE", + MAV_COMP_ID_ILLUMINATOR: "MAV_COMP_ID_ILLUMINATOR", MAV_COMP_ID_SYSTEM_CONTROL: "MAV_COMP_ID_SYSTEM_CONTROL", } @@ -558,6 +561,7 @@ var values_MAV_COMPONENT = map[string]MAV_COMPONENT{ "MAV_COMP_ID_UDP_BRIDGE": MAV_COMP_ID_UDP_BRIDGE, "MAV_COMP_ID_UART_BRIDGE": MAV_COMP_ID_UART_BRIDGE, "MAV_COMP_ID_TUNNEL_NODE": MAV_COMP_ID_TUNNEL_NODE, + "MAV_COMP_ID_ILLUMINATOR": MAV_COMP_ID_ILLUMINATOR, "MAV_COMP_ID_SYSTEM_CONTROL": MAV_COMP_ID_SYSTEM_CONTROL, } diff --git a/pkg/dialects/minimal/enum_mav_type.go b/pkg/dialects/minimal/enum_mav_type.go index aa7102087..eb462d403 100644 --- a/pkg/dialects/minimal/enum_mav_type.go +++ b/pkg/dialects/minimal/enum_mav_type.go @@ -99,6 +99,8 @@ const ( MAV_TYPE_WINCH MAV_TYPE = 42 // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = 43 + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = 44 ) var labels_MAV_TYPE = map[MAV_TYPE]string{ @@ -146,6 +148,7 @@ var labels_MAV_TYPE = map[MAV_TYPE]string{ MAV_TYPE_GPS: "MAV_TYPE_GPS", MAV_TYPE_WINCH: "MAV_TYPE_WINCH", MAV_TYPE_GENERIC_MULTIROTOR: "MAV_TYPE_GENERIC_MULTIROTOR", + MAV_TYPE_ILLUMINATOR: "MAV_TYPE_ILLUMINATOR", } var values_MAV_TYPE = map[string]MAV_TYPE{ @@ -193,6 +196,7 @@ var values_MAV_TYPE = map[string]MAV_TYPE{ "MAV_TYPE_GPS": MAV_TYPE_GPS, "MAV_TYPE_WINCH": MAV_TYPE_WINCH, "MAV_TYPE_GENERIC_MULTIROTOR": MAV_TYPE_GENERIC_MULTIROTOR, + "MAV_TYPE_ILLUMINATOR": MAV_TYPE_ILLUMINATOR, } // MarshalText implements the encoding.TextMarshaler interface. diff --git a/pkg/dialects/paparazzi/dialect.go b/pkg/dialects/paparazzi/dialect.go index 9b4313498..77446a78f 100644 --- a/pkg/dialects/paparazzi/dialect.go +++ b/pkg/dialects/paparazzi/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/paparazzi/enum_illuminator_error_flags.go b/pkg/dialects/paparazzi/enum_illuminator_error_flags.go new file mode 100644 index 000000000..2ae156146 --- /dev/null +++ b/pkg/dialects/paparazzi/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package paparazzi + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/paparazzi/enum_illuminator_mode.go b/pkg/dialects/paparazzi/enum_illuminator_mode.go new file mode 100644 index 000000000..40f42569d --- /dev/null +++ b/pkg/dialects/paparazzi/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package paparazzi + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/paparazzi/enum_mav_cmd.go b/pkg/dialects/paparazzi/enum_mav_cmd.go index cbdd54be6..abb682bf8 100644 --- a/pkg/dialects/paparazzi/enum_mav_cmd.go +++ b/pkg/dialects/paparazzi/enum_mav_cmd.go @@ -218,6 +218,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = common.MAV_CMD_RUN_PREARM_CHECKS // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = common.MAV_CMD_ILLUMINATOR_ON_OFF + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = common.MAV_CMD_DO_ILLUMINATOR_CONFIGURE // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = common.MAV_CMD_GET_HOME_POSITION diff --git a/pkg/dialects/paparazzi/enum_mav_component.go b/pkg/dialects/paparazzi/enum_mav_component.go index 0091bd423..32a78a3fd 100644 --- a/pkg/dialects/paparazzi/enum_mav_component.go +++ b/pkg/dialects/paparazzi/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/paparazzi/enum_mav_type.go b/pkg/dialects/paparazzi/enum_mav_type.go index 1e87530a9..1b08181e0 100644 --- a/pkg/dialects/paparazzi/enum_mav_type.go +++ b/pkg/dialects/paparazzi/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/paparazzi/message_component_information_basic.go b/pkg/dialects/paparazzi/message_component_information_basic.go new file mode 100644 index 000000000..4656f98da --- /dev/null +++ b/pkg/dialects/paparazzi/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package paparazzi + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/paparazzi/message_illuminator_status.go b/pkg/dialects/paparazzi/message_illuminator_status.go new file mode 100644 index 000000000..9153f329a --- /dev/null +++ b/pkg/dialects/paparazzi/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package paparazzi + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/pythonarraytest/dialect.go b/pkg/dialects/pythonarraytest/dialect.go index cabb6512b..fd5d116da 100644 --- a/pkg/dialects/pythonarraytest/dialect.go +++ b/pkg/dialects/pythonarraytest/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/pythonarraytest/enum_illuminator_error_flags.go b/pkg/dialects/pythonarraytest/enum_illuminator_error_flags.go new file mode 100644 index 000000000..63054c6c4 --- /dev/null +++ b/pkg/dialects/pythonarraytest/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package pythonarraytest + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/pythonarraytest/enum_illuminator_mode.go b/pkg/dialects/pythonarraytest/enum_illuminator_mode.go new file mode 100644 index 000000000..f85cc222f --- /dev/null +++ b/pkg/dialects/pythonarraytest/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package pythonarraytest + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/pythonarraytest/enum_mav_cmd.go b/pkg/dialects/pythonarraytest/enum_mav_cmd.go index ccbe71885..a0868a216 100644 --- a/pkg/dialects/pythonarraytest/enum_mav_cmd.go +++ b/pkg/dialects/pythonarraytest/enum_mav_cmd.go @@ -218,6 +218,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = common.MAV_CMD_RUN_PREARM_CHECKS // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = common.MAV_CMD_ILLUMINATOR_ON_OFF + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = common.MAV_CMD_DO_ILLUMINATOR_CONFIGURE // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = common.MAV_CMD_GET_HOME_POSITION diff --git a/pkg/dialects/pythonarraytest/enum_mav_component.go b/pkg/dialects/pythonarraytest/enum_mav_component.go index b69fab751..e21749893 100644 --- a/pkg/dialects/pythonarraytest/enum_mav_component.go +++ b/pkg/dialects/pythonarraytest/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/pythonarraytest/enum_mav_type.go b/pkg/dialects/pythonarraytest/enum_mav_type.go index 4a22ed0c5..d483f8fe1 100644 --- a/pkg/dialects/pythonarraytest/enum_mav_type.go +++ b/pkg/dialects/pythonarraytest/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/pythonarraytest/message_component_information_basic.go b/pkg/dialects/pythonarraytest/message_component_information_basic.go new file mode 100644 index 000000000..74d167d72 --- /dev/null +++ b/pkg/dialects/pythonarraytest/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package pythonarraytest + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/pythonarraytest/message_illuminator_status.go b/pkg/dialects/pythonarraytest/message_illuminator_status.go new file mode 100644 index 000000000..6700ea8b7 --- /dev/null +++ b/pkg/dialects/pythonarraytest/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package pythonarraytest + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/standard/enum_mav_component.go b/pkg/dialects/standard/enum_mav_component.go index 520890000..647a4063a 100644 --- a/pkg/dialects/standard/enum_mav_component.go +++ b/pkg/dialects/standard/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/standard/enum_mav_type.go b/pkg/dialects/standard/enum_mav_type.go index 0c96f2d69..b715d8bb2 100644 --- a/pkg/dialects/standard/enum_mav_type.go +++ b/pkg/dialects/standard/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/storm32/dialect.go b/pkg/dialects/storm32/dialect.go index 80b279d0c..bd57e1102 100644 --- a/pkg/dialects/storm32/dialect.go +++ b/pkg/dialects/storm32/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/storm32/enum_illuminator_error_flags.go b/pkg/dialects/storm32/enum_illuminator_error_flags.go new file mode 100644 index 000000000..4c837a876 --- /dev/null +++ b/pkg/dialects/storm32/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package storm32 + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/storm32/enum_illuminator_mode.go b/pkg/dialects/storm32/enum_illuminator_mode.go new file mode 100644 index 000000000..d3be8d328 --- /dev/null +++ b/pkg/dialects/storm32/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package storm32 + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/storm32/enum_mav_cmd.go b/pkg/dialects/storm32/enum_mav_cmd.go index 22997b7aa..6ea964f3f 100644 --- a/pkg/dialects/storm32/enum_mav_cmd.go +++ b/pkg/dialects/storm32/enum_mav_cmd.go @@ -219,6 +219,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = 401 // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = 405 + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = 406 // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = 410 @@ -556,6 +558,7 @@ var labels_MAV_CMD = map[MAV_CMD]string{ MAV_CMD_COMPONENT_ARM_DISARM: "MAV_CMD_COMPONENT_ARM_DISARM", MAV_CMD_RUN_PREARM_CHECKS: "MAV_CMD_RUN_PREARM_CHECKS", MAV_CMD_ILLUMINATOR_ON_OFF: "MAV_CMD_ILLUMINATOR_ON_OFF", + MAV_CMD_DO_ILLUMINATOR_CONFIGURE: "MAV_CMD_DO_ILLUMINATOR_CONFIGURE", MAV_CMD_GET_HOME_POSITION: "MAV_CMD_GET_HOME_POSITION", MAV_CMD_INJECT_FAILURE: "MAV_CMD_INJECT_FAILURE", MAV_CMD_START_RX_PAIR: "MAV_CMD_START_RX_PAIR", @@ -756,6 +759,7 @@ var values_MAV_CMD = map[string]MAV_CMD{ "MAV_CMD_COMPONENT_ARM_DISARM": MAV_CMD_COMPONENT_ARM_DISARM, "MAV_CMD_RUN_PREARM_CHECKS": MAV_CMD_RUN_PREARM_CHECKS, "MAV_CMD_ILLUMINATOR_ON_OFF": MAV_CMD_ILLUMINATOR_ON_OFF, + "MAV_CMD_DO_ILLUMINATOR_CONFIGURE": MAV_CMD_DO_ILLUMINATOR_CONFIGURE, "MAV_CMD_GET_HOME_POSITION": MAV_CMD_GET_HOME_POSITION, "MAV_CMD_INJECT_FAILURE": MAV_CMD_INJECT_FAILURE, "MAV_CMD_START_RX_PAIR": MAV_CMD_START_RX_PAIR, diff --git a/pkg/dialects/storm32/enum_mav_component.go b/pkg/dialects/storm32/enum_mav_component.go index e3ea39f80..9aad48c6c 100644 --- a/pkg/dialects/storm32/enum_mav_component.go +++ b/pkg/dialects/storm32/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/storm32/enum_mav_type.go b/pkg/dialects/storm32/enum_mav_type.go index 8fca06538..356b416a8 100644 --- a/pkg/dialects/storm32/enum_mav_type.go +++ b/pkg/dialects/storm32/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/storm32/message_component_information_basic.go b/pkg/dialects/storm32/message_component_information_basic.go new file mode 100644 index 000000000..6c45c8139 --- /dev/null +++ b/pkg/dialects/storm32/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package storm32 + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/storm32/message_illuminator_status.go b/pkg/dialects/storm32/message_illuminator_status.go new file mode 100644 index 000000000..98173d60c --- /dev/null +++ b/pkg/dialects/storm32/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package storm32 + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/ualberta/dialect.go b/pkg/dialects/ualberta/dialect.go index 4fce253ef..ae987357b 100644 --- a/pkg/dialects/ualberta/dialect.go +++ b/pkg/dialects/ualberta/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/ualberta/enum_illuminator_error_flags.go b/pkg/dialects/ualberta/enum_illuminator_error_flags.go new file mode 100644 index 000000000..9c90834eb --- /dev/null +++ b/pkg/dialects/ualberta/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package ualberta + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/ualberta/enum_illuminator_mode.go b/pkg/dialects/ualberta/enum_illuminator_mode.go new file mode 100644 index 000000000..d62d9455e --- /dev/null +++ b/pkg/dialects/ualberta/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package ualberta + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/ualberta/enum_mav_cmd.go b/pkg/dialects/ualberta/enum_mav_cmd.go index df1fdd5c2..dd5a833c0 100644 --- a/pkg/dialects/ualberta/enum_mav_cmd.go +++ b/pkg/dialects/ualberta/enum_mav_cmd.go @@ -218,6 +218,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = common.MAV_CMD_RUN_PREARM_CHECKS // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = common.MAV_CMD_ILLUMINATOR_ON_OFF + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = common.MAV_CMD_DO_ILLUMINATOR_CONFIGURE // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = common.MAV_CMD_GET_HOME_POSITION diff --git a/pkg/dialects/ualberta/enum_mav_component.go b/pkg/dialects/ualberta/enum_mav_component.go index 60043942f..d8ca39dca 100644 --- a/pkg/dialects/ualberta/enum_mav_component.go +++ b/pkg/dialects/ualberta/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/ualberta/enum_mav_type.go b/pkg/dialects/ualberta/enum_mav_type.go index 0d59fa627..eafb3a7c8 100644 --- a/pkg/dialects/ualberta/enum_mav_type.go +++ b/pkg/dialects/ualberta/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/ualberta/message_component_information_basic.go b/pkg/dialects/ualberta/message_component_information_basic.go new file mode 100644 index 000000000..1e01d9001 --- /dev/null +++ b/pkg/dialects/ualberta/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package ualberta + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/ualberta/message_illuminator_status.go b/pkg/dialects/ualberta/message_illuminator_status.go new file mode 100644 index 000000000..d5c211fe7 --- /dev/null +++ b/pkg/dialects/ualberta/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package ualberta + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus diff --git a/pkg/dialects/uavionix/dialect.go b/pkg/dialects/uavionix/dialect.go index d185cd82a..a85668c5d 100644 --- a/pkg/dialects/uavionix/dialect.go +++ b/pkg/dialects/uavionix/dialect.go @@ -218,6 +218,7 @@ var dial = &dialect.Dialect{ &MessageCanFrame{}, &MessageOnboardComputerStatus{}, &MessageComponentInformation{}, + &MessageComponentInformationBasic{}, &MessageComponentMetadata{}, &MessagePlayTuneV2{}, &MessageSupportedTunes{}, @@ -225,6 +226,7 @@ var dial = &dialect.Dialect{ &MessageCurrentEventSequence{}, &MessageRequestEvent{}, &MessageResponseEventError{}, + &MessageIlluminatorStatus{}, &MessageCanfdFrame{}, &MessageCanFilterModify{}, &MessageWheelDistance{}, diff --git a/pkg/dialects/uavionix/enum_illuminator_error_flags.go b/pkg/dialects/uavionix/enum_illuminator_error_flags.go new file mode 100644 index 000000000..cb8d21ca3 --- /dev/null +++ b/pkg/dialects/uavionix/enum_illuminator_error_flags.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package uavionix + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator module error flags (bitmap, 0 means no error) +type ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS + +const ( + // Illuminator thermal throttling error. + ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING + // Illuminator over temperature shutdown error. + ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN + // Illuminator thermistor failure. + ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE ILLUMINATOR_ERROR_FLAGS = common.ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE +) diff --git a/pkg/dialects/uavionix/enum_illuminator_mode.go b/pkg/dialects/uavionix/enum_illuminator_mode.go new file mode 100644 index 000000000..2b63c5244 --- /dev/null +++ b/pkg/dialects/uavionix/enum_illuminator_mode.go @@ -0,0 +1,19 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll,dupl,gocritic +package uavionix + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Modes of illuminator +type ILLUMINATOR_MODE = common.ILLUMINATOR_MODE + +const ( + // Illuminator mode is not specified/unknown + ILLUMINATOR_MODE_UNKNOWN ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_UNKNOWN + // Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings + ILLUMINATOR_MODE_INTERNAL_CONTROL ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_INTERNAL_CONTROL + // Illuminator behavior is controlled by external factors: e.g. an external hardware signal + ILLUMINATOR_MODE_EXTERNAL_SYNC ILLUMINATOR_MODE = common.ILLUMINATOR_MODE_EXTERNAL_SYNC +) diff --git a/pkg/dialects/uavionix/enum_mav_cmd.go b/pkg/dialects/uavionix/enum_mav_cmd.go index 10eceea12..a03a6300c 100644 --- a/pkg/dialects/uavionix/enum_mav_cmd.go +++ b/pkg/dialects/uavionix/enum_mav_cmd.go @@ -218,6 +218,8 @@ const ( MAV_CMD_RUN_PREARM_CHECKS MAV_CMD = common.MAV_CMD_RUN_PREARM_CHECKS // Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). MAV_CMD_ILLUMINATOR_ON_OFF MAV_CMD = common.MAV_CMD_ILLUMINATOR_ON_OFF + // Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_CMD_DO_ILLUMINATOR_CONFIGURE MAV_CMD = common.MAV_CMD_DO_ILLUMINATOR_CONFIGURE // Request the home position from the vehicle. // The vehicle will ACK the command and then emit the HOME_POSITION message. MAV_CMD_GET_HOME_POSITION MAV_CMD = common.MAV_CMD_GET_HOME_POSITION diff --git a/pkg/dialects/uavionix/enum_mav_component.go b/pkg/dialects/uavionix/enum_mav_component.go index 89f6c9f7d..a30e4f111 100644 --- a/pkg/dialects/uavionix/enum_mav_component.go +++ b/pkg/dialects/uavionix/enum_mav_component.go @@ -280,6 +280,8 @@ const ( MAV_COMP_ID_UART_BRIDGE MAV_COMPONENT = minimal.MAV_COMP_ID_UART_BRIDGE // Component handling TUNNEL messages (e.g. vendor specific GUI of a component). MAV_COMP_ID_TUNNEL_NODE MAV_COMPONENT = minimal.MAV_COMP_ID_TUNNEL_NODE + // Illuminator + MAV_COMP_ID_ILLUMINATOR MAV_COMPONENT = minimal.MAV_COMP_ID_ILLUMINATOR // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). MAV_COMP_ID_SYSTEM_CONTROL MAV_COMPONENT = minimal.MAV_COMP_ID_SYSTEM_CONTROL ) diff --git a/pkg/dialects/uavionix/enum_mav_type.go b/pkg/dialects/uavionix/enum_mav_type.go index d86ecdea4..632be136e 100644 --- a/pkg/dialects/uavionix/enum_mav_type.go +++ b/pkg/dialects/uavionix/enum_mav_type.go @@ -98,4 +98,6 @@ const ( MAV_TYPE_WINCH MAV_TYPE = minimal.MAV_TYPE_WINCH // Generic multirotor that does not fit into a specific type or whose type is unknown MAV_TYPE_GENERIC_MULTIROTOR MAV_TYPE = minimal.MAV_TYPE_GENERIC_MULTIROTOR + // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). + MAV_TYPE_ILLUMINATOR MAV_TYPE = minimal.MAV_TYPE_ILLUMINATOR ) diff --git a/pkg/dialects/uavionix/message_component_information_basic.go b/pkg/dialects/uavionix/message_component_information_basic.go new file mode 100644 index 000000000..4520988a9 --- /dev/null +++ b/pkg/dialects/uavionix/message_component_information_basic.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package uavionix + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. +type MessageComponentInformationBasic = common.MessageComponentInformationBasic diff --git a/pkg/dialects/uavionix/message_illuminator_status.go b/pkg/dialects/uavionix/message_illuminator_status.go new file mode 100644 index 000000000..4db530c8f --- /dev/null +++ b/pkg/dialects/uavionix/message_illuminator_status.go @@ -0,0 +1,10 @@ +//autogenerated:yes +//nolint:revive,misspell,govet,lll +package uavionix + +import ( + "github.com/bluenviron/gomavlib/v2/pkg/dialects/common" +) + +// Illuminator status +type MessageIlluminatorStatus = common.MessageIlluminatorStatus