The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Corsair Utility Engine (CUE) > CUE SDK

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #46  
Old 04-14-2017, 06:57 PM
Apathy420 Apathy420 is offline
Registered User
 
Join Date: Apr 2017
Posts: 4
POST ID # = 899367
Apathy420 Reputation: 10
Default

Quote:
Originally Posted by Darth Affe View Post
The approach of changing the opacity is good, for me it sounds lie you didn't set a "background-color" so there is nothing to shine through that opacity.

Code:
CorsairKeyboard keyboard = CueSDK.KeyboardSDK;
keyboard.Brush = new SolidColorBrush(Color.Black); // Black background - this will allow the foreground to fade away
ILedGroup keyboardLeds = new ListLedGroup(device, device); // replace this if you don't want to fade all leds
keyboardLeds.Brush = // add your brush here and change it's opacity. Don't forget to call 'CueSDK.KeyboardSDK.Update()' afterwards or set the UpdateMode to Continuous to enable auto-updates
I figured it out by doing this. ( I have auto update mode to continuous. )
Code:
            ILedGroup cueLedGroup = new ListLedGroup(cueDevice, true, cueDeviceLedIds);

            cueLedGroup.Brush = new SolidColorBrush(cueColor);

            for(double i = 0; i <= 1.0; i+=0.01)
            {
                cueLedGroup.Brush.Brightness = (float)i;
                await Task.Delay(1);
            }
but its a little glitchy. Do you know of a way that looks more smooth like how CUE actually does a fade? Also, I have tried different increments such as += 0.02 += 0.1 and += 0.04 all of which aren't smooth or too quick.


Edit: By the way, thanks for a quick reply.
Edit2: I've also been testing with just my m65 RGB. Not my RGB keyboard or headset...

Last edited by Apathy420; 04-14-2017 at 07:00 PM.
Reply With Quote
  #47  
Old 04-15-2017, 02:11 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 76
POST ID # = 899388
Darth Affe Reputation: 15
Default

I attached a sample how i'd do it.
If I run this on my K95 it looks fine. You're right, if I make the fade to slow it starts stuttering a bit. But I think that's because I've one of the old keyboards with limited 16,8m color mode.
Attached Files
File Type: zip CUENetFadeExample.zip (6.2 KB, 36 views)
Reply With Quote
  #48  
Old 04-22-2017, 07:40 PM
Apathy420 Apathy420 is offline
Registered User
 
Join Date: Apr 2017
Posts: 4
POST ID # = 900329
Apathy420 Reputation: 10
Default

Quote:
Originally Posted by Darth Affe View Post
I attached a sample how i'd do it.
If I run this on my K95 it looks fine. You're right, if I make the fade to slow it starts stuttering a bit. But I think that's because I've one of the old keyboards with limited 16,8m color mode.

I want to setup a rainbow effect, fade in and out each color, best approach? I also need to fire other code at same time of each color fade in and out.

I feel like the entire thing requires way more than it should just to set a fade... Also, im using my mouse also and this **** just sets the color for that.... No fade

//trigger color fade in for all corsair devices
//trigger other code that is related to prior
//trigger color fade out for all corsair devices
//trigger other code that is related to prior
//swap color
//repeat

Last edited by Apathy420; 04-22-2017 at 10:08 PM.
Reply With Quote
  #49  
Old 04-23-2017, 02:48 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 76
POST ID # = 900347
Darth Affe Reputation: 15
Default

I'm not entirely sure that I understand what you want to achieve but I added an updated example doing something like what you described.

Quote:
Also, im using my mouse also and this **** just sets the color for that.... No fade
Well I can't help much with that, the example I attached should work for both but since I don't have a light controllable mouse I'm not able to test this.
Attached Files
File Type: zip CUENetFadeExample.zip (6.6 KB, 34 views)
Reply With Quote
  #50  
Old 04-23-2017, 02:53 AM
Apathy420 Apathy420 is offline
Registered User
 
Join Date: Apr 2017
Posts: 4
POST ID # = 900348
Apathy420 Reputation: 10
Default

Quote:
Originally Posted by Darth Affe View Post
I'm not entirely sure that I understand what you want to achieve but I added an updated example doing something like what you described.


Well I can't help much with that, the example I attached should work for both but since I don't have a light controllable mouse I'm not able to test this.
Entirely i'm making an app that will set my RGB headset, keyboard and mouse to the same colors as my LED strip I have behind my monitor. So I want to make something that fades in and out different colors and synchronize with my LEDs. I don't really need help with all the extra logic, just trying to get my mouse to actually fade. It only sets the color instantly nothing adjusts it such as the keyboard fade. I will test in a bit or tomorrow and get back to you. Thanks for your help.

Last edited by Apathy420; 04-23-2017 at 02:56 AM.
Reply With Quote
  #51  
Old 06-19-2017, 10:38 AM
HactarCE HactarCE is offline
4D Cuber
HactarCE's PC Specs
 
Join Date: Oct 2016
Location: Earth
Posts: 3
POST ID # = 908680
HactarCE Reputation: 10
Default

What's the status on the input module? The last commit was six months ago, and I'm not sure how to install it with VS2017.
Reply With Quote
  #52  
Old 06-19-2017, 11:39 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 76
POST ID # = 908685
Darth Affe Reputation: 15
Default

Well the input module is still some kind of proof of concept - in theory it should work for all keyboards except the platinum, but since I'm only able to test with a K95 and there are some hardware specific things I can't say that for sure.

Using it is quite easy (if it works for your keyboard). Add the nuget-packages CUE.NET and HidSharp too your project and reference the attached binary (or compile it yourself from the source).
For a usage example I'd recommend the test-project in the source (https://github.com/DarthAffe/CUE.NET.../SimpleDevTest).
Attached Files
File Type: zip CUE.NET.Input.zip (12.8 KB, 13 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.