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

Touch ui ftdi eve fixes #17704

Merged

Conversation

sl1pkn07
Copy link
Contributor

Fix little typos and back to use default PWM_HZ since the brightness dim is disabled for Fysetc TFT81050, this not need anymore. also 0x2710 can damage the backlight in this panel (due @RudolphRiedel recomendations in #17644 (comment). seems is a hardware limitation)

@RudolphRiedel
Copy link
Contributor

What about this:
screen_data.InterfaceSettingsScreen.brightness = constrain((value * 128UL) / 0xFFFF, 1, 11);

I have not tested it but it looks to me like this limits the value to a range from 1....11 which is completely broken.

@sl1pkn07
Copy link
Contributor Author

sl1pkn07 commented Apr 25, 2020

is one of things i not touch because idk how code it, also i disable the dim for my panel so i can't test

@thinkyhead ?

@RudolphRiedel
Copy link
Contributor

RudolphRiedel commented Apr 25, 2020

As I wrote, just go with:
screen_data.InterfaceSettingsScreen.brightness = max(11, (value * 128UL) / 0xFFFF);

I tried it and it works, 11 is low enough for my display as well.
I really do not know why my line with the "max(1, (value * 128UL) / 0xFFFF);" got replaced so fast.

I tried the other line now and as I expected it is not working, I can not even change the value between 1 and 11, the slider is just limited to 11.

seems the limits is between 1 and 11, not between 11 to max
@sl1pkn07
Copy link
Contributor Author

done

@thinkyhead
Copy link
Member

Thanks for the corrections. I changed code according to answers to my questions and comparing code from two sources. Apparently I was mistaken to believe that the brightness should range between 1 and 11.

@thinkyhead thinkyhead merged commit 11f7695 into MarlinFirmware:bugfix-2.0.x Apr 25, 2020
@sl1pkn07 sl1pkn07 deleted the TOUCH_UI_FTDI_EVE_fix branch April 26, 2020 01:55
jmp0x0000 pushed a commit to jmp0x0000/Marlin that referenced this pull request Aug 7, 2020
njibhu pushed a commit to njibhu/Marlin that referenced this pull request Aug 24, 2020
HairingX pushed a commit to HairingX/Marlin that referenced this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants