Comments (5)
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.
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.
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.
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.
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)
- Uninitialize or Shutdown functionality HOT 4
- Test development-changes with all devices HOT 6
- [1.0.0] Keyboard DeviceRectangle size HOT 3
- Using CUE.NET with CUE2 keyboard keys go to white when calling update() HOT 4
- Update Wiki
- Profile-API isn't able to find CUE2 profiles
- CUE.NET Does not initialize for some users HOT 5
- Memory leaks when using LED groups and brushes HOT 18
- K95 Platinum lightbar support HOT 8
- Load SDK dll from different location HOT 4
- VOID Wireless bug and feature request HOT 2
- Keys which don't exist on a physical device (ie. Macro keys) throws null reference HOT 4
- Locking the PC stops updates (sometimes) HOT 6
- HELP NEEDED: How to keep LED changes active after running application? HOT 2
- UWP Compatibility HOT 12
- CueSDK.Reinitialize never returns HOT 1
- Can't update Key Colors individually unless Brush is applied. HOT 4
- Calling EnableKeypressCallback() more than once causes duplicated events and GC/NRE issues
- Can't read color without device freezing
- Corsair keyboard K70 MK.2 RGB HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cue.net.