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

Add brightness level in the Firmware side #17

Closed
martinberlin opened this issue Jan 21, 2020 · 0 comments
Closed

Add brightness level in the Firmware side #17

martinberlin opened this issue Jan 21, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@martinberlin
Copy link
Owner

martinberlin commented Jan 21, 2020

Related to #16

Reducing the Brightness in the Android side is having dramatic color differences in the Neopixels output for PIX565 protocol. We are also doing this on the slower side of Javascript. So if we multiply a Red / Blue value of 100 * 0.1 (also 10% Brightness) the number sent to the Firmware is 10 (But compressed in the 565 scale) which makes all colors quite flat and a very greenish touch to whites. So it's decided that the Brightness reduction should be done in the last point of the chain, after decompression, after any protocol byte interpretation is done.

https://docs.google.com/spreadsheets/d/1_cM5DqNS2QT7wjXpPaah25jAjDLKErX8sIaCZKI4bcQ

In the App side:
New dropdown of Brightness

10% | sends 2 | multiplies *0.1 in the Firmware at the end of calculation
15% | sends 3 | multiplies *0.15
20% |  4
25% |  5
30% |  6
40% | 8
100% | 20. multiplies *1 so the value sent by the App stays the same (in 565 value)

Formula
byte[1]*0.1/2 => Result is assigned to respective R,G,B channels

Android reference: martinberlin/udpx-app#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant