Git Product home page Git Product logo

Comments (5)

SimoDax avatar SimoDax commented on September 25, 2024

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

from msi-mystic-light-tool.

reesvarney avatar reesvarney commented on September 25, 2024

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.

from msi-mystic-light-tool.

SimoDax avatar SimoDax commented on September 25, 2024

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));`

from msi-mystic-light-tool.

reesvarney avatar reesvarney commented on September 25, 2024

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...

from msi-mystic-light-tool.

SimoDax avatar SimoDax commented on September 25, 2024

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

from msi-mystic-light-tool.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.