Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.7.6 FIX: deduplicate the PLED PWM GPIOs vs. RGB indexes #735

Merged

Conversation

bsstephan
Copy link
Contributor

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.

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.
@bsstephan bsstephan changed the title deduplicate the PLED PWM GPIOs vs. RGB indexes v0.7.6 FIX: deduplicate the PLED PWM GPIOs vs. RGB indexes Dec 28, 2023
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, a lot of moving pieces!

@arntsonl arntsonl merged commit ee07511 into OpenStickCommunity:main Dec 29, 2023
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants