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

[BUG] Screen throttling can't handle fast displays #18044

Closed
jmz52 opened this issue May 19, 2020 · 8 comments
Closed

[BUG] Screen throttling can't handle fast displays #18044

jmz52 opened this issue May 19, 2020 · 8 comments

Comments

@jmz52
Copy link
Contributor

jmz52 commented May 19, 2020

Bug Description

Display with update time less than 1 ms suffers from screen throttling.
uint16_t max_display_update_time is 0 due to really fast display update time.
max_display_update_time-- set max_display_update_time to 65535, meaning next screen update will be in 18 hours.

My Configurations

MKS Robin with reworked LCD subsystem

Steps to Reproduce

None.

Expected behavior: [What you expect to happen]
UI is displayed when printing from SD card

Actual behavior: [What actually happens]
Blank screen when printing from SD card

Additional Information

Possible solutions:

  • Replace max_display_update_time--; with if (max_display_update_time) max_display_update_time--; in ultralcd.cpp (tested)
  • Change max_display_update_time type to int16_t (not tested)
  • Add 1 ms delay to MarlinUI::draw_status_screen() (tested)
@GMagician
Copy link
Contributor

GMagician commented May 19, 2020

Where do you see max_display_update_time--? I can't see it in bugfix 2.0.x sources

@jmz52
Copy link
Contributor Author

jmz52 commented May 19, 2020

@GMagician
Copy link
Contributor

Download bugfix 2.0...it has been changed and there is no more such line

@jmz52
Copy link
Contributor Author

jmz52 commented May 20, 2020

@GMagician
Copy link
Contributor

I found it....I not analyzed how lcd works but it seems you did it and since you found that I think you may post a PR. If in trouble posting it I may do it for you

@AnHardt
Copy link
Contributor

AnHardt commented May 20, 2020

When i wrote the code i never assumed a screen update could be as short as below a ms.
if (max_display_update_time) max_display_update_time--; seems to be the right solution.
If a screen update does not last longer, the probability the planner-buffer runs dry in that time is extremely low. Wasting a ms by an artificial delay would be wrong.

The line exists to make the algorithm adaptive. A very long one time screen-update (for example interrupted by something) should not have influence forever.

@jmz52
Copy link
Contributor Author

jmz52 commented May 22, 2020

@GMagician, thanks for the PR

vgadreau pushed a commit to vgadreau/Marlin that referenced this issue May 29, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2020
jmp0x0000 pushed a commit to jmp0x0000/Marlin that referenced this issue Aug 7, 2020
HairingX pushed a commit to HairingX/Marlin that referenced this issue Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants