Skip to content

Commit

Permalink
Add parameter for magnet compensation
Browse files Browse the repository at this point in the history
allow to enable/disable magnet compensation when 7x7 is in use.
  • Loading branch information
sarusani committed Sep 14, 2023
1 parent f193251 commit a144e3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,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 @@ -4882,12 +4883,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 3. Valid values are 3 and 7.
- `C` - Probe retry counts. Default 3 max. 10
- `O` - Return to origin. Default 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.
Using the following parameters enables additional "manual" bed leveling correction. Valid values are -100 microns to 100 microns.
#### Additional Parameters
Expand Down

0 comments on commit a144e3b

Please sign in to comment.