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] Fix 'M32 P' subroutines #8432

Merged

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Nov 15, 2017

Addressing #8418

The M32 P subroutine handling code has been pretty broken. While you could start a sub-procedure in another file, it would fail to return and continue where it left off when the sub-procedure was done. This PR applies patches to address this issue.

Part of this fix involved changing the behavior of workDirParents as used by SD menu navigation. Instead of storing the parent directory on subfolder entry, it now stores the current working directory. When going up one level instead of always taking the last entry, take the previous entry, or, if none, assume the root directory. This makes it easier to build the full path to the printjob file.


Several fixes and cleanups were applied to SD code in the bugfix-2.0.x branch but were not brought over to this branch. Those fixes and cleanups are also included as separate commits.

  • Properly wrap headers with #ifndef at the top. (#pragma once may now be viable too.)
  • Drop #if ENABLED(SDSUPPORT) from all headers but one. Only .cpp generally needs it.
  • Improve formatting and readability. (Marlin now "owns" this variant of SDFat.)
  • Remove some unused and deprecated SD methods. More may be dropped.

@thinkyhead thinkyhead changed the title [1.1] Fix M32 subroutines [1.1] Fix 'M32 P' subroutines Nov 15, 2017
@thinkyhead thinkyhead force-pushed the bf1_fix_M32_subroutines branch 3 times, most recently from e77e98a to 6fb74c0 Compare November 15, 2017 06:43
@thinkyhead thinkyhead merged commit d2613ce into MarlinFirmware:bugfix-1.1.x Nov 15, 2017
@thinkyhead thinkyhead deleted the bf1_fix_M32_subroutines branch November 15, 2017 08:31
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.

1 participant