1
0
Fork 0

OD_extension, callback function: add information about the OD index.

This commit is contained in:
Janez 2024-03-13 16:56:21 +01:00
parent 9d2a65cda7
commit 1204042a1f
2 changed files with 5 additions and 0 deletions

View file

@ -255,6 +255,9 @@ ODR_t OD_getSub(const OD_entry_t *entry, uint8_t subIndex,
/* Reset stream data offset */
stream->dataOffset = 0;
/* Add informative data */
stream->index = entry->index;
stream->subIndex = subIndex;
return ODR_OK;

View file

@ -223,6 +223,8 @@ typedef struct {
OD_size_t dataOffset;
/** Attribute bit-field of the OD sub-object, see @ref OD_attributes_t */
OD_attr_t attribute;
/** Index of the OD object, informative */
uint16_t index;
/** Sub index of the OD sub-object, informative */
uint8_t subIndex;
} OD_stream_t;