Updates Types.fpp to use optimized sizes for enumerations
#3956
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
This change request modifies the enumeration size for all enums listed in
Types.fppfrom the default I32 type to the smaller U8 type.Rationale
This change will improve the memory footprint for telemetry channels that are defined by structs that contain members of types defined in this file. Particularly useful in memory-constrained systems that use F-Prime.
Testing/Review Recommendations
The change is straightforward. One review item worth considering would be using I8 instead of U8 as the type. In either case, all enums are well within the bounds of either type. I don't know if F-Prime has a preference to use the signed version of the type for these enums or if unsigned is fine.
Future Work
No planned future work associated with this issue.