klippain icon indicating copy to clipboard operation
klippain copied to clipboard

Allow homing commands to be over-ridden

Open kerinin opened this issue 1 year ago • 5 comments

Currently, the only way to customize the homing logic is to define a [homing_override] override, which is overkill for some applications. This creates _KLIPAIN_HOME_XXX macros that are called in the existing homing_override and can be overridden to customize homing behavior in a more targeted way.

I made these changes in because I use sensorless homing on one axis only, and I wanted to create a custom macro similar to https://klipper.discourse.group/t/sensorless-homing-macro-suggested-in-klipper-docs/896 that allows me to home twice with a pause between for StallGuard to reset.

kerinin avatar Jul 10 '24 14:07 kerinin

for the beginning, i suggest to write the name of this repo correctly in the functions. there is a letter missing

Surion79 avatar Jul 14 '24 07:07 Surion79

📌 This pull request has been marked as stale because it has not had activity in the past 30 days. Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days. We appreciate your contribution!

github-actions[bot] avatar Aug 13 '24 07:08 github-actions[bot]

📌 This pull request has been marked as stale because it has not had activity in the past 30 days. Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days. We appreciate your contribution!

github-actions[bot] avatar Sep 13 '24 07:09 github-actions[bot]

📌 This pull request has been marked as stale because it has not had activity in the past 30 days. Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days. We appreciate your contribution!

github-actions[bot] avatar Oct 13 '24 07:10 github-actions[bot]

Hello, thanks for the PR!

I'm pretty open for this change as it will indeed allow to split and simplify the logic :) However, let's keep it simple:

  1. Can you change the names to _HOME_X, _HOME_Y and _HOME_Z? No need to add Klippain name here
  2. Since we are in the homing process, there's no macro parameters beside X, Y, Z to specify which axes to home. So in order to keep the _HOME_... macros independent, could you avoid passing parameters and directly read from _USER_VARIABLES and printer object? This will simplify even further and will avoid mistakes.

Then I think I'll be able to merge it :)

Frix-x avatar Jan 08 '25 12:01 Frix-x