@gringo
Ok
I'm clearly not up with M150 so hopefully someone else can help
All I can suggest is changing this
;loop through all the LED's
while iterations < global.ledSize - 1 ; set to 1 less than number of LED's in neopixel
if global.runLED = false
M150 R0 U0 B0 P0 W0 S58 F0 ; turn off neopixels
echo "exiting loop"
break
if global.ledState = 0
echo "next LED on " , iterations
M150 R{global.rLED} U{global.gLED} B{global.bLED} W{global.wLED} P{global.ledBrightness} S1 F0
else
echo "Next LED off" , iterations
M150 R0 U0 B0 W0 P0 S1 F0 ; set next LED in loop to either brightness or off
G4 S{global.ledDelay}
To this
;loop through all the LED's
while iterations < global.ledSize
if global.runLED = false
M150 R0 U0 B0 P0 W0 S58 F0 ; turn off neopixels
echo "exiting loop"
break
if global.ledState = 0
echo "next LED on " , iterations
M150 R{global.rLED} U{global.gLED} B{global.bLED} W{global.wLED} P{global.ledBrightness} S{iterations+1} F0
else
echo "Next LED off" , iterations
M150 R0 U0 B0 W0 P0 S{iterations +1} F0 ; set next LED in loop to either brightness or off
G4 S{global.ledDelay}