SimoDax/MSI-mystic-light-tool

LEDs temporarily turn off when changing colours

Closed this issue · 5 comments

I'm currently trying to create a fade effect that smoothly transitions between colours. I first tried with the steady preset by just using setcolor however this causes a distracting blinking effect. I think that I could try to use the colour cycle preset or do something with setledspeed but I have been unable to get either to work. If anybody could help with this it would be greatly appreciated as I don't have much experience with c++.

I took a quick look at the code, you're using comparison (==) instead of assignment (=) in the last three if blocks. That's probably what's not working

The actual colour changing is fine its just each time I use setColor it causes the LED strip to blink off for a second. I think it might be something to do with the LED style or speed but I'm struggling to figure out how to use the third parameter in getSpeed and getStyle.

Yes but passing a negative color value to the sdk could have had that side effect. If it doesn't work it could actually be a hardware limitation so you need to use styles. The basic program flow is the same as the rest of the library:

  • First, call getLedInfo to see which styles it supports
  • Call setStyle passing as third parameter one of the supported styles from above

Something like

CComSafeArray<BSTR> styles;
BSTR ledName;
ml.getLedInfo(type, index, &ledName, &(styles.m_psa))

for(LONG i = styles.GetLowerBound(); i <= styles.GetUpperBound(); i++)
    printf("Style #%d: %S \n", i, styles.GetAt(i));`

Thanks a lot for the response, using your code I was able to set the style to something different however when I tried to use ml.setColor I got:
Function returned status code: Requested feature is not supported in the selected LED.
Does this mean that I am unable to modify the behaviour of the other styles?

Also, how do you use getSpeed, I'd like to see if the styles change the LED speed but I can't seem to get any value out of it.

I appreciate you have more important things to do but these default presets are really bugging me...

Some styles manage colors autonomously, you can't force it. It's like a preset.
getSpeed will tell you the current speed of the style, to set your own call setSpeed