convert GpioMappings to an array in protobuf #631
Merged
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.
! ! ! WARNING ! ! !
Current users of
main
will find their config is wiped by this change. You will have to go into webconfig and redo your config. 0.7.5 users should be unaffected.My Python-brain wrote
GpioMappings
in a descriptive way that's great for dynamic languages, but it turned out that in our code, I had to quickly treat the dict-like message in protobuf as an array in C, to make it easy to work with. This was fine, but a bit funky, and kept the protobuf descriptive. However, this array pattern would have to have been duplicated for profiles-as-GpioMappings, which would have meant more funky code and more stuff residing in memory for no good reason. This has the mappings as an array in the protobuf, which is slightly less obvious when reading a protobuf config, but this may only matter to me, so making the rest of the code less funky is a good trade-off.