Skip to content

Comments

expanding generic payload#6

Open
thomas-watters-skydio wants to merge 1 commit intovivian.zhou/revup/master/generic_payloadfrom
tw/generic_payload
Open

expanding generic payload#6
thomas-watters-skydio wants to merge 1 commit intovivian.zhou/revup/master/generic_payloadfrom
tw/generic_payload

Conversation

@thomas-watters-skydio
Copy link

No description provided.

@thomas-watters-skydio
Copy link
Author

This PR hopes to take an even more generic approach to attachments.

</enum>
<enum name="GENERIC_PAYLOAD_VALUE_TYPE">
<description>Data type for generic payload function values.</description>
<entry value="0" name="GENERIC_PAYLOAD_VALUE_TYPE_INT32">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add BOOL32

Comment on lines +751 to +753
<field type="uint8_t[4]" name="value_low">Lower 32 bits of current value. For 32-bit types, this is the entire value. For 64-bit types, this is the least significant word.</field>
<field type="uint8_t[4]" name="min_low">Lower 32 bits of minimum value (for CONTINUOUS/DISCRETE types).</field>
<field type="uint8_t[4]" name="max_low">Lower 32 bits of maximum value (for CONTINUOUS/DISCRETE types).</field>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will probably have the most push-back, i like the idea of being able to support 64data, but maybe we can leave this should the need arise, thankfully extension fields allow us to do that

<field type="uint8_t" name="type" enum="GENERIC_PAYLOAD_FUNCTION_TYPE">Type of function.</field>
<field type="uint8_t" name="value_type" enum="GENERIC_PAYLOAD_VALUE_TYPE">Data type for value/min/max fields.</field>
<field type="uint8_t" name="enabled">0: Disabled, 1: Enabled</field>
<field type="uint8_t[4]" name="value_low">Lower 32 bits of current value. For 32-bit types, this is the entire value. For 64-bit types, this is the least significant word.</field>
Copy link
Author

@thomas-watters-skydio thomas-watters-skydio May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is often confusion with MAV_CMDs that have a data type of float but are supposed to be interpreted as bool/int through casts, i think i having a generic "union" type, transported as bytes works better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant