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

MBL: Add magnet compensation parameter #4390

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,8 @@ static void gcode_G80()

mbl.upsample_3x3(); //interpolation from 3x3 to 7x7 points using largrangian polynomials while using the same array z_values[iy][ix] for storing (just coppying measured data to new destination and interpolating between them)

if (nMeasPoints == 7 && eeprom_read_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION)) {
uint8_t useMagnetCompensation = code_seen('M') ? code_value_uint8() : eeprom_read_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION);
if (nMeasPoints == 7 && useMagnetCompensation) {
mbl_magnet_elimination();
}

Expand Down Expand Up @@ -4880,12 +4881,13 @@ void process_commands()
Default 3x3 grid can be changed on MK2.5/s and MK3/s to 7x7 grid.
#### Usage

G80 [ N | C | O | L | R | F | B | X | Y | W | H ]
G80 [ N | C | O | M | L | R | F | B | X | Y | W | H ]

#### Parameters
- `N` - Number of mesh points on x axis. Default is value stored in EEPROM. Valid values are 3 and 7.
- `C` - Probe retry counts. Default is value stored in EEPROM. Valid values are 1 to 10.
- `O` - Return to origin. Default is 1. Valid values are 0 (false) and 1 (true).
- `M` - Use magnet compensation. Will only be used if number of mesh points is set to 7. Default is value stored in EEPROM. Valid values are 0 (false) and 1 (true).

Using the following parameters enables additional "manual" bed leveling correction. Valid values are -100 microns to 100 microns.
#### Additional Parameters
Expand Down