; bed.g ; called to perform automatic bed compensation via G32 M42 P6 S80 ; G4 P500 ; G1 X-140 Y0 F9000 ; M561 ; clear any bed transform M401 ; deploy Z probe if necessary G30 P0 X-140 Y0 Z-99999 ; left lead screw G30 P1 X140 Y0 Z-99999 S2 ; right lead screw M402 ; retract the Z probe G29 ; probe the bed and enable compensation