v0.7.6 FIX: deduplicate the PLED PWM GPIOs vs. RGB indexes #735
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.
I missed/lost track of the fact that pledPin1-4 are only true GPIOs in PWM mode, and RGB mode uses the same fields as generic indexes instead. this is of course a wreck for tracking in GpioMappings, so I added new pledIndex1-4 fields for use in RGB mode, letting pledPin1-4 be truly just for GPIO pin assignments in PWM mode (or set to -1 otherwise).
furthering the confusion, the web UI already referred to pledIndex1-4, just it copied the value of those states back and forth to/from pledPin1-4, so now that the API has those fields as real fields, I just had to remove the copying.
I don't have PLEDs so all I was able to test is that protobuf does what it should now, and only when PWM pins are set do they get reserved in GpioMappings. tested on a nuked board, with webconfig allowing for getting out of a bad state.