diff --git a/pkg/conversion/conversion.go b/pkg/conversion/conversion.go index db8ca827a..1196a2be2 100644 --- a/pkg/conversion/conversion.go +++ b/pkg/conversion/conversion.go @@ -136,7 +136,6 @@ func (e {{ .Enum.Name }}) MarshalText() ([]byte, error) { {{- end }} } - // UnmarshalText implements the encoding.TextUnmarshaler interface. func (e *{{ .Enum.Name }}) UnmarshalText(text []byte) error { {{- if .Enum.Bitmask }} @@ -165,15 +164,8 @@ func (e *{{ .Enum.Name }}) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e {{ .Enum.Name }}) String() string { -{{- if .Enum.Bitmask }} val, _ := e.MarshalText() return string(val) -{{- else }} - if name, ok := labels_{{ .Enum.Name }}[e]; ok { - return name - } - return strconv.Itoa(int(e)) -{{- end }} } {{- end }} `)) diff --git a/pkg/dialects/all/enum_mav_cmd.go b/pkg/dialects/all/enum_mav_cmd.go index 27873e673..3172f1b71 100644 --- a/pkg/dialects/all/enum_mav_cmd.go +++ b/pkg/dialects/all/enum_mav_cmd.go @@ -954,8 +954,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_accelcal_vehicle_pos.go b/pkg/dialects/ardupilotmega/enum_accelcal_vehicle_pos.go index 13b984a43..3da26b0c8 100644 --- a/pkg/dialects/ardupilotmega/enum_accelcal_vehicle_pos.go +++ b/pkg/dialects/ardupilotmega/enum_accelcal_vehicle_pos.go @@ -64,8 +64,6 @@ func (e *ACCELCAL_VEHICLE_POS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ACCELCAL_VEHICLE_POS) String() string { - if name, ok := labels_ACCELCAL_VEHICLE_POS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_camera_feedback_flags.go b/pkg/dialects/ardupilotmega/enum_camera_feedback_flags.go index 7bf12c499..362a73445 100644 --- a/pkg/dialects/ardupilotmega/enum_camera_feedback_flags.go +++ b/pkg/dialects/ardupilotmega/enum_camera_feedback_flags.go @@ -60,8 +60,6 @@ func (e *CAMERA_FEEDBACK_FLAGS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAMERA_FEEDBACK_FLAGS) String() string { - if name, ok := labels_CAMERA_FEEDBACK_FLAGS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_camera_status_types.go b/pkg/dialects/ardupilotmega/enum_camera_status_types.go index adfc93925..98d682c30 100644 --- a/pkg/dialects/ardupilotmega/enum_camera_status_types.go +++ b/pkg/dialects/ardupilotmega/enum_camera_status_types.go @@ -68,8 +68,6 @@ func (e *CAMERA_STATUS_TYPES) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAMERA_STATUS_TYPES) String() string { - if name, ok := labels_CAMERA_STATUS_TYPES[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_copter_mode.go b/pkg/dialects/ardupilotmega/enum_copter_mode.go index 8086240c8..803d3c87e 100644 --- a/pkg/dialects/ardupilotmega/enum_copter_mode.go +++ b/pkg/dialects/ardupilotmega/enum_copter_mode.go @@ -116,8 +116,6 @@ func (e *COPTER_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e COPTER_MODE) String() string { - if name, ok := labels_COPTER_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_deepstall_stage.go b/pkg/dialects/ardupilotmega/enum_deepstall_stage.go index fb38d71f5..480dec8c3 100644 --- a/pkg/dialects/ardupilotmega/enum_deepstall_stage.go +++ b/pkg/dialects/ardupilotmega/enum_deepstall_stage.go @@ -69,8 +69,6 @@ func (e *DEEPSTALL_STAGE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e DEEPSTALL_STAGE) String() string { - if name, ok := labels_DEEPSTALL_STAGE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_device_op_bustype.go b/pkg/dialects/ardupilotmega/enum_device_op_bustype.go index ab778ff5d..fe924dcb8 100644 --- a/pkg/dialects/ardupilotmega/enum_device_op_bustype.go +++ b/pkg/dialects/ardupilotmega/enum_device_op_bustype.go @@ -49,8 +49,6 @@ func (e *DEVICE_OP_BUSTYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e DEVICE_OP_BUSTYPE) String() string { - if name, ok := labels_DEVICE_OP_BUSTYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gimbal_axis.go b/pkg/dialects/ardupilotmega/enum_gimbal_axis.go index d48214bef..004f03511 100644 --- a/pkg/dialects/ardupilotmega/enum_gimbal_axis.go +++ b/pkg/dialects/ardupilotmega/enum_gimbal_axis.go @@ -52,8 +52,6 @@ func (e *GIMBAL_AXIS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GIMBAL_AXIS) String() string { - if name, ok := labels_GIMBAL_AXIS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_required.go b/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_required.go index 7796b7aea..6806c5955 100644 --- a/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_required.go +++ b/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_required.go @@ -52,8 +52,6 @@ func (e *GIMBAL_AXIS_CALIBRATION_REQUIRED) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GIMBAL_AXIS_CALIBRATION_REQUIRED) String() string { - if name, ok := labels_GIMBAL_AXIS_CALIBRATION_REQUIRED[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_status.go b/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_status.go index fbc889448..a97404b61 100644 --- a/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_status.go +++ b/pkg/dialects/ardupilotmega/enum_gimbal_axis_calibration_status.go @@ -52,8 +52,6 @@ func (e *GIMBAL_AXIS_CALIBRATION_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GIMBAL_AXIS_CALIBRATION_STATUS) String() string { - if name, ok := labels_GIMBAL_AXIS_CALIBRATION_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_burst_rate.go b/pkg/dialects/ardupilotmega/enum_gopro_burst_rate.go index 6af9129c6..2e4aebeec 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_burst_rate.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_burst_rate.go @@ -76,8 +76,6 @@ func (e *GOPRO_BURST_RATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_BURST_RATE) String() string { - if name, ok := labels_GOPRO_BURST_RATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_capture_mode.go b/pkg/dialects/ardupilotmega/enum_gopro_capture_mode.go index 8887a5493..59825ec5f 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_capture_mode.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_capture_mode.go @@ -72,8 +72,6 @@ func (e *GOPRO_CAPTURE_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_CAPTURE_MODE) String() string { - if name, ok := labels_GOPRO_CAPTURE_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_charging.go b/pkg/dialects/ardupilotmega/enum_gopro_charging.go index 94678a84a..d6d541a8f 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_charging.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_charging.go @@ -48,8 +48,6 @@ func (e *GOPRO_CHARGING) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_CHARGING) String() string { - if name, ok := labels_GOPRO_CHARGING[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_command.go b/pkg/dialects/ardupilotmega/enum_gopro_command.go index ae095d6d0..d9b09f03f 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_command.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_command.go @@ -108,8 +108,6 @@ func (e *GOPRO_COMMAND) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_COMMAND) String() string { - if name, ok := labels_GOPRO_COMMAND[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_field_of_view.go b/pkg/dialects/ardupilotmega/enum_gopro_field_of_view.go index c30e843e4..1a99ecaef 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_field_of_view.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_field_of_view.go @@ -52,8 +52,6 @@ func (e *GOPRO_FIELD_OF_VIEW) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_FIELD_OF_VIEW) String() string { - if name, ok := labels_GOPRO_FIELD_OF_VIEW[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_frame_rate.go b/pkg/dialects/ardupilotmega/enum_gopro_frame_rate.go index 83796791d..b265249ba 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_frame_rate.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_frame_rate.go @@ -96,8 +96,6 @@ func (e *GOPRO_FRAME_RATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_FRAME_RATE) String() string { - if name, ok := labels_GOPRO_FRAME_RATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_heartbeat_status.go b/pkg/dialects/ardupilotmega/enum_gopro_heartbeat_status.go index 6ef3a0b88..2c2278050 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_heartbeat_status.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_heartbeat_status.go @@ -56,8 +56,6 @@ func (e *GOPRO_HEARTBEAT_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_HEARTBEAT_STATUS) String() string { - if name, ok := labels_GOPRO_HEARTBEAT_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_model.go b/pkg/dialects/ardupilotmega/enum_gopro_model.go index beb1fa9b8..8e0c12098 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_model.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_model.go @@ -60,8 +60,6 @@ func (e *GOPRO_MODEL) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_MODEL) String() string { - if name, ok := labels_GOPRO_MODEL[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_photo_resolution.go b/pkg/dialects/ardupilotmega/enum_gopro_photo_resolution.go index 059a60b08..27b0b983a 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_photo_resolution.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_photo_resolution.go @@ -60,8 +60,6 @@ func (e *GOPRO_PHOTO_RESOLUTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_PHOTO_RESOLUTION) String() string { - if name, ok := labels_GOPRO_PHOTO_RESOLUTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_protune_colour.go b/pkg/dialects/ardupilotmega/enum_gopro_protune_colour.go index 2c066808f..a45949617 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_protune_colour.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_protune_colour.go @@ -48,8 +48,6 @@ func (e *GOPRO_PROTUNE_COLOUR) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_PROTUNE_COLOUR) String() string { - if name, ok := labels_GOPRO_PROTUNE_COLOUR[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_protune_exposure.go b/pkg/dialects/ardupilotmega/enum_gopro_protune_exposure.go index e41f49d16..2cd01f61b 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_protune_exposure.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_protune_exposure.go @@ -124,8 +124,6 @@ func (e *GOPRO_PROTUNE_EXPOSURE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_PROTUNE_EXPOSURE) String() string { - if name, ok := labels_GOPRO_PROTUNE_EXPOSURE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_protune_gain.go b/pkg/dialects/ardupilotmega/enum_gopro_protune_gain.go index 693f18c0e..811ac583e 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_protune_gain.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_protune_gain.go @@ -60,8 +60,6 @@ func (e *GOPRO_PROTUNE_GAIN) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_PROTUNE_GAIN) String() string { - if name, ok := labels_GOPRO_PROTUNE_GAIN[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_protune_sharpness.go b/pkg/dialects/ardupilotmega/enum_gopro_protune_sharpness.go index 6494eb81d..5ef891763 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_protune_sharpness.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_protune_sharpness.go @@ -52,8 +52,6 @@ func (e *GOPRO_PROTUNE_SHARPNESS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_PROTUNE_SHARPNESS) String() string { - if name, ok := labels_GOPRO_PROTUNE_SHARPNESS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_protune_white_balance.go b/pkg/dialects/ardupilotmega/enum_gopro_protune_white_balance.go index 00f9c01cc..8c6ff8e05 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_protune_white_balance.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_protune_white_balance.go @@ -60,8 +60,6 @@ func (e *GOPRO_PROTUNE_WHITE_BALANCE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_PROTUNE_WHITE_BALANCE) String() string { - if name, ok := labels_GOPRO_PROTUNE_WHITE_BALANCE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_request_status.go b/pkg/dialects/ardupilotmega/enum_gopro_request_status.go index 6ce2f7afb..2058a58b0 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_request_status.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_request_status.go @@ -48,8 +48,6 @@ func (e *GOPRO_REQUEST_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_REQUEST_STATUS) String() string { - if name, ok := labels_GOPRO_REQUEST_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_gopro_resolution.go b/pkg/dialects/ardupilotmega/enum_gopro_resolution.go index f7d0b706d..9a3a69475 100644 --- a/pkg/dialects/ardupilotmega/enum_gopro_resolution.go +++ b/pkg/dialects/ardupilotmega/enum_gopro_resolution.go @@ -96,8 +96,6 @@ func (e *GOPRO_RESOLUTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GOPRO_RESOLUTION) String() string { - if name, ok := labels_GOPRO_RESOLUTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_heading_type.go b/pkg/dialects/ardupilotmega/enum_heading_type.go index 9a4be8d51..bbe1129cd 100644 --- a/pkg/dialects/ardupilotmega/enum_heading_type.go +++ b/pkg/dialects/ardupilotmega/enum_heading_type.go @@ -46,8 +46,6 @@ func (e *HEADING_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e HEADING_TYPE) String() string { - if name, ok := labels_HEADING_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_led_control_pattern.go b/pkg/dialects/ardupilotmega/enum_led_control_pattern.go index 3c48b8e74..ff5da06c2 100644 --- a/pkg/dialects/ardupilotmega/enum_led_control_pattern.go +++ b/pkg/dialects/ardupilotmega/enum_led_control_pattern.go @@ -52,8 +52,6 @@ func (e *LED_CONTROL_PATTERN) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e LED_CONTROL_PATTERN) String() string { - if name, ok := labels_LED_CONTROL_PATTERN[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_limits_state.go b/pkg/dialects/ardupilotmega/enum_limits_state.go index b52ce6d25..468f495ca 100644 --- a/pkg/dialects/ardupilotmega/enum_limits_state.go +++ b/pkg/dialects/ardupilotmega/enum_limits_state.go @@ -64,8 +64,6 @@ func (e *LIMITS_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e LIMITS_STATE) String() string { - if name, ok := labels_LIMITS_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_mav_cmd.go b/pkg/dialects/ardupilotmega/enum_mav_cmd.go index 6b84ccc36..bdc671ded 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_cmd.go +++ b/pkg/dialects/ardupilotmega/enum_mav_cmd.go @@ -855,8 +855,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_mav_cmd_do_aux_function_switch_level.go b/pkg/dialects/ardupilotmega/enum_mav_cmd_do_aux_function_switch_level.go index efbb0f42c..f254e89ee 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_cmd_do_aux_function_switch_level.go +++ b/pkg/dialects/ardupilotmega/enum_mav_cmd_do_aux_function_switch_level.go @@ -52,8 +52,6 @@ func (e *MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL) UnmarshalText(text []byte) error // String implements the fmt.Stringer interface. func (e MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL) String() string { - if name, ok := labels_MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_mav_mode_gimbal.go b/pkg/dialects/ardupilotmega/enum_mav_mode_gimbal.go index d8521c728..71219fe98 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_mode_gimbal.go +++ b/pkg/dialects/ardupilotmega/enum_mav_mode_gimbal.go @@ -68,8 +68,6 @@ func (e *MAV_MODE_GIMBAL) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_MODE_GIMBAL) String() string { - if name, ok := labels_MAV_MODE_GIMBAL[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_commands.go b/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_commands.go index cfab6732a..5e9443b79 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_commands.go +++ b/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_commands.go @@ -49,8 +49,6 @@ func (e *MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS) String() string { - if name, ok := labels_MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_statuses.go b/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_statuses.go index f612db0bd..c10e694d4 100644 --- a/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_statuses.go +++ b/pkg/dialects/ardupilotmega/enum_mav_remote_log_data_block_statuses.go @@ -49,8 +49,6 @@ func (e *MAV_REMOTE_LOG_DATA_BLOCK_STATUSES) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_REMOTE_LOG_DATA_BLOCK_STATUSES) String() string { - if name, ok := labels_MAV_REMOTE_LOG_DATA_BLOCK_STATUSES[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_osd_param_config_error.go b/pkg/dialects/ardupilotmega/enum_osd_param_config_error.go index 4a89b5ce1..6bcb239d8 100644 --- a/pkg/dialects/ardupilotmega/enum_osd_param_config_error.go +++ b/pkg/dialects/ardupilotmega/enum_osd_param_config_error.go @@ -53,8 +53,6 @@ func (e *OSD_PARAM_CONFIG_ERROR) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e OSD_PARAM_CONFIG_ERROR) String() string { - if name, ok := labels_OSD_PARAM_CONFIG_ERROR[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_osd_param_config_type.go b/pkg/dialects/ardupilotmega/enum_osd_param_config_type.go index 06302c554..467f3f4fa 100644 --- a/pkg/dialects/ardupilotmega/enum_osd_param_config_type.go +++ b/pkg/dialects/ardupilotmega/enum_osd_param_config_type.go @@ -68,8 +68,6 @@ func (e *OSD_PARAM_CONFIG_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e OSD_PARAM_CONFIG_TYPE) String() string { - if name, ok := labels_OSD_PARAM_CONFIG_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_pid_tuning_axis.go b/pkg/dialects/ardupilotmega/enum_pid_tuning_axis.go index fe860da5c..4bc2a202c 100644 --- a/pkg/dialects/ardupilotmega/enum_pid_tuning_axis.go +++ b/pkg/dialects/ardupilotmega/enum_pid_tuning_axis.go @@ -58,8 +58,6 @@ func (e *PID_TUNING_AXIS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PID_TUNING_AXIS) String() string { - if name, ok := labels_PID_TUNING_AXIS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_plane_mode.go b/pkg/dialects/ardupilotmega/enum_plane_mode.go index c918d7c4e..bd16ab20a 100644 --- a/pkg/dialects/ardupilotmega/enum_plane_mode.go +++ b/pkg/dialects/ardupilotmega/enum_plane_mode.go @@ -113,8 +113,6 @@ func (e *PLANE_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PLANE_MODE) String() string { - if name, ok := labels_PLANE_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_rover_mode.go b/pkg/dialects/ardupilotmega/enum_rover_mode.go index 9a099f712..ec72a1439 100644 --- a/pkg/dialects/ardupilotmega/enum_rover_mode.go +++ b/pkg/dialects/ardupilotmega/enum_rover_mode.go @@ -77,8 +77,6 @@ func (e *ROVER_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ROVER_MODE) String() string { - if name, ok := labels_ROVER_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_scripting_cmd.go b/pkg/dialects/ardupilotmega/enum_scripting_cmd.go index 82d08dabc..2c7b6dda9 100644 --- a/pkg/dialects/ardupilotmega/enum_scripting_cmd.go +++ b/pkg/dialects/ardupilotmega/enum_scripting_cmd.go @@ -56,8 +56,6 @@ func (e *SCRIPTING_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e SCRIPTING_CMD) String() string { - if name, ok := labels_SCRIPTING_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_sub_mode.go b/pkg/dialects/ardupilotmega/enum_sub_mode.go index ef6b7156c..99b5ff0f4 100644 --- a/pkg/dialects/ardupilotmega/enum_sub_mode.go +++ b/pkg/dialects/ardupilotmega/enum_sub_mode.go @@ -68,8 +68,6 @@ func (e *SUB_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e SUB_MODE) String() string { - if name, ok := labels_SUB_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ardupilotmega/enum_tracker_mode.go b/pkg/dialects/ardupilotmega/enum_tracker_mode.go index dbea221dc..4b3db8447 100644 --- a/pkg/dialects/ardupilotmega/enum_tracker_mode.go +++ b/pkg/dialects/ardupilotmega/enum_tracker_mode.go @@ -59,8 +59,6 @@ func (e *TRACKER_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e TRACKER_MODE) String() string { - if name, ok := labels_TRACKER_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/asluav/enum_gsm_link_type.go b/pkg/dialects/asluav/enum_gsm_link_type.go index 374e76595..306c0aa0f 100644 --- a/pkg/dialects/asluav/enum_gsm_link_type.go +++ b/pkg/dialects/asluav/enum_gsm_link_type.go @@ -60,8 +60,6 @@ func (e *GSM_LINK_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GSM_LINK_TYPE) String() string { - if name, ok := labels_GSM_LINK_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/asluav/enum_gsm_modem_type.go b/pkg/dialects/asluav/enum_gsm_modem_type.go index 11e40478d..3d3f51648 100644 --- a/pkg/dialects/asluav/enum_gsm_modem_type.go +++ b/pkg/dialects/asluav/enum_gsm_modem_type.go @@ -48,8 +48,6 @@ func (e *GSM_MODEM_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GSM_MODEM_TYPE) String() string { - if name, ok := labels_GSM_MODEM_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/asluav/enum_mav_cmd.go b/pkg/dialects/asluav/enum_mav_cmd.go index 2fcb5e83f..d13fc8b41 100644 --- a/pkg/dialects/asluav/enum_mav_cmd.go +++ b/pkg/dialects/asluav/enum_mav_cmd.go @@ -734,8 +734,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/avssuas/enum_avss_horsefly_operation_mode.go b/pkg/dialects/avssuas/enum_avss_horsefly_operation_mode.go index 278496669..34150e641 100644 --- a/pkg/dialects/avssuas/enum_avss_horsefly_operation_mode.go +++ b/pkg/dialects/avssuas/enum_avss_horsefly_operation_mode.go @@ -60,8 +60,6 @@ func (e *AVSS_HORSEFLY_OPERATION_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e AVSS_HORSEFLY_OPERATION_MODE) String() string { - if name, ok := labels_AVSS_HORSEFLY_OPERATION_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/avssuas/enum_avss_m300_operation_mode.go b/pkg/dialects/avssuas/enum_avss_m300_operation_mode.go index f4c793aaf..48c81eec2 100644 --- a/pkg/dialects/avssuas/enum_avss_m300_operation_mode.go +++ b/pkg/dialects/avssuas/enum_avss_m300_operation_mode.go @@ -96,8 +96,6 @@ func (e *AVSS_M300_OPERATION_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e AVSS_M300_OPERATION_MODE) String() string { - if name, ok := labels_AVSS_M300_OPERATION_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/avssuas/enum_mav_avss_command_failure_reason.go b/pkg/dialects/avssuas/enum_mav_avss_command_failure_reason.go index 04fb7d192..47031d98e 100644 --- a/pkg/dialects/avssuas/enum_mav_avss_command_failure_reason.go +++ b/pkg/dialects/avssuas/enum_mav_avss_command_failure_reason.go @@ -52,8 +52,6 @@ func (e *MAV_AVSS_COMMAND_FAILURE_REASON) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_AVSS_COMMAND_FAILURE_REASON) String() string { - if name, ok := labels_MAV_AVSS_COMMAND_FAILURE_REASON[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/avssuas/enum_mav_cmd.go b/pkg/dialects/avssuas/enum_mav_cmd.go index f43cc650b..e9af426e1 100644 --- a/pkg/dialects/avssuas/enum_mav_cmd.go +++ b/pkg/dialects/avssuas/enum_mav_cmd.go @@ -754,8 +754,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_actuator_configuration.go b/pkg/dialects/common/enum_actuator_configuration.go index c2ab16d1b..385d033ea 100644 --- a/pkg/dialects/common/enum_actuator_configuration.go +++ b/pkg/dialects/common/enum_actuator_configuration.go @@ -65,8 +65,6 @@ func (e *ACTUATOR_CONFIGURATION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ACTUATOR_CONFIGURATION) String() string { - if name, ok := labels_ACTUATOR_CONFIGURATION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_actuator_output_function.go b/pkg/dialects/common/enum_actuator_output_function.go index e52499728..44b3cfcab 100644 --- a/pkg/dialects/common/enum_actuator_output_function.go +++ b/pkg/dialects/common/enum_actuator_output_function.go @@ -173,8 +173,6 @@ func (e *ACTUATOR_OUTPUT_FUNCTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ACTUATOR_OUTPUT_FUNCTION) String() string { - if name, ok := labels_ACTUATOR_OUTPUT_FUNCTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_adsb_altitude_type.go b/pkg/dialects/common/enum_adsb_altitude_type.go index c5ac7e7c8..3e9f70627 100644 --- a/pkg/dialects/common/enum_adsb_altitude_type.go +++ b/pkg/dialects/common/enum_adsb_altitude_type.go @@ -49,8 +49,6 @@ func (e *ADSB_ALTITUDE_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ADSB_ALTITUDE_TYPE) String() string { - if name, ok := labels_ADSB_ALTITUDE_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_adsb_emitter_type.go b/pkg/dialects/common/enum_adsb_emitter_type.go index 7eed25f78..ef72cebad 100644 --- a/pkg/dialects/common/enum_adsb_emitter_type.go +++ b/pkg/dialects/common/enum_adsb_emitter_type.go @@ -101,8 +101,6 @@ func (e *ADSB_EMITTER_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ADSB_EMITTER_TYPE) String() string { - if name, ok := labels_ADSB_EMITTER_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_ais_nav_status.go b/pkg/dialects/common/enum_ais_nav_status.go index 3b0cdc05f..83214b55a 100644 --- a/pkg/dialects/common/enum_ais_nav_status.go +++ b/pkg/dialects/common/enum_ais_nav_status.go @@ -92,8 +92,6 @@ func (e *AIS_NAV_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e AIS_NAV_STATUS) String() string { - if name, ok := labels_AIS_NAV_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_ais_type.go b/pkg/dialects/common/enum_ais_type.go index beb2eb910..1b91cab41 100644 --- a/pkg/dialects/common/enum_ais_type.go +++ b/pkg/dialects/common/enum_ais_type.go @@ -349,8 +349,6 @@ func (e *AIS_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e AIS_TYPE) String() string { - if name, ok := labels_AIS_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_camera_mode.go b/pkg/dialects/common/enum_camera_mode.go index 1e4da54a4..d2d1aea08 100644 --- a/pkg/dialects/common/enum_camera_mode.go +++ b/pkg/dialects/common/enum_camera_mode.go @@ -53,8 +53,6 @@ func (e *CAMERA_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAMERA_MODE) String() string { - if name, ok := labels_CAMERA_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_camera_tracking_mode.go b/pkg/dialects/common/enum_camera_tracking_mode.go index ab9683241..6d2f58388 100644 --- a/pkg/dialects/common/enum_camera_tracking_mode.go +++ b/pkg/dialects/common/enum_camera_tracking_mode.go @@ -53,8 +53,6 @@ func (e *CAMERA_TRACKING_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAMERA_TRACKING_MODE) String() string { - if name, ok := labels_CAMERA_TRACKING_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_camera_tracking_status_flags.go b/pkg/dialects/common/enum_camera_tracking_status_flags.go index 2a93eb53d..08fb9ad64 100644 --- a/pkg/dialects/common/enum_camera_tracking_status_flags.go +++ b/pkg/dialects/common/enum_camera_tracking_status_flags.go @@ -53,8 +53,6 @@ func (e *CAMERA_TRACKING_STATUS_FLAGS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAMERA_TRACKING_STATUS_FLAGS) String() string { - if name, ok := labels_CAMERA_TRACKING_STATUS_FLAGS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_camera_zoom_type.go b/pkg/dialects/common/enum_camera_zoom_type.go index c3d06f37e..c6a181e3c 100644 --- a/pkg/dialects/common/enum_camera_zoom_type.go +++ b/pkg/dialects/common/enum_camera_zoom_type.go @@ -61,8 +61,6 @@ func (e *CAMERA_ZOOM_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAMERA_ZOOM_TYPE) String() string { - if name, ok := labels_CAMERA_ZOOM_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_can_filter_op.go b/pkg/dialects/common/enum_can_filter_op.go index d516b7e9f..051acf900 100644 --- a/pkg/dialects/common/enum_can_filter_op.go +++ b/pkg/dialects/common/enum_can_filter_op.go @@ -49,8 +49,6 @@ func (e *CAN_FILTER_OP) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CAN_FILTER_OP) String() string { - if name, ok := labels_CAN_FILTER_OP[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_cellular_config_response.go b/pkg/dialects/common/enum_cellular_config_response.go index 7f938bddd..99c3950a3 100644 --- a/pkg/dialects/common/enum_cellular_config_response.go +++ b/pkg/dialects/common/enum_cellular_config_response.go @@ -61,8 +61,6 @@ func (e *CELLULAR_CONFIG_RESPONSE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CELLULAR_CONFIG_RESPONSE) String() string { - if name, ok := labels_CELLULAR_CONFIG_RESPONSE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_cellular_network_failed_reason.go b/pkg/dialects/common/enum_cellular_network_failed_reason.go index ce724f667..afe340d70 100644 --- a/pkg/dialects/common/enum_cellular_network_failed_reason.go +++ b/pkg/dialects/common/enum_cellular_network_failed_reason.go @@ -57,8 +57,6 @@ func (e *CELLULAR_NETWORK_FAILED_REASON) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CELLULAR_NETWORK_FAILED_REASON) String() string { - if name, ok := labels_CELLULAR_NETWORK_FAILED_REASON[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_cellular_network_radio_type.go b/pkg/dialects/common/enum_cellular_network_radio_type.go index fdf5799cf..2c0044b29 100644 --- a/pkg/dialects/common/enum_cellular_network_radio_type.go +++ b/pkg/dialects/common/enum_cellular_network_radio_type.go @@ -56,8 +56,6 @@ func (e *CELLULAR_NETWORK_RADIO_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CELLULAR_NETWORK_RADIO_TYPE) String() string { - if name, ok := labels_CELLULAR_NETWORK_RADIO_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_cellular_status_flag.go b/pkg/dialects/common/enum_cellular_status_flag.go index e143f3014..14c7bed1c 100644 --- a/pkg/dialects/common/enum_cellular_status_flag.go +++ b/pkg/dialects/common/enum_cellular_status_flag.go @@ -93,8 +93,6 @@ func (e *CELLULAR_STATUS_FLAG) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e CELLULAR_STATUS_FLAG) String() string { - if name, ok := labels_CELLULAR_STATUS_FLAG[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_comp_metadata_type.go b/pkg/dialects/common/enum_comp_metadata_type.go index 808259340..f73269f8c 100644 --- a/pkg/dialects/common/enum_comp_metadata_type.go +++ b/pkg/dialects/common/enum_comp_metadata_type.go @@ -65,8 +65,6 @@ func (e *COMP_METADATA_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e COMP_METADATA_TYPE) String() string { - if name, ok := labels_COMP_METADATA_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_esc_connection_type.go b/pkg/dialects/common/enum_esc_connection_type.go index e98f366ac..58118c3c6 100644 --- a/pkg/dialects/common/enum_esc_connection_type.go +++ b/pkg/dialects/common/enum_esc_connection_type.go @@ -65,8 +65,6 @@ func (e *ESC_CONNECTION_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ESC_CONNECTION_TYPE) String() string { - if name, ok := labels_ESC_CONNECTION_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_failure_type.go b/pkg/dialects/common/enum_failure_type.go index 5272f83a8..734bda3cb 100644 --- a/pkg/dialects/common/enum_failure_type.go +++ b/pkg/dialects/common/enum_failure_type.go @@ -73,8 +73,6 @@ func (e *FAILURE_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e FAILURE_TYPE) String() string { - if name, ok := labels_FAILURE_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_failure_unit.go b/pkg/dialects/common/enum_failure_unit.go index 56b97b089..63db97cb1 100644 --- a/pkg/dialects/common/enum_failure_unit.go +++ b/pkg/dialects/common/enum_failure_unit.go @@ -86,8 +86,6 @@ func (e *FAILURE_UNIT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e FAILURE_UNIT) String() string { - if name, ok := labels_FAILURE_UNIT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_fence_action.go b/pkg/dialects/common/enum_fence_action.go index 56524103e..54845fddf 100644 --- a/pkg/dialects/common/enum_fence_action.go +++ b/pkg/dialects/common/enum_fence_action.go @@ -73,8 +73,6 @@ func (e *FENCE_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e FENCE_ACTION) String() string { - if name, ok := labels_FENCE_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_fence_breach.go b/pkg/dialects/common/enum_fence_breach.go index 4ea3b031a..a05c7c9ec 100644 --- a/pkg/dialects/common/enum_fence_breach.go +++ b/pkg/dialects/common/enum_fence_breach.go @@ -56,8 +56,6 @@ func (e *FENCE_BREACH) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e FENCE_BREACH) String() string { - if name, ok := labels_FENCE_BREACH[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_fence_mitigate.go b/pkg/dialects/common/enum_fence_mitigate.go index ed64200af..5dc5e65ea 100644 --- a/pkg/dialects/common/enum_fence_mitigate.go +++ b/pkg/dialects/common/enum_fence_mitigate.go @@ -53,8 +53,6 @@ func (e *FENCE_MITIGATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e FENCE_MITIGATE) String() string { - if name, ok := labels_FENCE_MITIGATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_firmware_version_type.go b/pkg/dialects/common/enum_firmware_version_type.go index 4e70ad475..a460159fe 100644 --- a/pkg/dialects/common/enum_firmware_version_type.go +++ b/pkg/dialects/common/enum_firmware_version_type.go @@ -61,8 +61,6 @@ func (e *FIRMWARE_VERSION_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e FIRMWARE_VERSION_TYPE) String() string { - if name, ok := labels_FIRMWARE_VERSION_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_gps_fix_type.go b/pkg/dialects/common/enum_gps_fix_type.go index 32dec864b..1ebe2f256 100644 --- a/pkg/dialects/common/enum_gps_fix_type.go +++ b/pkg/dialects/common/enum_gps_fix_type.go @@ -77,8 +77,6 @@ func (e *GPS_FIX_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GPS_FIX_TYPE) String() string { - if name, ok := labels_GPS_FIX_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_gripper_actions.go b/pkg/dialects/common/enum_gripper_actions.go index 2f0ed8634..279e1362e 100644 --- a/pkg/dialects/common/enum_gripper_actions.go +++ b/pkg/dialects/common/enum_gripper_actions.go @@ -49,8 +49,6 @@ func (e *GRIPPER_ACTIONS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e GRIPPER_ACTIONS) String() string { - if name, ok := labels_GRIPPER_ACTIONS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_landing_target_type.go b/pkg/dialects/common/enum_landing_target_type.go index 10b5e8c68..9144a562d 100644 --- a/pkg/dialects/common/enum_landing_target_type.go +++ b/pkg/dialects/common/enum_landing_target_type.go @@ -57,8 +57,6 @@ func (e *LANDING_TARGET_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e LANDING_TARGET_TYPE) String() string { - if name, ok := labels_LANDING_TARGET_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mag_cal_status.go b/pkg/dialects/common/enum_mag_cal_status.go index 4635c907c..0e6cddde9 100644 --- a/pkg/dialects/common/enum_mag_cal_status.go +++ b/pkg/dialects/common/enum_mag_cal_status.go @@ -64,8 +64,6 @@ func (e *MAG_CAL_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAG_CAL_STATUS) String() string { - if name, ok := labels_MAG_CAL_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_arm_auth_denied_reason.go b/pkg/dialects/common/enum_mav_arm_auth_denied_reason.go index b3aa33782..7ac75bb2a 100644 --- a/pkg/dialects/common/enum_mav_arm_auth_denied_reason.go +++ b/pkg/dialects/common/enum_mav_arm_auth_denied_reason.go @@ -64,8 +64,6 @@ func (e *MAV_ARM_AUTH_DENIED_REASON) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ARM_AUTH_DENIED_REASON) String() string { - if name, ok := labels_MAV_ARM_AUTH_DENIED_REASON[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_battery_charge_state.go b/pkg/dialects/common/enum_mav_battery_charge_state.go index a3ab40912..e19a5a961 100644 --- a/pkg/dialects/common/enum_mav_battery_charge_state.go +++ b/pkg/dialects/common/enum_mav_battery_charge_state.go @@ -73,8 +73,6 @@ func (e *MAV_BATTERY_CHARGE_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_BATTERY_CHARGE_STATE) String() string { - if name, ok := labels_MAV_BATTERY_CHARGE_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_battery_function.go b/pkg/dialects/common/enum_mav_battery_function.go index 96f28f5a0..482fdd1b5 100644 --- a/pkg/dialects/common/enum_mav_battery_function.go +++ b/pkg/dialects/common/enum_mav_battery_function.go @@ -61,8 +61,6 @@ func (e *MAV_BATTERY_FUNCTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_BATTERY_FUNCTION) String() string { - if name, ok := labels_MAV_BATTERY_FUNCTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_battery_mode.go b/pkg/dialects/common/enum_mav_battery_mode.go index 4a4ca30a1..0cb33f056 100644 --- a/pkg/dialects/common/enum_mav_battery_mode.go +++ b/pkg/dialects/common/enum_mav_battery_mode.go @@ -53,8 +53,6 @@ func (e *MAV_BATTERY_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_BATTERY_MODE) String() string { - if name, ok := labels_MAV_BATTERY_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_battery_type.go b/pkg/dialects/common/enum_mav_battery_type.go index c86682b54..1f6b5c547 100644 --- a/pkg/dialects/common/enum_mav_battery_type.go +++ b/pkg/dialects/common/enum_mav_battery_type.go @@ -61,8 +61,6 @@ func (e *MAV_BATTERY_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_BATTERY_TYPE) String() string { - if name, ok := labels_MAV_BATTERY_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + 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 7128f605f..c75e7d2ec 100644 --- a/pkg/dialects/common/enum_mav_cmd.go +++ b/pkg/dialects/common/enum_mav_cmd.go @@ -726,8 +726,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_collision_action.go b/pkg/dialects/common/enum_mav_collision_action.go index 0d17ab32a..a43bc6ee5 100644 --- a/pkg/dialects/common/enum_mav_collision_action.go +++ b/pkg/dialects/common/enum_mav_collision_action.go @@ -69,8 +69,6 @@ func (e *MAV_COLLISION_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_COLLISION_ACTION) String() string { - if name, ok := labels_MAV_COLLISION_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_collision_src.go b/pkg/dialects/common/enum_mav_collision_src.go index 44d01fcb1..c4323eabf 100644 --- a/pkg/dialects/common/enum_mav_collision_src.go +++ b/pkg/dialects/common/enum_mav_collision_src.go @@ -49,8 +49,6 @@ func (e *MAV_COLLISION_SRC) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_COLLISION_SRC) String() string { - if name, ok := labels_MAV_COLLISION_SRC[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_collision_threat_level.go b/pkg/dialects/common/enum_mav_collision_threat_level.go index 9ba380585..a913dd8b0 100644 --- a/pkg/dialects/common/enum_mav_collision_threat_level.go +++ b/pkg/dialects/common/enum_mav_collision_threat_level.go @@ -53,8 +53,6 @@ func (e *MAV_COLLISION_THREAT_LEVEL) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_COLLISION_THREAT_LEVEL) String() string { - if name, ok := labels_MAV_COLLISION_THREAT_LEVEL[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_data_stream.go b/pkg/dialects/common/enum_mav_data_stream.go index df17ca654..d978de535 100644 --- a/pkg/dialects/common/enum_mav_data_stream.go +++ b/pkg/dialects/common/enum_mav_data_stream.go @@ -79,8 +79,6 @@ func (e *MAV_DATA_STREAM) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_DATA_STREAM) String() string { - if name, ok := labels_MAV_DATA_STREAM[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_distance_sensor.go b/pkg/dialects/common/enum_mav_distance_sensor.go index 31323d7e2..efcadf6dd 100644 --- a/pkg/dialects/common/enum_mav_distance_sensor.go +++ b/pkg/dialects/common/enum_mav_distance_sensor.go @@ -61,8 +61,6 @@ func (e *MAV_DISTANCE_SENSOR) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_DISTANCE_SENSOR) String() string { - if name, ok := labels_MAV_DISTANCE_SENSOR[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_estimator_type.go b/pkg/dialects/common/enum_mav_estimator_type.go index 82be880aa..34971e2e3 100644 --- a/pkg/dialects/common/enum_mav_estimator_type.go +++ b/pkg/dialects/common/enum_mav_estimator_type.go @@ -77,8 +77,6 @@ func (e *MAV_ESTIMATOR_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ESTIMATOR_TYPE) String() string { - if name, ok := labels_MAV_ESTIMATOR_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_event_current_sequence_flags.go b/pkg/dialects/common/enum_mav_event_current_sequence_flags.go index 9a0fa3563..5c7ef76ee 100644 --- a/pkg/dialects/common/enum_mav_event_current_sequence_flags.go +++ b/pkg/dialects/common/enum_mav_event_current_sequence_flags.go @@ -45,8 +45,6 @@ func (e *MAV_EVENT_CURRENT_SEQUENCE_FLAGS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_EVENT_CURRENT_SEQUENCE_FLAGS) String() string { - if name, ok := labels_MAV_EVENT_CURRENT_SEQUENCE_FLAGS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_event_error_reason.go b/pkg/dialects/common/enum_mav_event_error_reason.go index 843a50cbe..f6eed4c7f 100644 --- a/pkg/dialects/common/enum_mav_event_error_reason.go +++ b/pkg/dialects/common/enum_mav_event_error_reason.go @@ -45,8 +45,6 @@ func (e *MAV_EVENT_ERROR_REASON) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_EVENT_ERROR_REASON) String() string { - if name, ok := labels_MAV_EVENT_ERROR_REASON[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_frame.go b/pkg/dialects/common/enum_mav_frame.go index 74738808b..e582aad5b 100644 --- a/pkg/dialects/common/enum_mav_frame.go +++ b/pkg/dialects/common/enum_mav_frame.go @@ -142,8 +142,6 @@ func (e *MAV_FRAME) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_FRAME) String() string { - if name, ok := labels_MAV_FRAME[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_ftp_err.go b/pkg/dialects/common/enum_mav_ftp_err.go index d2f25c514..5f9f0ae94 100644 --- a/pkg/dialects/common/enum_mav_ftp_err.go +++ b/pkg/dialects/common/enum_mav_ftp_err.go @@ -86,8 +86,6 @@ func (e *MAV_FTP_ERR) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_FTP_ERR) String() string { - if name, ok := labels_MAV_FTP_ERR[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_ftp_opcode.go b/pkg/dialects/common/enum_mav_ftp_opcode.go index df8999a97..3bec8face 100644 --- a/pkg/dialects/common/enum_mav_ftp_opcode.go +++ b/pkg/dialects/common/enum_mav_ftp_opcode.go @@ -113,8 +113,6 @@ func (e *MAV_FTP_OPCODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_FTP_OPCODE) String() string { - if name, ok := labels_MAV_FTP_OPCODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_goto.go b/pkg/dialects/common/enum_mav_goto.go index c063c760c..d0d0a1990 100644 --- a/pkg/dialects/common/enum_mav_goto.go +++ b/pkg/dialects/common/enum_mav_goto.go @@ -57,8 +57,6 @@ func (e *MAV_GOTO) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_GOTO) String() string { - if name, ok := labels_MAV_GOTO[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_landed_state.go b/pkg/dialects/common/enum_mav_landed_state.go index 0b344be3d..e415917eb 100644 --- a/pkg/dialects/common/enum_mav_landed_state.go +++ b/pkg/dialects/common/enum_mav_landed_state.go @@ -61,8 +61,6 @@ func (e *MAV_LANDED_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_LANDED_STATE) String() string { - if name, ok := labels_MAV_LANDED_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_mission_result.go b/pkg/dialects/common/enum_mav_mission_result.go index f906c1ad1..8935c65e3 100644 --- a/pkg/dialects/common/enum_mav_mission_result.go +++ b/pkg/dialects/common/enum_mav_mission_result.go @@ -105,8 +105,6 @@ func (e *MAV_MISSION_RESULT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_MISSION_RESULT) String() string { - if name, ok := labels_MAV_MISSION_RESULT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_mission_type.go b/pkg/dialects/common/enum_mav_mission_type.go index 0189898ec..fb1b941d8 100644 --- a/pkg/dialects/common/enum_mav_mission_type.go +++ b/pkg/dialects/common/enum_mav_mission_type.go @@ -57,8 +57,6 @@ func (e *MAV_MISSION_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_MISSION_TYPE) String() string { - if name, ok := labels_MAV_MISSION_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_mode.go b/pkg/dialects/common/enum_mav_mode.go index 56f1d8a8c..6c87877bc 100644 --- a/pkg/dialects/common/enum_mav_mode.go +++ b/pkg/dialects/common/enum_mav_mode.go @@ -86,8 +86,6 @@ func (e *MAV_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_MODE) String() string { - if name, ok := labels_MAV_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_mount_mode.go b/pkg/dialects/common/enum_mav_mount_mode.go index 47b7d1344..31a5d566b 100644 --- a/pkg/dialects/common/enum_mav_mount_mode.go +++ b/pkg/dialects/common/enum_mav_mount_mode.go @@ -69,8 +69,6 @@ func (e *MAV_MOUNT_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_MOUNT_MODE) String() string { - if name, ok := labels_MAV_MOUNT_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_arm_status.go b/pkg/dialects/common/enum_mav_odid_arm_status.go index ef63cb4c0..c1bb09357 100644 --- a/pkg/dialects/common/enum_mav_odid_arm_status.go +++ b/pkg/dialects/common/enum_mav_odid_arm_status.go @@ -48,8 +48,6 @@ func (e *MAV_ODID_ARM_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_ARM_STATUS) String() string { - if name, ok := labels_MAV_ODID_ARM_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_auth_type.go b/pkg/dialects/common/enum_mav_odid_auth_type.go index aa901b159..0f25f6d9a 100644 --- a/pkg/dialects/common/enum_mav_odid_auth_type.go +++ b/pkg/dialects/common/enum_mav_odid_auth_type.go @@ -64,8 +64,6 @@ func (e *MAV_ODID_AUTH_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_AUTH_TYPE) String() string { - if name, ok := labels_MAV_ODID_AUTH_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_category_eu.go b/pkg/dialects/common/enum_mav_odid_category_eu.go index 0c54638cd..e11fef16e 100644 --- a/pkg/dialects/common/enum_mav_odid_category_eu.go +++ b/pkg/dialects/common/enum_mav_odid_category_eu.go @@ -56,8 +56,6 @@ func (e *MAV_ODID_CATEGORY_EU) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_CATEGORY_EU) String() string { - if name, ok := labels_MAV_ODID_CATEGORY_EU[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_class_eu.go b/pkg/dialects/common/enum_mav_odid_class_eu.go index 2974cdc72..0ec27dd75 100644 --- a/pkg/dialects/common/enum_mav_odid_class_eu.go +++ b/pkg/dialects/common/enum_mav_odid_class_eu.go @@ -72,8 +72,6 @@ func (e *MAV_ODID_CLASS_EU) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_CLASS_EU) String() string { - if name, ok := labels_MAV_ODID_CLASS_EU[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_classification_type.go b/pkg/dialects/common/enum_mav_odid_classification_type.go index 7926fe5ff..4f23fe7c0 100644 --- a/pkg/dialects/common/enum_mav_odid_classification_type.go +++ b/pkg/dialects/common/enum_mav_odid_classification_type.go @@ -48,8 +48,6 @@ func (e *MAV_ODID_CLASSIFICATION_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_CLASSIFICATION_TYPE) String() string { - if name, ok := labels_MAV_ODID_CLASSIFICATION_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_desc_type.go b/pkg/dialects/common/enum_mav_odid_desc_type.go index 74775890d..640db23ce 100644 --- a/pkg/dialects/common/enum_mav_odid_desc_type.go +++ b/pkg/dialects/common/enum_mav_odid_desc_type.go @@ -52,8 +52,6 @@ func (e *MAV_ODID_DESC_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_DESC_TYPE) String() string { - if name, ok := labels_MAV_ODID_DESC_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_height_ref.go b/pkg/dialects/common/enum_mav_odid_height_ref.go index bd1ae63c0..3b08bd85f 100644 --- a/pkg/dialects/common/enum_mav_odid_height_ref.go +++ b/pkg/dialects/common/enum_mav_odid_height_ref.go @@ -48,8 +48,6 @@ func (e *MAV_ODID_HEIGHT_REF) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_HEIGHT_REF) String() string { - if name, ok := labels_MAV_ODID_HEIGHT_REF[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_hor_acc.go b/pkg/dialects/common/enum_mav_odid_hor_acc.go index ab06630c1..6cc1e4247 100644 --- a/pkg/dialects/common/enum_mav_odid_hor_acc.go +++ b/pkg/dialects/common/enum_mav_odid_hor_acc.go @@ -92,8 +92,6 @@ func (e *MAV_ODID_HOR_ACC) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_HOR_ACC) String() string { - if name, ok := labels_MAV_ODID_HOR_ACC[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_id_type.go b/pkg/dialects/common/enum_mav_odid_id_type.go index 4bc5fe6c6..0a8f597ba 100644 --- a/pkg/dialects/common/enum_mav_odid_id_type.go +++ b/pkg/dialects/common/enum_mav_odid_id_type.go @@ -60,8 +60,6 @@ func (e *MAV_ODID_ID_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_ID_TYPE) String() string { - if name, ok := labels_MAV_ODID_ID_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_operator_id_type.go b/pkg/dialects/common/enum_mav_odid_operator_id_type.go index 4e67a5bb9..b6fd6f6a6 100644 --- a/pkg/dialects/common/enum_mav_odid_operator_id_type.go +++ b/pkg/dialects/common/enum_mav_odid_operator_id_type.go @@ -44,8 +44,6 @@ func (e *MAV_ODID_OPERATOR_ID_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_OPERATOR_ID_TYPE) String() string { - if name, ok := labels_MAV_ODID_OPERATOR_ID_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_operator_location_type.go b/pkg/dialects/common/enum_mav_odid_operator_location_type.go index 90c745542..2de2dc593 100644 --- a/pkg/dialects/common/enum_mav_odid_operator_location_type.go +++ b/pkg/dialects/common/enum_mav_odid_operator_location_type.go @@ -52,8 +52,6 @@ func (e *MAV_ODID_OPERATOR_LOCATION_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_OPERATOR_LOCATION_TYPE) String() string { - if name, ok := labels_MAV_ODID_OPERATOR_LOCATION_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_speed_acc.go b/pkg/dialects/common/enum_mav_odid_speed_acc.go index 91ce0cf9c..d4106dace 100644 --- a/pkg/dialects/common/enum_mav_odid_speed_acc.go +++ b/pkg/dialects/common/enum_mav_odid_speed_acc.go @@ -60,8 +60,6 @@ func (e *MAV_ODID_SPEED_ACC) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_SPEED_ACC) String() string { - if name, ok := labels_MAV_ODID_SPEED_ACC[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_status.go b/pkg/dialects/common/enum_mav_odid_status.go index be3100589..eaf72ddf6 100644 --- a/pkg/dialects/common/enum_mav_odid_status.go +++ b/pkg/dialects/common/enum_mav_odid_status.go @@ -60,8 +60,6 @@ func (e *MAV_ODID_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_STATUS) String() string { - if name, ok := labels_MAV_ODID_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_time_acc.go b/pkg/dialects/common/enum_mav_odid_time_acc.go index 151978b5a..df5522f35 100644 --- a/pkg/dialects/common/enum_mav_odid_time_acc.go +++ b/pkg/dialects/common/enum_mav_odid_time_acc.go @@ -104,8 +104,6 @@ func (e *MAV_ODID_TIME_ACC) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_TIME_ACC) String() string { - if name, ok := labels_MAV_ODID_TIME_ACC[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_ua_type.go b/pkg/dialects/common/enum_mav_odid_ua_type.go index c1ef01f41..1f0da1fb1 100644 --- a/pkg/dialects/common/enum_mav_odid_ua_type.go +++ b/pkg/dialects/common/enum_mav_odid_ua_type.go @@ -104,8 +104,6 @@ func (e *MAV_ODID_UA_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_UA_TYPE) String() string { - if name, ok := labels_MAV_ODID_UA_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_odid_ver_acc.go b/pkg/dialects/common/enum_mav_odid_ver_acc.go index 76036f700..6ab9596c9 100644 --- a/pkg/dialects/common/enum_mav_odid_ver_acc.go +++ b/pkg/dialects/common/enum_mav_odid_ver_acc.go @@ -68,8 +68,6 @@ func (e *MAV_ODID_VER_ACC) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ODID_VER_ACC) String() string { - if name, ok := labels_MAV_ODID_VER_ACC[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_param_ext_type.go b/pkg/dialects/common/enum_mav_param_ext_type.go index b4d608515..2694327af 100644 --- a/pkg/dialects/common/enum_mav_param_ext_type.go +++ b/pkg/dialects/common/enum_mav_param_ext_type.go @@ -85,8 +85,6 @@ func (e *MAV_PARAM_EXT_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_PARAM_EXT_TYPE) String() string { - if name, ok := labels_MAV_PARAM_EXT_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_param_type.go b/pkg/dialects/common/enum_mav_param_type.go index bec69caec..f1ab8c444 100644 --- a/pkg/dialects/common/enum_mav_param_type.go +++ b/pkg/dialects/common/enum_mav_param_type.go @@ -81,8 +81,6 @@ func (e *MAV_PARAM_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_PARAM_TYPE) String() string { - if name, ok := labels_MAV_PARAM_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_result.go b/pkg/dialects/common/enum_mav_result.go index a95513fab..e297a1f15 100644 --- a/pkg/dialects/common/enum_mav_result.go +++ b/pkg/dialects/common/enum_mav_result.go @@ -81,8 +81,6 @@ func (e *MAV_RESULT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_RESULT) String() string { - if name, ok := labels_MAV_RESULT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_roi.go b/pkg/dialects/common/enum_mav_roi.go index d3f0498a2..5ef43aa3b 100644 --- a/pkg/dialects/common/enum_mav_roi.go +++ b/pkg/dialects/common/enum_mav_roi.go @@ -63,8 +63,6 @@ func (e *MAV_ROI) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_ROI) String() string { - if name, ok := labels_MAV_ROI[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_sensor_orientation.go b/pkg/dialects/common/enum_mav_sensor_orientation.go index 61bae1d4d..71092be8e 100644 --- a/pkg/dialects/common/enum_mav_sensor_orientation.go +++ b/pkg/dialects/common/enum_mav_sensor_orientation.go @@ -209,8 +209,6 @@ func (e *MAV_SENSOR_ORIENTATION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_SENSOR_ORIENTATION) String() string { - if name, ok := labels_MAV_SENSOR_ORIENTATION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_severity.go b/pkg/dialects/common/enum_mav_severity.go index 455f8b1e6..c83abd8d7 100644 --- a/pkg/dialects/common/enum_mav_severity.go +++ b/pkg/dialects/common/enum_mav_severity.go @@ -73,8 +73,6 @@ func (e *MAV_SEVERITY) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_SEVERITY) String() string { - if name, ok := labels_MAV_SEVERITY[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_tunnel_payload_type.go b/pkg/dialects/common/enum_mav_tunnel_payload_type.go index 45671ed2b..730f614ed 100644 --- a/pkg/dialects/common/enum_mav_tunnel_payload_type.go +++ b/pkg/dialects/common/enum_mav_tunnel_payload_type.go @@ -84,8 +84,6 @@ func (e *MAV_TUNNEL_PAYLOAD_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_TUNNEL_PAYLOAD_TYPE) String() string { - if name, ok := labels_MAV_TUNNEL_PAYLOAD_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mav_vtol_state.go b/pkg/dialects/common/enum_mav_vtol_state.go index 73656c1cc..8b3af521d 100644 --- a/pkg/dialects/common/enum_mav_vtol_state.go +++ b/pkg/dialects/common/enum_mav_vtol_state.go @@ -61,8 +61,6 @@ func (e *MAV_VTOL_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_VTOL_STATE) String() string { - if name, ok := labels_MAV_VTOL_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mavlink_data_stream_type.go b/pkg/dialects/common/enum_mavlink_data_stream_type.go index 8d1df991f..1c6fb06b8 100644 --- a/pkg/dialects/common/enum_mavlink_data_stream_type.go +++ b/pkg/dialects/common/enum_mavlink_data_stream_type.go @@ -58,8 +58,6 @@ func (e *MAVLINK_DATA_STREAM_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAVLINK_DATA_STREAM_TYPE) String() string { - if name, ok := labels_MAVLINK_DATA_STREAM_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_mission_state.go b/pkg/dialects/common/enum_mission_state.go index 9c6fd64ba..9843ad532 100644 --- a/pkg/dialects/common/enum_mission_state.go +++ b/pkg/dialects/common/enum_mission_state.go @@ -67,8 +67,6 @@ func (e *MISSION_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MISSION_STATE) String() string { - if name, ok := labels_MISSION_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_motor_test_order.go b/pkg/dialects/common/enum_motor_test_order.go index e89e4c131..03161acd5 100644 --- a/pkg/dialects/common/enum_motor_test_order.go +++ b/pkg/dialects/common/enum_motor_test_order.go @@ -53,8 +53,6 @@ func (e *MOTOR_TEST_ORDER) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MOTOR_TEST_ORDER) String() string { - if name, ok := labels_MOTOR_TEST_ORDER[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_motor_test_throttle_type.go b/pkg/dialects/common/enum_motor_test_throttle_type.go index cf020e018..9b947e0a2 100644 --- a/pkg/dialects/common/enum_motor_test_throttle_type.go +++ b/pkg/dialects/common/enum_motor_test_throttle_type.go @@ -57,8 +57,6 @@ func (e *MOTOR_TEST_THROTTLE_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MOTOR_TEST_THROTTLE_TYPE) String() string { - if name, ok := labels_MOTOR_TEST_THROTTLE_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_nav_vtol_land_options.go b/pkg/dialects/common/enum_nav_vtol_land_options.go index 025bbf98c..d3af973fb 100644 --- a/pkg/dialects/common/enum_nav_vtol_land_options.go +++ b/pkg/dialects/common/enum_nav_vtol_land_options.go @@ -53,8 +53,6 @@ func (e *NAV_VTOL_LAND_OPTIONS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e NAV_VTOL_LAND_OPTIONS) String() string { - if name, ok := labels_NAV_VTOL_LAND_OPTIONS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_orbit_yaw_behaviour.go b/pkg/dialects/common/enum_orbit_yaw_behaviour.go index a396574ff..20a4ff7f1 100644 --- a/pkg/dialects/common/enum_orbit_yaw_behaviour.go +++ b/pkg/dialects/common/enum_orbit_yaw_behaviour.go @@ -61,8 +61,6 @@ func (e *ORBIT_YAW_BEHAVIOUR) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ORBIT_YAW_BEHAVIOUR) String() string { - if name, ok := labels_ORBIT_YAW_BEHAVIOUR[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_parachute_action.go b/pkg/dialects/common/enum_parachute_action.go index 21b0fac34..51ead8db6 100644 --- a/pkg/dialects/common/enum_parachute_action.go +++ b/pkg/dialects/common/enum_parachute_action.go @@ -53,8 +53,6 @@ func (e *PARACHUTE_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PARACHUTE_ACTION) String() string { - if name, ok := labels_PARACHUTE_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_param_ack.go b/pkg/dialects/common/enum_param_ack.go index 5c33b134c..d388489d0 100644 --- a/pkg/dialects/common/enum_param_ack.go +++ b/pkg/dialects/common/enum_param_ack.go @@ -57,8 +57,6 @@ func (e *PARAM_ACK) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PARAM_ACK) String() string { - if name, ok := labels_PARAM_ACK[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_precision_land_mode.go b/pkg/dialects/common/enum_precision_land_mode.go index 50184d186..8a3e69cf0 100644 --- a/pkg/dialects/common/enum_precision_land_mode.go +++ b/pkg/dialects/common/enum_precision_land_mode.go @@ -53,8 +53,6 @@ func (e *PRECISION_LAND_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PRECISION_LAND_MODE) String() string { - if name, ok := labels_PRECISION_LAND_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_preflight_storage_mission_action.go b/pkg/dialects/common/enum_preflight_storage_mission_action.go index 065bbf627..8c6ef7d75 100644 --- a/pkg/dialects/common/enum_preflight_storage_mission_action.go +++ b/pkg/dialects/common/enum_preflight_storage_mission_action.go @@ -54,8 +54,6 @@ func (e *PREFLIGHT_STORAGE_MISSION_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PREFLIGHT_STORAGE_MISSION_ACTION) String() string { - if name, ok := labels_PREFLIGHT_STORAGE_MISSION_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_preflight_storage_parameter_action.go b/pkg/dialects/common/enum_preflight_storage_parameter_action.go index 6ceea2963..8dc0ac591 100644 --- a/pkg/dialects/common/enum_preflight_storage_parameter_action.go +++ b/pkg/dialects/common/enum_preflight_storage_parameter_action.go @@ -62,8 +62,6 @@ func (e *PREFLIGHT_STORAGE_PARAMETER_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PREFLIGHT_STORAGE_PARAMETER_ACTION) String() string { - if name, ok := labels_PREFLIGHT_STORAGE_PARAMETER_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_rc_type.go b/pkg/dialects/common/enum_rc_type.go index 77fa986bd..642cdb600 100644 --- a/pkg/dialects/common/enum_rc_type.go +++ b/pkg/dialects/common/enum_rc_type.go @@ -49,8 +49,6 @@ func (e *RC_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e RC_TYPE) String() string { - if name, ok := labels_RC_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_rtk_baseline_coordinate_system.go b/pkg/dialects/common/enum_rtk_baseline_coordinate_system.go index f432bff36..18df93670 100644 --- a/pkg/dialects/common/enum_rtk_baseline_coordinate_system.go +++ b/pkg/dialects/common/enum_rtk_baseline_coordinate_system.go @@ -49,8 +49,6 @@ func (e *RTK_BASELINE_COORDINATE_SYSTEM) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e RTK_BASELINE_COORDINATE_SYSTEM) String() string { - if name, ok := labels_RTK_BASELINE_COORDINATE_SYSTEM[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_serial_control_dev.go b/pkg/dialects/common/enum_serial_control_dev.go index 85d2a12da..362b76747 100644 --- a/pkg/dialects/common/enum_serial_control_dev.go +++ b/pkg/dialects/common/enum_serial_control_dev.go @@ -101,8 +101,6 @@ func (e *SERIAL_CONTROL_DEV) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e SERIAL_CONTROL_DEV) String() string { - if name, ok := labels_SERIAL_CONTROL_DEV[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_set_focus_type.go b/pkg/dialects/common/enum_set_focus_type.go index 7bd36c758..1cb885d4f 100644 --- a/pkg/dialects/common/enum_set_focus_type.go +++ b/pkg/dialects/common/enum_set_focus_type.go @@ -69,8 +69,6 @@ func (e *SET_FOCUS_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e SET_FOCUS_TYPE) String() string { - if name, ok := labels_SET_FOCUS_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_speed_type.go b/pkg/dialects/common/enum_speed_type.go index 209f3f807..eb141654a 100644 --- a/pkg/dialects/common/enum_speed_type.go +++ b/pkg/dialects/common/enum_speed_type.go @@ -57,8 +57,6 @@ func (e *SPEED_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e SPEED_TYPE) String() string { - if name, ok := labels_SPEED_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_storage_status.go b/pkg/dialects/common/enum_storage_status.go index b2f7dd9b7..6bed6f33c 100644 --- a/pkg/dialects/common/enum_storage_status.go +++ b/pkg/dialects/common/enum_storage_status.go @@ -57,8 +57,6 @@ func (e *STORAGE_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e STORAGE_STATUS) String() string { - if name, ok := labels_STORAGE_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_storage_type.go b/pkg/dialects/common/enum_storage_type.go index 1da0c5a76..b22bcf7be 100644 --- a/pkg/dialects/common/enum_storage_type.go +++ b/pkg/dialects/common/enum_storage_type.go @@ -77,8 +77,6 @@ func (e *STORAGE_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e STORAGE_TYPE) String() string { - if name, ok := labels_STORAGE_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_storage_usage_flag.go b/pkg/dialects/common/enum_storage_usage_flag.go index b8660a34d..cadb64c06 100644 --- a/pkg/dialects/common/enum_storage_usage_flag.go +++ b/pkg/dialects/common/enum_storage_usage_flag.go @@ -57,8 +57,6 @@ func (e *STORAGE_USAGE_FLAG) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e STORAGE_USAGE_FLAG) String() string { - if name, ok := labels_STORAGE_USAGE_FLAG[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_tune_format.go b/pkg/dialects/common/enum_tune_format.go index c2a7fdfdd..63db1ecd5 100644 --- a/pkg/dialects/common/enum_tune_format.go +++ b/pkg/dialects/common/enum_tune_format.go @@ -49,8 +49,6 @@ func (e *TUNE_FORMAT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e TUNE_FORMAT) String() string { - if name, ok := labels_TUNE_FORMAT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_uavcan_node_health.go b/pkg/dialects/common/enum_uavcan_node_health.go index 9a821a5c0..4205335cb 100644 --- a/pkg/dialects/common/enum_uavcan_node_health.go +++ b/pkg/dialects/common/enum_uavcan_node_health.go @@ -57,8 +57,6 @@ func (e *UAVCAN_NODE_HEALTH) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UAVCAN_NODE_HEALTH) String() string { - if name, ok := labels_UAVCAN_NODE_HEALTH[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_uavcan_node_mode.go b/pkg/dialects/common/enum_uavcan_node_mode.go index 90cad617a..dfccc5972 100644 --- a/pkg/dialects/common/enum_uavcan_node_mode.go +++ b/pkg/dialects/common/enum_uavcan_node_mode.go @@ -61,8 +61,6 @@ func (e *UAVCAN_NODE_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UAVCAN_NODE_MODE) String() string { - if name, ok := labels_UAVCAN_NODE_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_utm_flight_state.go b/pkg/dialects/common/enum_utm_flight_state.go index 95b1c5bd8..6402fdbd9 100644 --- a/pkg/dialects/common/enum_utm_flight_state.go +++ b/pkg/dialects/common/enum_utm_flight_state.go @@ -61,8 +61,6 @@ func (e *UTM_FLIGHT_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UTM_FLIGHT_STATE) String() string { - if name, ok := labels_UTM_FLIGHT_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_video_stream_type.go b/pkg/dialects/common/enum_video_stream_type.go index a9b1753d2..15d1bd87f 100644 --- a/pkg/dialects/common/enum_video_stream_type.go +++ b/pkg/dialects/common/enum_video_stream_type.go @@ -57,8 +57,6 @@ func (e *VIDEO_STREAM_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e VIDEO_STREAM_TYPE) String() string { - if name, ok := labels_VIDEO_STREAM_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_vtol_transition_heading.go b/pkg/dialects/common/enum_vtol_transition_heading.go index c2aa5c3df..ff8a1f0d7 100644 --- a/pkg/dialects/common/enum_vtol_transition_heading.go +++ b/pkg/dialects/common/enum_vtol_transition_heading.go @@ -61,8 +61,6 @@ func (e *VTOL_TRANSITION_HEADING) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e VTOL_TRANSITION_HEADING) String() string { - if name, ok := labels_VTOL_TRANSITION_HEADING[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_wifi_config_ap_mode.go b/pkg/dialects/common/enum_wifi_config_ap_mode.go index 646996f29..d5f5f9c33 100644 --- a/pkg/dialects/common/enum_wifi_config_ap_mode.go +++ b/pkg/dialects/common/enum_wifi_config_ap_mode.go @@ -57,8 +57,6 @@ func (e *WIFI_CONFIG_AP_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e WIFI_CONFIG_AP_MODE) String() string { - if name, ok := labels_WIFI_CONFIG_AP_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_wifi_config_ap_response.go b/pkg/dialects/common/enum_wifi_config_ap_response.go index edac30147..6d750f9f4 100644 --- a/pkg/dialects/common/enum_wifi_config_ap_response.go +++ b/pkg/dialects/common/enum_wifi_config_ap_response.go @@ -65,8 +65,6 @@ func (e *WIFI_CONFIG_AP_RESPONSE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e WIFI_CONFIG_AP_RESPONSE) String() string { - if name, ok := labels_WIFI_CONFIG_AP_RESPONSE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/common/enum_winch_actions.go b/pkg/dialects/common/enum_winch_actions.go index 31f8cd09a..0c3b4e8d3 100644 --- a/pkg/dialects/common/enum_winch_actions.go +++ b/pkg/dialects/common/enum_winch_actions.go @@ -81,8 +81,6 @@ func (e *WINCH_ACTIONS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e WINCH_ACTIONS) String() string { - if name, ok := labels_WINCH_ACTIONS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/csairlink/enum_airlink_auth_response_type.go b/pkg/dialects/csairlink/enum_airlink_auth_response_type.go index d18c8d141..0324ad184 100644 --- a/pkg/dialects/csairlink/enum_airlink_auth_response_type.go +++ b/pkg/dialects/csairlink/enum_airlink_auth_response_type.go @@ -48,8 +48,6 @@ func (e *AIRLINK_AUTH_RESPONSE_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e AIRLINK_AUTH_RESPONSE_TYPE) String() string { - if name, ok := labels_AIRLINK_AUTH_RESPONSE_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/development/enum_mav_cmd.go b/pkg/dialects/development/enum_mav_cmd.go index 96f837b3c..784b53612 100644 --- a/pkg/dialects/development/enum_mav_cmd.go +++ b/pkg/dialects/development/enum_mav_cmd.go @@ -777,8 +777,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/development/enum_mav_standard_mode.go b/pkg/dialects/development/enum_mav_standard_mode.go index 71fa66b94..e57c6bbee 100644 --- a/pkg/dialects/development/enum_mav_standard_mode.go +++ b/pkg/dialects/development/enum_mav_standard_mode.go @@ -122,8 +122,6 @@ func (e *MAV_STANDARD_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_STANDARD_MODE) String() string { - if name, ok := labels_MAV_STANDARD_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/development/enum_param_transaction_action.go b/pkg/dialects/development/enum_param_transaction_action.go index 9128383da..83fe4a7b9 100644 --- a/pkg/dialects/development/enum_param_transaction_action.go +++ b/pkg/dialects/development/enum_param_transaction_action.go @@ -53,8 +53,6 @@ func (e *PARAM_TRANSACTION_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PARAM_TRANSACTION_ACTION) String() string { - if name, ok := labels_PARAM_TRANSACTION_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/development/enum_param_transaction_transport.go b/pkg/dialects/development/enum_param_transaction_transport.go index 42651c110..d5be59d47 100644 --- a/pkg/dialects/development/enum_param_transaction_transport.go +++ b/pkg/dialects/development/enum_param_transaction_transport.go @@ -49,8 +49,6 @@ func (e *PARAM_TRANSACTION_TRANSPORT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e PARAM_TRANSACTION_TRANSPORT) String() string { - if name, ok := labels_PARAM_TRANSACTION_TRANSPORT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/development/enum_target_obs_frame.go b/pkg/dialects/development/enum_target_obs_frame.go index ade1defce..4685d2553 100644 --- a/pkg/dialects/development/enum_target_obs_frame.go +++ b/pkg/dialects/development/enum_target_obs_frame.go @@ -57,8 +57,6 @@ func (e *TARGET_OBS_FRAME) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e TARGET_OBS_FRAME) String() string { - if name, ok := labels_TARGET_OBS_FRAME[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/development/enum_wifi_network_security.go b/pkg/dialects/development/enum_wifi_network_security.go index 4ae97762a..3e3751ad1 100644 --- a/pkg/dialects/development/enum_wifi_network_security.go +++ b/pkg/dialects/development/enum_wifi_network_security.go @@ -65,8 +65,6 @@ func (e *WIFI_NETWORK_SECURITY) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e WIFI_NETWORK_SECURITY) String() string { - if name, ok := labels_WIFI_NETWORK_SECURITY[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/icarous/enum_icarous_fms_state.go b/pkg/dialects/icarous/enum_icarous_fms_state.go index 06861fb97..e341777b7 100644 --- a/pkg/dialects/icarous/enum_icarous_fms_state.go +++ b/pkg/dialects/icarous/enum_icarous_fms_state.go @@ -58,8 +58,6 @@ func (e *ICAROUS_FMS_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ICAROUS_FMS_STATE) String() string { - if name, ok := labels_ICAROUS_FMS_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/icarous/enum_icarous_track_band_types.go b/pkg/dialects/icarous/enum_icarous_track_band_types.go index b532ce01b..14fae5d4e 100644 --- a/pkg/dialects/icarous/enum_icarous_track_band_types.go +++ b/pkg/dialects/icarous/enum_icarous_track_band_types.go @@ -49,8 +49,6 @@ func (e *ICAROUS_TRACK_BAND_TYPES) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e ICAROUS_TRACK_BAND_TYPES) String() string { - if name, ok := labels_ICAROUS_TRACK_BAND_TYPES[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/matrixpilot/enum_mav_cmd.go b/pkg/dialects/matrixpilot/enum_mav_cmd.go index 4cffe6c4e..7030c6067 100644 --- a/pkg/dialects/matrixpilot/enum_mav_cmd.go +++ b/pkg/dialects/matrixpilot/enum_mav_cmd.go @@ -730,8 +730,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/matrixpilot/enum_mav_preflight_storage_action.go b/pkg/dialects/matrixpilot/enum_mav_preflight_storage_action.go index 2cfe63f2d..b816e18aa 100644 --- a/pkg/dialects/matrixpilot/enum_mav_preflight_storage_action.go +++ b/pkg/dialects/matrixpilot/enum_mav_preflight_storage_action.go @@ -69,8 +69,6 @@ func (e *MAV_PREFLIGHT_STORAGE_ACTION) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_PREFLIGHT_STORAGE_ACTION) String() string { - if name, ok := labels_MAV_PREFLIGHT_STORAGE_ACTION[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/minimal/enum_mav_autopilot.go b/pkg/dialects/minimal/enum_mav_autopilot.go index 463b5f482..02057b58b 100644 --- a/pkg/dialects/minimal/enum_mav_autopilot.go +++ b/pkg/dialects/minimal/enum_mav_autopilot.go @@ -125,8 +125,6 @@ func (e *MAV_AUTOPILOT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_AUTOPILOT) String() string { - if name, ok := labels_MAV_AUTOPILOT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/minimal/enum_mav_component.go b/pkg/dialects/minimal/enum_mav_component.go index 47ce4c4c4..25d631704 100644 --- a/pkg/dialects/minimal/enum_mav_component.go +++ b/pkg/dialects/minimal/enum_mav_component.go @@ -583,8 +583,6 @@ func (e *MAV_COMPONENT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_COMPONENT) String() string { - if name, ok := labels_MAV_COMPONENT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/minimal/enum_mav_state.go b/pkg/dialects/minimal/enum_mav_state.go index 3cb7b951e..00fecb16f 100644 --- a/pkg/dialects/minimal/enum_mav_state.go +++ b/pkg/dialects/minimal/enum_mav_state.go @@ -76,8 +76,6 @@ func (e *MAV_STATE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_STATE) String() string { - if name, ok := labels_MAV_STATE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/minimal/enum_mav_type.go b/pkg/dialects/minimal/enum_mav_type.go index 2eab1be45..4f5acbffc 100644 --- a/pkg/dialects/minimal/enum_mav_type.go +++ b/pkg/dialects/minimal/enum_mav_type.go @@ -217,8 +217,6 @@ func (e *MAV_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_TYPE) String() string { - if name, ok := labels_MAV_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/storm32/enum_mav_cmd.go b/pkg/dialects/storm32/enum_mav_cmd.go index 960a2044a..e15479a08 100644 --- a/pkg/dialects/storm32/enum_mav_cmd.go +++ b/pkg/dialects/storm32/enum_mav_cmd.go @@ -867,8 +867,6 @@ func (e *MAV_CMD) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_CMD) String() string { - if name, ok := labels_MAV_CMD[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/storm32/enum_mav_qshot_mode.go b/pkg/dialects/storm32/enum_mav_qshot_mode.go index 9398ce251..74b27bbdd 100644 --- a/pkg/dialects/storm32/enum_mav_qshot_mode.go +++ b/pkg/dialects/storm32/enum_mav_qshot_mode.go @@ -81,8 +81,6 @@ func (e *MAV_QSHOT_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_QSHOT_MODE) String() string { - if name, ok := labels_MAV_QSHOT_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_client.go b/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_client.go index 5dab299aa..5a2ee43ba 100644 --- a/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_client.go +++ b/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_client.go @@ -77,8 +77,6 @@ func (e *MAV_STORM32_GIMBAL_MANAGER_CLIENT) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_STORM32_GIMBAL_MANAGER_CLIENT) String() string { - if name, ok := labels_MAV_STORM32_GIMBAL_MANAGER_CLIENT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_profile.go b/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_profile.go index 066578312..a8b6bba14 100644 --- a/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_profile.go +++ b/pkg/dialects/storm32/enum_mav_storm32_gimbal_manager_profile.go @@ -65,8 +65,6 @@ func (e *MAV_STORM32_GIMBAL_MANAGER_PROFILE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_STORM32_GIMBAL_MANAGER_PROFILE) String() string { - if name, ok := labels_MAV_STORM32_GIMBAL_MANAGER_PROFILE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/storm32/enum_mav_storm32_tunnel_payload_type.go b/pkg/dialects/storm32/enum_mav_storm32_tunnel_payload_type.go index ddbcd5bc0..5b85f928d 100644 --- a/pkg/dialects/storm32/enum_mav_storm32_tunnel_payload_type.go +++ b/pkg/dialects/storm32/enum_mav_storm32_tunnel_payload_type.go @@ -64,8 +64,6 @@ func (e *MAV_STORM32_TUNNEL_PAYLOAD_TYPE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e MAV_STORM32_TUNNEL_PAYLOAD_TYPE) String() string { - if name, ok := labels_MAV_STORM32_TUNNEL_PAYLOAD_TYPE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ualberta/enum_ualberta_autopilot_mode.go b/pkg/dialects/ualberta/enum_ualberta_autopilot_mode.go index fb8766d2e..863c597fa 100644 --- a/pkg/dialects/ualberta/enum_ualberta_autopilot_mode.go +++ b/pkg/dialects/ualberta/enum_ualberta_autopilot_mode.go @@ -58,8 +58,6 @@ func (e *UALBERTA_AUTOPILOT_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UALBERTA_AUTOPILOT_MODE) String() string { - if name, ok := labels_UALBERTA_AUTOPILOT_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ualberta/enum_ualberta_nav_mode.go b/pkg/dialects/ualberta/enum_ualberta_nav_mode.go index 55b3ab951..02d583a98 100644 --- a/pkg/dialects/ualberta/enum_ualberta_nav_mode.go +++ b/pkg/dialects/ualberta/enum_ualberta_nav_mode.go @@ -56,8 +56,6 @@ func (e *UALBERTA_NAV_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UALBERTA_NAV_MODE) String() string { - if name, ok := labels_UALBERTA_NAV_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/ualberta/enum_ualberta_pilot_mode.go b/pkg/dialects/ualberta/enum_ualberta_pilot_mode.go index 145600f32..0ae162dd4 100644 --- a/pkg/dialects/ualberta/enum_ualberta_pilot_mode.go +++ b/pkg/dialects/ualberta/enum_ualberta_pilot_mode.go @@ -51,8 +51,6 @@ func (e *UALBERTA_PILOT_MODE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UALBERTA_PILOT_MODE) String() string { - if name, ok := labels_UALBERTA_PILOT_MODE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/uavionix/enum_uavionix_adsb_emergency_status.go b/pkg/dialects/uavionix/enum_uavionix_adsb_emergency_status.go index dfc5b3d95..5c9b73a09 100644 --- a/pkg/dialects/uavionix/enum_uavionix_adsb_emergency_status.go +++ b/pkg/dialects/uavionix/enum_uavionix_adsb_emergency_status.go @@ -65,8 +65,6 @@ func (e *UAVIONIX_ADSB_EMERGENCY_STATUS) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UAVIONIX_ADSB_EMERGENCY_STATUS) String() string { - if name, ok := labels_UAVIONIX_ADSB_EMERGENCY_STATUS[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_aircraft_size.go b/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_aircraft_size.go index ec5f43379..9eee02e17 100644 --- a/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_aircraft_size.go +++ b/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_aircraft_size.go @@ -89,8 +89,6 @@ func (e *UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE) String() string { - if name, ok := labels_UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lat.go b/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lat.go index f59dcb2ad..869727919 100644 --- a/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lat.go +++ b/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lat.go @@ -65,8 +65,6 @@ func (e *UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT) UnmarshalText(text []byte) error // String implements the fmt.Stringer interface. func (e UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT) String() string { - if name, ok := labels_UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lon.go b/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lon.go index 4bb143e8f..5ef86e477 100644 --- a/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lon.go +++ b/pkg/dialects/uavionix/enum_uavionix_adsb_out_cfg_gps_offset_lon.go @@ -47,8 +47,6 @@ func (e *UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON) UnmarshalText(text []byte) error // String implements the fmt.Stringer interface. func (e UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON) String() string { - if name, ok := labels_UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) } diff --git a/pkg/dialects/uavionix/enum_uavionix_adsb_out_dynamic_gps_fix.go b/pkg/dialects/uavionix/enum_uavionix_adsb_out_dynamic_gps_fix.go index 4abf633ac..6575938df 100644 --- a/pkg/dialects/uavionix/enum_uavionix_adsb_out_dynamic_gps_fix.go +++ b/pkg/dialects/uavionix/enum_uavionix_adsb_out_dynamic_gps_fix.go @@ -59,8 +59,6 @@ func (e *UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX) UnmarshalText(text []byte) error { // String implements the fmt.Stringer interface. func (e UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX) String() string { - if name, ok := labels_UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX[e]; ok { - return name - } - return strconv.Itoa(int(e)) + val, _ := e.MarshalText() + return string(val) }