horfee / OctoPrint-M150control

Apache License 2.0
1 stars 3 forks source link

Color wheel empty, brightness slider now integrated with color wheel block? #3

Open JohnTRoth opened 4 years ago

JohnTRoth commented 4 years ago

I think my last install was your July 13th changes (maybe the 6th?). That one worked perfectly, though the color wheel was less than optimal at lower brightnesses. The latest install though now has a brightness slider on one side of the color wheel and the white slider along the bottom. Unfortunately, the color wheel for me is now totally black regardless of brightness or white levels. I am not getting any javascript or missing file errors in the browser console, and I do see it sending M150 commands - though R, U, and B are always 0. W and P parameters are changing correctly.

I found an element within the page source:

Changing opacity="0" brought back the color to the color wheel - but that was not enough to get the M150 sending the proper colors.

Testing in Chrome and the new Edge (which is basically Chrome anyway).

JohnTRoth commented 4 years ago

I believe the issue is in /static/js/M150Control.js. When defining var colorPicker and var whiteColorPicker, you added defaults of lastColorSent and lastWhiteColorSent - which I believe you're reading from settings. But I think those values are not getting initialized on a fresh install. Eliminating those variables, reloading, choosing a color, then putting your latest changes back has allowed it to now function as expected.

I think I liked your old brightness slider with the gradient a bit more than the new one... but that's just personal preference. Thanks for your work!

horfee commented 4 years ago

By default it is white ("#FFFFFF") if no lastSentColor is empty. You may have this lastColorSent setting already saved. Try to go in the settings of the plugin, then add a custom color. You will be able to click on this custom color in the UI, which will restore the right colorwheel appearance. Then you can delete the preset colors in the settings if you want.

Taomyn commented 3 years ago

Just wanted to add that I just had the same after re-installing the plug-in. and using a custom colour has restored the colour wheel.

BTW, you did not increment the version number or something of this release because I did not receive any update notification and was stuck on the old version. Had to uninstall/install to get the latest.

Lumute commented 3 years ago

I just started using this plugin and took me a while to figure this out but now I see it more as a feature than a bug, why? if you set all your values to 0 to turn off the LEDs then the wheel goes back to black.

Not sure if this was the intended functionality by the author but its a good indicator that the LEDs are off. I just added the black color to turn the LEDs off (wheel goes black) an a couple other colors to turn them on (wheel starts working)