; bed.g ; called to perform automatic bed compensation via G32 M561 ; clear any bed transform if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed G28 M401 ; deploy Z probe (omit if using bltouch) G30 P0 X20 Y250 Z-99999 ; probe near a leadscrew, half way along Y axis G30 P1 X400 Y250 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors M402 ; retract probe (omit if using bltouch)