mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 12:11:36 +08:00
uorb: allow for more than 255 uORB messages
Increased size for ORB_ID from uint8_t to uint16_t Created a type: orb_id_size_t = uint16_t. There are still a couple of places where the size of the ORB_ID is assumed to be less than 16-bits. The places that I have found are commented regarding this and can be found with a search on orb_id_size_t.
This commit is contained in:
@@ -42,16 +42,17 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef uint16_t orb_id_size_t;
|
||||
|
||||
/**
|
||||
* Object metadata.
|
||||
*/
|
||||
struct orb_metadata {
|
||||
const char *o_name; /**< unique object name */
|
||||
const uint16_t o_size; /**< object size */
|
||||
const uint16_t o_size_no_padding; /**< object size w/o padding at the end (for logger) */
|
||||
const char *o_fields; /**< semicolon separated list of fields (with type) */
|
||||
uint8_t o_id; /**< ORB_ID enum */
|
||||
const char *o_name; /**< unique object name */
|
||||
const uint16_t o_size; /**< object size */
|
||||
const uint16_t o_size_no_padding; /**< object size w/o padding at the end (for logger) */
|
||||
const char *o_fields; /**< semicolon separated list of fields (with type) */
|
||||
orb_id_size_t o_id; /**< ORB_ID enum */
|
||||
};
|
||||
|
||||
typedef const struct orb_metadata *orb_id_t;
|
||||
|
||||
Reference in New Issue
Block a user