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

Clean up, simplify and generalize the Allen-key-probe code. #4207

Merged
merged 4 commits into from
Jul 6, 2016

Conversation

AnHardt
Copy link
Member

@AnHardt AnHardt commented Jul 4, 2016

Clean up, simplify and generalize the Allen-key-probe code.

  • Add a optional feedrate parameter to do_blocking_move() and its companions.
    *Move Allen Key probe move scripts to their own functions
    There was an hidden extra move behind the scripts. This is configurable now.
    Added the extra moves to the relevant configs.
  • Generalize and simplify triggered when stowed test
    The PROBE_IS_TRIGGERED_WHEN_STOWED_TEST is able to detect if a probe is
    successfully deployed/stowed.
    It was part of the Allen Key probes code only.
    Now the function is generally available.
    Currently this test is compulsory for Allen Key probes to not alter the used behavior
    If you want to add the test for an other type of probe simply add
    #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST to your config.
  • Make use of the good features of a sled probe for all probes.
    Move and extend axis-unhomed test to deploy/stow_z_probe().
    Move and extend position store/restore to deploy/stow_z_probe().
    Now all kinds of probes can use the 'E' parameter in G29/M48.
    Allen key probes can be used now for grid and 3-point leveling.
    Deploying the Allen Key probe uses big moves in z direction.
    Too dangerous for an unhomed z-axis.
    Throw a compile time error when we try to configure an
    Allen Key probe homing to z-min and having no other z-min-endstop.
  • Unify deploy_z_probe() and stow_z_probe() to set_probe_deployed(bool deploy)
    and give it a return value - true = failure - false = 'ok'.
    Let the callers return when a failure is detected.

#if ENABLED(Z_MIN_PROBE_ENDSTOP)
#define _TRIGERED_WHEN_STOWED_TEST (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
#else
#define _TRIGERED_WHEN_STOWED_TEST (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)
Copy link
Member

Choose a reason for hiding this comment

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

Might as well add the extra G here: _TRIGGERED_WHEN_STOWED_TEST

@AnHardt AnHardt force-pushed the AllenKey2 branch 2 times, most recently from 35302db to 818fb67 Compare July 6, 2016 01:44
Add a optional feedrate parameter to `do_blocking_move()` and its companions.
There was an hidden extra move after the scripts. This is configurable now.
Added the extra moves to the relevant configs.
The `PROBE_IS_TRIGGERED_WHEN_STOWED_TEST` is able to detect if a probe is
successfully deployed/stowed.
It was part of the Allen Key probes code only.
Now the function is generally available.

Currently this test is compulsory for Allen Key probes to not alter the used behaviour
If you want to add the test for an other type of probe simply add
```
#define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
```
to your config.
Move and extend axis_unhomed test to deploy/stow_z_probe().
Move and extend position store/restore to deploy/stow_z_probe().

Now all kinds of probes can use the 'E' parameter in G29/M48.
Allen key probes can be used now for grid and 3-point levelling.

Deploying the Allen Key probe uses big moves in z direction.
Too dangerous for an unhomed z-axis.
Throw a compile time error when we try to configure an
Allen Key probe homing to z-min and having no other z-min-endstop.
@AnHardt
Copy link
Member Author

AnHardt commented Jul 6, 2016

Updated & rebased.

@thinkyhead thinkyhead merged commit cb17871 into MarlinFirmware:RCBugFix Jul 6, 2016
@AnHardt AnHardt deleted the AllenKey2 branch July 6, 2016 12:13
@thinkyhead thinkyhead mentioned this pull request Jul 8, 2016
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 18, 2016
thinkyhead pushed a commit that referenced this pull request Sep 28, 2016
About Configuration.h:
・Fix the PR #4899 (ABL: Enable by type. Bilinear for all.)
Remove Duplicated contents

・Fix the PR #4305 (Custom boot screen feature improvement)
Revert from "during boot" to "during bootup" in all the example
Configuration.h

・Fix the PR #4207 (Clean up, simplify and generalize the Allen-key-probe
code.)
Resolve and relocate the duplicated definitions in Z_PROBE_ALLEN_KEY
section

・Follow-up the PR #4805 (Additional documentation of Configuration.h)
Add forgotten changes to all the example Configuration.h

Adjust spacing

About Configuration_adv.h:
Add missing description of SLOWDOWN for DELTA

Adjust spacing
drewmoseley pushed a commit to drewmoseley/Marlin that referenced this pull request May 31, 2024
…ixup

`crashdet_cancel()` doesnt cleanup all variables when USB printing
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