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

“Improve Sensorless homing/probing accuracy for G28, G33, M48” #24220

Merged
merged 124 commits into from
Jun 3, 2022
Merged
Changes from 1 commit
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
58bf83a
Mejora SENSORLESS en DELTA
lujios May 10, 2021
30164ed
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios May 11, 2021
48ca5b2
Update probe.cpp
lujios May 11, 2021
350164d
Error versión actualizada
lujios May 11, 2021
e41f5f0
Error versión actualizada
lujios May 11, 2021
e7db472
DELTA with SENSORLESS_HOMING/PROBING.
lujios May 11, 2021
fc73ae5
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios May 12, 2021
22671e0
Change description.
lujios May 13, 2021
e842e7a
Revert "Change description."
lujios May 13, 2021
30f47bc
Revert "Revert "Change description.""
lujios May 13, 2021
1b6f2b2
Delete Configuration.h
lujios May 13, 2021
49fed0b
Delete Configuration_adv.h
lujios May 13, 2021
f2d2397
Configuration.
lujios May 13, 2021
9b7a34c
Merge branch 'bugfix-2.0.x' of https://github.com/lujios/Marlin into …
lujios May 13, 2021
6ef7d75
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios May 13, 2021
c343ee4
Change Configuration origin
lujios May 13, 2021
dd636ef
Merge branch 'bugfix-2.0.x' of https://github.com/lujios/Marlin into …
lujios May 13, 2021
fc1ec09
Update pins_RAMPS.h
lujios May 13, 2021
84d14c3
Update G28.cpp
lujios May 29, 2021
4041c88
Merge branch 'bugfix-2.0.x' into bugfix-2.0.x
lujios May 29, 2021
9adb045
Update G28.cpp
lujios May 29, 2021
5c31b99
Merge branch 'bugfix-2.0.x' into bugfix-2.0.x
lujios Jun 6, 2021
8a661be
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Jun 17, 2021
909ac8b
Update probe.cpp
lujios Jun 17, 2021
7ec77fc
Update probe.cpp
lujios Jun 17, 2021
4230664
Update probe.cpp
lujios Jun 17, 2021
58a0b19
Update pins_AZSMZ_MINI.h
lujios Jun 17, 2021
2e9bffd
initial review quick fixes
thinkyhead Jun 18, 2021
2824be1
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/21899
thinkyhead Jun 18, 2021
3d15bd3
non-delta slow homing
thinkyhead Jun 18, 2021
876be19
fewer static buffers
thinkyhead Jun 19, 2021
4fcee1e
style tweaks
thinkyhead Jun 19, 2021
0f05cd9
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/21899
thinkyhead Jun 19, 2021
7904673
Update set_homing_current
thinkyhead Jun 19, 2021
742653e
Always trigger MAX on DELTA
thinkyhead Jun 19, 2021
e77ba46
move some to planner
thinkyhead Jun 19, 2021
bb2569f
Update planner.cpp
lujios Jun 20, 2021
8869fa9
Typographic error. debug_current -> debug_current_on
lujios Jun 20, 2021
e59e05b
SENSORLESS_PROBING to SENSORLESS_HOMING
lujios Jun 20, 2021
93a5573
ENABLED(SENSORLESS_PROBING) or ENABLED(SENSORLESS_HOMING)
lujios Jun 20, 2021
f22adf2
ENABLED(SENSORLESS_PROBING) or ENABLED(SENSORLESS_HOMING)
lujios Jun 20, 2021
6deb5e0
Update probe.h
lujios Jun 20, 2021
17c3421
Update probe.cpp
lujios Jun 20, 2021
fa3f66a
Update probe.cpp
lujios Jun 21, 2021
0afa0b0
Update probe.cpp
lujios Jun 21, 2021
e194686
Update probe.cpp
lujios Jun 21, 2021
cccbb23
Update probe.cpp
lujios Jun 21, 2021
6591021
Update probe.cpp
lujios Jun 21, 2021
3ef49e9
Update probe.cpp
lujios Jun 23, 2021
a5960b6
Update probe.cpp
lujios Jun 23, 2021
b39dcc0
Update probe.cpp
lujios Jun 23, 2021
ac1595f
Update probe.cpp
lujios Jun 23, 2021
5598406
Update probe.cpp
lujios Jun 23, 2021
7f8e424
Update tmc_util.h
lujios Jul 10, 2021
46a1943
Update probe.h
lujios Jul 10, 2021
0b04316
Update probe.cpp
lujios Jul 10, 2021
f92fdd2
Update G33.cpp
lujios Jul 10, 2021
181808c
Update planner.h
lujios Jul 10, 2021
e4477b0
Update endstops.cpp
lujios Jul 10, 2021
b8e6477
Update delta.cpp
lujios Jul 10, 2021
f7ee2a2
Update probe.cpp
lujios Jul 10, 2021
8318e7a
Update tmc_util.h
lujios Jul 10, 2021
2b66a40
Update tmc_util.h
lujios Jul 10, 2021
40bda0c
Update tmc_util.h
lujios Jul 10, 2021
a7aa0db
Update tmc_util.h
lujios Jul 10, 2021
3689e97
Update G33.cpp
lujios Jul 10, 2021
0edbd14
Update planner.h
lujios Jul 10, 2021
85015e9
Update planner.cpp
lujios Jul 10, 2021
8762770
Update G28.cpp
lujios Jul 10, 2021
4fa184b
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Jul 10, 2021
6ccff86
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/21899
thinkyhead Jul 12, 2021
db829ea
Use bitfields for test_sensitivity
thinkyhead Jul 12, 2021
fe218b7
motion_state_t
thinkyhead Jul 12, 2021
c1f837b
Tweak some SPI_ENDSTOPS code
thinkyhead Jul 12, 2021
01a7477
Fix warning
thinkyhead Jul 12, 2021
02cb940
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios Feb 25, 2022
b5e9597
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios Feb 25, 2022
d8aec11
Bug G28.cpp
lujios Feb 25, 2022
e41e9e8
Add files via upload
lujios Feb 25, 2022
5fcc713
Add files via upload
lujios Feb 25, 2022
c805c83
Add files via upload
lujios Feb 26, 2022
0a39a08
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Feb 27, 2022
9b75c39
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Feb 28, 2022
ebaca79
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Mar 2, 2022
94db3a3
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Mar 5, 2022
008dcb7
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios Apr 2, 2022
3e170de
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Apr 3, 2022
4138045
Limpiar código
lujios Apr 3, 2022
9e5a46e
Update
lujios Apr 3, 2022
88fce02
Add files via upload
lujios Apr 3, 2022
552c6a0
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Apr 6, 2022
c40982c
Mejora SENSORLESS_PROBING
lujios Apr 6, 2022
e3ff2cf
Add files via upload
lujios Apr 6, 2022
02dce40
Add files via upload
lujios Apr 6, 2022
6010e61
Update .gitignore
lujios Apr 6, 2022
7a7485c
🧑‍💻 Strip #errors in Configurations deployment
thinkyhead Apr 10, 2022
74871ac
Merge branch 'MarlinFirmware:bugfix-2.0.x' into bugfix-2.0.x
lujios Apr 10, 2022
188a979
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios Apr 18, 2022
386b210
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 11, 2022
b85a76c
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 14, 2022
3ee275b
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 17, 2022
d40fdfb
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 21, 2022
267eba6
Update endstops.cpp
lujios May 21, 2022
6fad327
Update Conditionals_adv.h
lujios May 21, 2022
643a308
Update G33.cpp
lujios May 21, 2022
d59a5f6
Update probe.cpp
lujios May 21, 2022
8b89b9a
Better delta sensorless homing/probing accuracy
thinkyhead May 22, 2022
49398e0
cleanup
thinkyhead May 21, 2022
4f41ce3
🩹 Adjust manage_media for slow/late media init (USB FD) (#24015)
robbycandra May 23, 2022
9b128c6
🚸 Firmware upload destination prompt (using Tk) (#24074)
ellensp May 23, 2022
65e38a8
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/24220
thinkyhead May 23, 2022
a15f80d
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/24220
thinkyhead May 23, 2022
08af8a4
use the cond
thinkyhead May 24, 2022
20a4206
Merge branch 'bugfix-2.0.x' of https://github.com/lujios/Marlin into …
lujios May 24, 2022
9eafb1a
probe.cpp
lujios May 24, 2022
ff2e68e
Update G33.cpp
lujios May 24, 2022
a0e8023
Instability in tests.
lujios May 25, 2022
4708317
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 26, 2022
1352004
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 27, 2022
2ab62bf
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios May 29, 2022
91463d8
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
lujios Jun 1, 2022
254eef2
clean up
thinkyhead Jun 2, 2022
7de58b9
split up set versus refresh
thinkyhead Jun 3, 2022
e2e81c9
try a lambda
thinkyhead Jun 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Error versión actualizada
Regreso a una versión anterior
lujios committed May 11, 2021
commit 350164d3e98e72c71535976ac4212b7071a475b1
4 changes: 2 additions & 2 deletions Marlin/src/feature/tmc_util.h
Original file line number Diff line number Diff line change
@@ -368,9 +368,9 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
constexpr uint16_t default_sg_guard_duration = 400;

struct slow_homing_t {
xyz_ulong_t acceleration;
xy_ulong_t acceleration;
#if ENABLED(HAS_CLASSIC_JERK)
xyz_float_t jerk_xyz;
xy_float_t jerk_xy;
#endif
};
#endif
20 changes: 4 additions & 16 deletions Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
@@ -167,14 +167,12 @@
slow_homing_t begin_slow_homing() {
slow_homing_t slow_homing{0};
slow_homing.acceleration.set(planner.settings.max_acceleration_mm_per_s2[X_AXIS],
planner.settings.max_acceleration_mm_per_s2[Y_AXIS],
planner.settings.max_acceleration_mm_per_s2[Z_AXIS]);
planner.settings.max_acceleration_mm_per_s2[Y_AXIS]);
planner.settings.max_acceleration_mm_per_s2[X_AXIS] = 100;
planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = 100;
TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = 100);
#if HAS_CLASSIC_JERK
slow_homing.jerk_xyz = planner.max_jerk;
TERN(DELTA, planner.max_jerk.set(0, 0, 0), planner.max_jerk.set(0, 0));
slow_homing.jerk_xy = planner.max_jerk;
planner.max_jerk.set(0, 0);
#endif
planner.reset_acceleration_rates();
return slow_homing;
@@ -183,8 +181,7 @@
void end_slow_homing(const slow_homing_t &slow_homing) {
planner.settings.max_acceleration_mm_per_s2[X_AXIS] = slow_homing.acceleration.x;
planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = slow_homing.acceleration.y;
TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = slow_homing.acceleration.z);
TERN_(HAS_CLASSIC_JERK, planner.max_jerk = slow_homing.jerk_xyz);
TERN_(HAS_CLASSIC_JERK, planner.max_jerk = slow_homing.jerk_xy);
planner.reset_acceleration_rates();
}

@@ -286,11 +283,6 @@ void GcodeSuite::G28() {
stepperY2.rms_current(Y2_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
const int16_t tmc_save_current_Z = stepperZ.getMilliamps();
stepperZ.rms_current(Z_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("Z"), tmc_save_current_Z, Z_CURRENT_HOME);
#endif
#endif

TERN_(IMPROVE_HOMING_RELIABILITY, slow_homing_t slow_homing = begin_slow_homing());
@@ -477,10 +469,6 @@ void GcodeSuite::G28() {
#if HAS_CURRENT_HOME(Y2)
stepperY2.rms_current(tmc_save_current_Y2);
#endif
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
stepperZ.rms_current(tmc_save_current_Z);
#endif

#endif

ui.refresh();
2 changes: 0 additions & 2 deletions Marlin/src/gcode/calibrate/G33.cpp
Original file line number Diff line number Diff line change
@@ -71,9 +71,7 @@ float lcd_probe_pt(const xy_pos_t &xy);

void ac_home() {
endstops.enable(true);
TERN_(SENSORLESS_PROBING, probe.current_homing_on());
home_delta();
TERN_(SENSORLESS_PROBING, probe.current_homing_off());
endstops.not_homing();
}

5 changes: 3 additions & 2 deletions Marlin/src/module/probe.cpp
Original file line number Diff line number Diff line change
@@ -497,7 +497,6 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
#endif
stealth_states.z = tmc_enable_stallguard(stepperZ);
endstops.enable(true);
probe.current_homing_on();
#endif

TERN_(HAS_QUIET_PROBING, set_probing_paused(true));
@@ -524,7 +523,6 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
tmc_disable_stallguard(stepperY, stealth_states.y);
#endif
tmc_disable_stallguard(stepperZ, stealth_states.z);
probe.current_homing_off();
#endif

if (probe_triggered && TERN0(BLTOUCH_SLOW_MODE, bltouch.stow())) // Stow in LOW SPEED MODE on every trigger
@@ -816,6 +814,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai

#endif // HAS_Z_SERVO_PROBE

<<<<<<< HEAD
//Lujsensorless_probing Definimos todas las funciones necesarias para SENSORLESS_PROBING
#if ENABLED(SENSORLESS_PROBING)
#if ENABLED(IMPROVE_HOMING_RELIABILITY)
@@ -946,4 +945,6 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
#endif
}
#endif
=======
>>>>>>> parent of 58bf83a6f0 (Mejora SENSORLESS en DELTA)
#endif // HAS_BED_PROBE
8 changes: 0 additions & 8 deletions Marlin/src/module/probe.h
Original file line number Diff line number Diff line change
@@ -256,14 +256,6 @@ class Probe {
static bool tare();
#endif

//Lujsensorless Creamos funciones basicas para SENSORLESS_PROBING
#if ENABLED(SENSORLESS_PROBING)
static void enable_stallguard_diag1();
static void disable_stallguard_diag1();
static void current_homing_on();
static void current_homing_off();
#endif

private:
static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s);
static void do_z_raise(const float z_raise);