Skip to content

Add DISABLED_Z_SENSORLESS_BY_PROBE conditional#10532

Closed
hideki22 wants to merge 1 commit intoMarlinFirmware:bugfix-1.1.xfrom
hideki22:bugfix-1.1.x
Closed

Add DISABLED_Z_SENSORLESS_BY_PROBE conditional#10532
hideki22 wants to merge 1 commit intoMarlinFirmware:bugfix-1.1.xfrom
hideki22:bugfix-1.1.x

Conversation

@hideki22
Copy link

Requirements

  • none

Description

Add control conditional to enable, disabled sensorless in Z when used a probe.

Benefits

Easy to enabled / disabled sensorless in Z when used a probe.

Related Issues

@landodragon141
Copy link

Forgive me but I don't understand the purpose of this. How is this any different from leaving the sensorless homing for z commented out. In addition if you are using a probe to home it overrides this anyways.

@hideki22
Copy link
Author

hideki22 commented Apr 26, 2018

Hello,

I make this for fix this error in SanityCheck.h ( line 1470):

#error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMIN when homing to Z_MIN."

I have this error because I use BLTouch and need Z_MIN_ENDSTOP_INVERTING false.
To fix this, I spent long time investigating how to disable sensorless in Z axis.

I found this in conditional_post.h ( line 665 ):

// Disable Z axis sensorless homing if a probe is used to home the Z axis
  #if ENABLED(SENSORLESS_HOMING)
    #define X_SENSORLESS (ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY))
    #define Y_SENSORLESS (ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY))
    #define Z_SENSORLESS (ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY))
    #if HOMING_Z_WITH_PROBE
      #undef Z_HOMING_SENSITIVITY
    #endif
  #endif

Because this comment, I need co,ment the line Z_SENSORLESS, but for find this, I spend so many time.

To facilitate this step, I add a conditional if enabled, Z_SENSORLESS = false, and now is disabled and can use probe.

Thank you.

@thinkyhead
Copy link
Member

thinkyhead commented Apr 27, 2018

This would be better:

#elif !HOMING_Z_WITH_PROBE && Z_SENSORLESS && Z_HOME_DIR == -1 && (DISABLED(Z_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMIN))
  #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMIN when homing to Z_MIN."

And this (in Conditionals_post.h) would be better still:

#if ENABLED(SENSORLESS_HOMING)
  // Disable Z axis sensorless homing if a probe is used to home the Z axis
  #if HOMING_Z_WITH_PROBE
    #undef Z_HOMING_SENSITIVITY
  #endif
  #define X_SENSORLESS (ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY))
  #define Y_SENSORLESS (ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY))
  #define Z_SENSORLESS (ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY))
#endif

@thinkyhead
Copy link
Member

Thanks for the report! I've applied the needed change to Conditionals_post.h as described above.

thinkyhead added a commit that referenced this pull request Apr 27, 2018
@hideki22 hideki22 deleted the bugfix-1.1.x branch April 27, 2018 09:03
thinkyhead added a commit that referenced this pull request Sep 22, 2018
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