Driver for ESTLCam

Hi Ron, don’t know if you saw this before I edited it out: Lightburn Device Flavor - "Snapmaker", not "Marlin". Maybe it has uses outside of Lightburn, where there was a better way of doing what I was trying.

I had a Notepad++ Python Script for changing the Marlin M3 command and calculating the Snapmaker one. I just modified it to add M4 as well.

# Expects 1 match: S 0 to 255
def calculate3(match):
    return 'M03 P%s S%s' % (str(float(match.group(1))/255.0*100.0), str(int(float(match.group(1)))))

def calculate4(match):
    return 'M04 P%s S%s' % (str(float(match.group(1))/255.0*100.0), str(int(float(match.group(1)))))

# Match like M03 S1.275
editor.rereplace('M0?3 S([0-9\.]+)', calculate3)
editor.rereplace('M0?4 S([0-9\.]+)', calculate4)

Gets run like this:
image

1 Like