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

Stop blinding status lights #668

Merged
merged 2 commits into from
Dec 21, 2024
Merged

Stop blinding status lights #668

merged 2 commits into from
Dec 21, 2024

Conversation

tyeth
Copy link
Contributor

@tyeth tyeth commented Dec 12, 2024

The Neopixel brightness has been ignored for a while, and I've been meaning to take a look, but I'm only reminded in serious testing phases. This resolves the issue (only tested with tinyusb devices, but littlefs will be identical)

@tyeth tyeth force-pushed the status_led_brightness branch from 4d33227 to 53ca349 Compare December 17, 2024 22:08
@brentru brentru self-requested a review December 19, 2024 16:26
// check it casts to float and support user specifying 0.0f which is
// default, by using the |operator instead of .as
// https://arduinojson.org/v7/api/jsonvariant/or/
if ((doc["status_pixel_brightness"] | -1.0f) != -1.0f) {
Copy link
Member

Choose a reason for hiding this comment

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

Set to match the default, https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/blob/main/src/provisioning/tinyusb/Wippersnapper_FS.cpp#L328 so | 0.2f

if (doc["status_pixel_brightness"]){
// check it casts to float and support user specifying 0.0f which is default,
// by using the |operator instead of .as https://arduinojson.org/v7/api/jsonvariant/or/
if ((doc["status_pixel_brightness"] | -1.0f) != -1.0f) {
Copy link
Member

Choose a reason for hiding this comment

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

Set to match the default, https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/blob/main/src/provisioning/tinyusb/Wippersnapper_FS.cpp#L328 so | 0.2f

@tyeth tyeth force-pushed the status_led_brightness branch from 1a0c46d to 9ddb120 Compare December 19, 2024 17:02
@tyeth tyeth merged commit 418e785 into main Dec 21, 2024
39 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