GithubHelp home page GithubHelp logo

Comments (5)

DarthAffe avatar DarthAffe commented on June 12, 2024

Hey,

which version of CUE.NET are you using? If it's not the latest nuget-package please try this.
If you do this already could you please provide me the following information:

  • Operating system
  • CUE/firmware version
  • The device you tried to work with
  • A small example application to reproduce this error

from cue.net.

roxaskeyheart avatar roxaskeyheart commented on June 12, 2024

I'm running CUE.NET 0.2 according to my reference properties. I'm running CUE 1.12.75 with latest firmware (I assume). Currently not testing on a live device, just trying to get code to compile without throwing errors.

The code I'm using can be found here: http://pastebin.com/mgDyfwGV

The error being output to the console (144 times) is: Object reference not set to an instance of an object.

from cue.net.

DarthAffe avatar DarthAffe commented on June 12, 2024

I'm honestly not sure what you're trying to do but from the code you posted I'd guess that you missed to initialize the SDK (https://github.com/DarthAffe/CUE.NET/wiki/Initializing-CUE.NET). Adding the initialization is the only change I needed to do to compile and run your code without errors.

(Btw: running this code without a attached keyboard won't work. Depending on what 'Currently not testing on a live device' referes to, this might be a problem too :p)

from cue.net.

roxaskeyheart avatar roxaskeyheart commented on June 12, 2024

I am initializing the CUE.NET library earlier in my code and decided to omit that from the pastebin to focus on the problematic code.

Unfortunately I don't have any Corsair devices to test on at the moment but if you're saying that the Object reference not set to an instance of an object. error is being caused by me forcing an output to a non-existent device, this would solve the problem.

When you ran the code I sent did it correctly output to a corsair device and change the color of all keys?

from cue.net.

DarthAffe avatar DarthAffe commented on June 12, 2024

Yes, seems like we tracked it down.
This code http://pastebin.com/in9QuTb1 colors my whole keyboard (K95) cyan.
If you haven't a device attached CueSDK.KeyboardSDK is null after the initialization. That's why you get the Object reference not set exception.
I prefer to add something like
CorsairKeyboard keyboard = CueSDK.KeyboardSDK;
if (keyboard == null)
throw new WrapperException("No keyboard found");
after the initialize call to prevent such problems.

Maybe something like a 'simulation mode' to develop without a keyboard would be useful ...

from cue.net.

Related Issues (20)

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.