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

[1.1.x] Simplify SD_REPRINT_LAST_SELECTED_FILE #8160

Merged

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Oct 30, 2017

Followup patch for #8098. Parity with #8113.

As a general rule, if you find yourself hacking core code or being too clever, you're probably doing it wrong. In most cases there is one right way to do things. Ask @thinkyhead for help if you find yourself cursing Marlin for not doing what you want.

  • "defer_return_to_status" works as designed, so no need to hack it.
  • The encoder position is saved when print starts, so no 5s time check needed.
  • With no 5s time check, no special case force-call of the screen needs to be added.

Compliments earlier changes in compliance with good coding practices:

  • Remove lcd-oriented code and extern references from cardreader.cpp, moving all that code to the lcd_reselect_last_file function, which is externally exposed in ultralcd.h. This represents the best-practice of "encapsulation."

Still to do:

  • Continue to strip code out of lcd_reselect_last_file to determine the minimum required "bump" needed to get a complete graphical screen redraw when jumping to the SD menu.

@thinkyhead thinkyhead force-pushed the bf1_fixup_sd_reprint branch 4 times, most recently from 8055850 to 383b9db Compare October 30, 2017 01:41
@thinkyhead thinkyhead merged commit d9cb7be into MarlinFirmware:bugfix-1.1.x Oct 30, 2017
@thinkyhead thinkyhead deleted the bf1_fixup_sd_reprint branch October 30, 2017 04:57
@Roxy-3D
Copy link
Member

Roxy-3D commented Oct 31, 2017

The Graphical LCD Panel is behaving a lot better. But it still messes up the select lines around an SD-File. Some times, only one line appears. And it seems to be random whether it is the top or bottom select line.

Update: I have also seen it leave select lines such that 3 files are selected (with top and bottom lines around them).

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.

None yet

2 participants