mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 22:13:33 +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:
@@ -77,7 +77,7 @@ topic_fields = ["%s %s" % (convert_type(field.type, True), field.name) for field
|
||||
constexpr char __orb_@(name_snake_case)_fields[] = "@( ";".join(topic_fields) );";
|
||||
|
||||
@[for topic in topics]@
|
||||
ORB_DEFINE(@topic, struct @uorb_struct, @(struct_size-padding_end_size), __orb_@(name_snake_case)_fields, static_cast<uint8_t>(ORB_ID::@topic));
|
||||
ORB_DEFINE(@topic, struct @uorb_struct, @(struct_size-padding_end_size), __orb_@(name_snake_case)_fields, static_cast<orb_id_size_t>(ORB_ID::@topic));
|
||||
@[end for]
|
||||
|
||||
void print_message(const orb_metadata *meta, const @uorb_struct& message)
|
||||
|
||||
Reference in New Issue
Block a user