; bed.g ; called to perform automatic bed compensation via G32 ; ; Bed file for Ender 5 Plus with probe offset of -45 -7 (creality default) M561 ; clear any bed transform G29 S2; Clear bed height map ; Probe 2-point ;M401 ; Deploy probe - deployprobe.g M671 X-23:386 Y180:180 S3 ; Define lead scew locations ; loop unless probe points are within 0.009 or 5 loops is reached while true ; run leveling pass G30 P0 X40 Y183 Z-9999 ; Front Left G30 P1 X323 Y183 Z-9999 S2; Front Right if move.calibration.initial.deviation < 0.009 break "Completed" ; check pass limit - abort if pass limit reached if iterations = 5 M291 P"Bed Leveling Aborted" R"Pass Limit Reached" abort "Bed Leveling Aborted - Pass Limit Reached" ;M402 ; Retract Probe - retractprobe.g