EricHigdon / OctoPrint-RGB_status

Adds RGB LED support to OctoPrint with the ability to choose effects based on the current status of your printer
33 stars 12 forks source link

Prelim M150 functionality #79

Open JohnTRoth opened 4 years ago

JohnTRoth commented 4 years ago

Support M150 (Issue #14)

JohnTRoth commented 4 years ago

Added fully functional M150, supporting the following: R - Red value (0-255) G or U - Green value (0-255) B - Blue value (0-255) P - Brightness (0-255) D - Delay I - LED Index (1 to # of LED's) When used in combination with Effect 9 (Solid With Brightness), specifying this will control the color/brightness of only the specified LED. Leaving this parameter out (or using a value of -1) will result in controlling all LED's E - Effect (0-9) The effect to display. Leaving out this parameter defaults to Effect 9 (Solid With Brightness) to maintain compatibility with the official M150 code.

Effects are one of: 0 = Theater Chase 1 = Solid Color 2 = Rainbow Cycle 3 = Rainbow 4 = Color Wipe 5 = Pulse 6 = Knight Rider 7 = Plasma 8 = Theater Chase Rainbow 9 = Color With Brightness

No known bugs, but plenty of room for improvement.

EricHigdon commented 3 years ago

@JohnTRoth Apologies, I left several comments on the code above and just realized that I never finalized my review.