Skip to content

Fix 26132: UBL probe_entire_mesh could skip points#26141

Merged
thinkyhead merged 4 commits intoMarlinFirmware:bugfix-2.1.xfrom
mriscoc:bugfix-2.1.x-Fix26132
Aug 7, 2023
Merged

Fix 26132: UBL probe_entire_mesh could skip points#26141
thinkyhead merged 4 commits intoMarlinFirmware:bugfix-2.1.xfrom
mriscoc:bugfix-2.1.x-Fix26132

Conversation

@mriscoc
Copy link
Contributor

@mriscoc mriscoc commented Aug 1, 2023

UBL probe_entire_mesh could skip points at the end of the mesh loop if invalid points are found.

G29 P1 normally invalidates the mesh by filling it with NAN previously to call probe_entire_mesh.

The function probe_entire_mesh loads the total number of mesh points in the count variable.

grid_count_t count = GRID_MAX_POINTS;

And to get the next point to probe uses the following:

best = do_furthest
? find_furthest_invalid_mesh_point()
: find_closest_mesh_point_of_type(INVALID, nearby, true);

Both functions (find_furthest_invalid_mesh_point and find_closest_mesh_point_of_type) use NAN as a flag to find out points to be probed and skip points with valid values.

But if there is a failure in probe.probe_at_point the current point is filled with NAN, so find_furthest_invalid_mesh_point or find_closest_mesh_point_of_type will try to probe that same point again.

That will continue until the main loop ends mainly because the variable count is decreased to 0.

Requirements

UBL enabled

Benefits

An invalid mesh point must be flagged and skipped to allow probe_entire_mesh to continue to the next point.

Related Issues

This PR solves: #26132

UBL probe_entire_mesh could skip points at the end of the mesh loop if invalid points are found.
@thinkyhead thinkyhead merged commit 88f5e2c into MarlinFirmware:bugfix-2.1.x Aug 7, 2023
@mriscoc mriscoc deleted the bugfix-2.1.x-Fix26132 branch August 8, 2023 18:22
mikezs added a commit to mikezs/Marlin that referenced this pull request Aug 15, 2023
* bugfix-2.1.x: (427 commits)
  [cron] Bump distribution date (2023-08-14)
  🔧 Configurable SD card retry/timeout (MarlinFirmware#25340)
  [cron] Bump distribution date (2023-08-08)
  🐛 Fix MKS Robin Mini servo timer (MarlinFirmware#26150)
  🚸 Adjust ColorUI chamber bmp (MarlinFirmware#26149)
  🚸 UI Sound off/on with M300 E<0|1> (MarlinFirmware#26142)
  🐛 Fix UBL probe_entire_mesh skips points (MarlinFirmware#26141)
  🔨 Fix USB FD env names (MarlinFirmware#26131)
  🩹 PROBING_TOOL followup (MarlinFirmware#26122)
  🔧 Clarify WIFISUPPORT (MarlinFirmware#26097)
  🩹 Fix M3 `uninitialized` warning (MarlinFirmware#26091)
  🚸 FT_MOTION menu updates (MarlinFirmware#26083)
  [cron] Bump distribution date (2023-08-07)
  🚸 BD Sensor Z axis stop height (MarlinFirmware#26015)
  ⚡️ SAMD21 LCD uses HW SPI with media (MarlinFirmware#26012)
  🚸 Update LCD Manual Leveling display (MarlinFirmware#26088)
  📝 STM32G0B0 SKR Mini E3 V3.0 / Manta M4P (MarlinFirmware#26087)
  📝 Update a config comment
  [cron] Bump distribution date (2023-08-06)
  ✨ MM-JOKER (ESP32) board (MarlinFirmware#25897)
  ...

# Conflicts:
#	.github/workflows/bump-date.yml
#	.github/workflows/clean-closed.yml
#	.github/workflows/test-builds.yml
#	Marlin/Configuration.h
#	Marlin/Configuration_adv.h
#	Marlin/src/pins/pins.h
vlsi pushed a commit to vlsi/reborn2-marlin that referenced this pull request Sep 5, 2023
Pragma8123 pushed a commit to Pragma8123/Bender that referenced this pull request Oct 24, 2023
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request Oct 26, 2023
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.

[BUG] UBL probe_entire_mesh could skip points at the end of the mesh loop if invalid points are found.

3 participants