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

Defer heater/fan/stepper turn off if home bump on Z #20610

Merged
merged 5 commits into from
Jan 5, 2021
Merged

Defer heater/fan/stepper turn off if home bump on Z #20610

merged 5 commits into from
Jan 5, 2021

Conversation

FanDjango
Copy link
Contributor

As a first step towards #20598, I have changed the logic in motion.cpp slightly, so that if a HOMING_BUMP_MM for the Z-AXIS is configured, the heaters/fans/steppers will only be turned off for the slow probe approach after the bump.

It also applies to the DELAY_BEFORE_PROBING.

This allows them to stay on for a (potentially) long homing approach on Z.

If the homing bump is turned off ( = 0 ) nothing changes - things will be turned off on the first (and only) approach (could be a long approach, of course)

A second step, for a separate PR, would be to allow specifying which things to turn off instead of all

Copy link
Contributor

@sjasonsmith sjasonsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach seems reasonable and simple enough to me.

Marlin/src/module/motion.cpp Outdated Show resolved Hide resolved
Change "heaters_off" to "final_approach"
@FanDjango
Copy link
Contributor Author

** DO NOT ATTEMPT MERGE **

I will need to refactor this, as a previous/recent separate independent commit on exactly these code lines have "pulled the carpet out from under my feet" so to speak. In order to make that transparent, I will rebase/resolve conflicts/squish and then test and invite reviews anew. Please stand by until then.

@sjasonsmith sjasonsmith requested review from sjasonsmith and removed request for sjasonsmith January 2, 2021 23:48
@sjasonsmith sjasonsmith added the S: Don't Merge Work in progress or under discussion. label Jan 2, 2021
@thinkyhead
Copy link
Member

thinkyhead commented Jan 3, 2021

I found the merge pretty straightforward. If you still want to squash down to a single commit, it's easiest to use git reset:

git fetch origin
git reset --hard origin/heaters_off_later

git fetch upstream
git merge upstream/bugfix-2.0.x

git reset upstream/bugfix-2.0.x

git add .
git commit -m "'Quiet probing' only on last bump"

@FanDjango
Copy link
Contributor Author

FanDjango commented Jan 3, 2021

That's ok like that. I'll give it a spin later today with and without enabling heaters off to be sure. Printers all busy right now.

@FanDjango
Copy link
Contributor Author

Ok, looking good, tested it and works fine.

@sjasonsmith sjasonsmith removed the S: Don't Merge Work in progress or under discussion. label Jan 4, 2021
@thinkyhead thinkyhead merged commit 55d1938 into MarlinFirmware:bugfix-2.0.x Jan 5, 2021
tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
susisstrolch pushed a commit to susisstrolch/Marlin that referenced this pull request Jan 8, 2021
… into bugfix-2.0.x

* 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (105 commits)
  [cron] Bump distribution date (2021-01-08)
  Fix M48 output (MarlinFirmware#20713)
  Improved MKS Robin support (MarlinFirmware#19333)
  Preheat before Power Loss Recovery homing (MarlinFirmware#20697)
  [cron] Bump distribution date (2021-01-07)
  Custom build_flags by feature (MarlinFirmware#20692)
  [cron] Bump distribution date (2021-01-06)
  Multi-Z stepper inverting (MarlinFirmware#20678)
  Fix Azteeg X3 macro typo (MarlinFirmware#20681)
  Define SANGUINOLOLU 1.1 enable pins (MarlinFirmware#20682)
  No BTN_ENC_EN on Anet 10 (MarlinFirmware#20684)
  Temperature report followup (MarlinFirmware#20687)
  Adjustable precision in M105 temperature report (MarlinFirmware#20602)
  Don't apply hotend_offset.z to Z soft endstops (MarlinFirmware#20675)
  Indent tool_change_prime
  Clarify solenoid active / magnet-on state
  Defer "quiet probing" till the last Z bump (MarlinFirmware#20610)
  Solenoid cleanups
  [cron] Bump distribution date (2021-01-05)
  Remove untranslated strings
  ...
@Sebazzz
Copy link
Contributor

Sebazzz commented Jan 9, 2021

In retrospect there is one issue with this PR: the probe is being tared before the heaters are turned off. I should have seen that before but I noticed it only after flashing the new firmware with the Z-offset drifting again.

dpreed pushed a commit to dpreed/Marlin_2.0.x that referenced this pull request Feb 5, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 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.

4 participants