|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionI recently came across an article from 2006 by Scott Quibell about changing the LED's on an XPS notbook. I own an XPS M1710 and decided I would set out to discover how to control the LED's myself.
I started by downloading QuickSet from Dell, which is an application that allows you to control a lot of items on your laptop. It even has some built in effects for your LED's but none of them were impressive enough. The 0.5 minimum wait time made the effects seem too jumpy for my taste, so I began a search for to see how Dell was controlling the LED's from an application.
![]() I found my answer to controlling the LED's with Dell XPS LightFX - a prebuilt C++ library that controls the LED's. I wanted to use this with .NET applications so my only choice was to take the GamingSDK.dll shipped in XPS Light FX and write a .NET wrapper around it. I called this library
LightFX.RequirementsTo utilize XPS Light FX you need the following:
LightFXLightFX is a simple .NET wrapper around using XPS Light FX. I designed this library using the code from Björn Carlsson as a template. My code is very similar to his, but has been simplifed and modifed to match my own coding standards.The files included in
LightFX:
LightFX UsageUsage has been simplified greatly. The
LightFX.Led class handles the logic between Initializing the SDK and Releasing it. There are two methods of controlling the LED's. The first is by using an XML script file with SetEffectFile. <Effect>
<Sequence Zone1="5" Zone2="5" Zone3="5" Zone4="0" Intensity="7" Time="6000" />
<Sequence Zone1="2" Zone2="2" Zone3="2" Zone4="0" Intensity="7" Time="4000" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="1" Intensity="7" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="0" Intensity="2" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="1" Intensity="7" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="0" Intensity="2" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="1" Intensity="7" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="0" Intensity="2" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="1" Intensity="7" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="0" Intensity="2" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="1" Intensity="7" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="0" Intensity="2" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="1" Intensity="7" Time="250" />
<Sequence Zone1="1" Zone2="1" Zone3="1" Zone4="0" Intensity="2" Time="250" />
</Effect>
The script contains color definintions for the first three zones (0-16) the touchpad for zone 4 (0 or 1) the intensity (0-7) and the time in milliseconds. This script must be passed in as an XML file.
The other way to set the LED colors and brightness is to use the
LightFX.Setting struct in SetLed.Led led = new Led();
Setting settings = led.GetLedSettings();
settings.Fans = LightFX.Color.Ruby;
settings.Speakers = LightFX.Color.Ruby;
settings.Lid = LightFX.Color.Ruby;
setting.Intensity = LightFX.Intensity.Brightest;
setting.TouchPad = TouchPad.On;
led.SetLed(settings);
The above code will set all zones to Ruby at the highest intensity with the touchpad on. The zones can be altered by color independantly of one another, however the intensity applies to all zones, including the touchpad.
Current DeficienciesWhile the code I offer has much of the functionality, there may be methods I am missing. The included methods are only known thanks to Björn Carlsson's work. One particular missing feature is the ability to retrieve the current "Power On" settings. If you would like to delve further into the API and extract any more methods, please post the dll import delcarion in the comments and I will add your additions to the article (and give credit).
I have not tested this code on a desktop, but according to the documentation,
Setting (and NativeSetting) cannot be used for anything other than a laptop. If you have an XPS desktop, play around with the code and see what you can get it to do. If you write an article on how to use XPS Light FX on a desktop, let me know and I will link to it from this article.ConclusionYou could create a hook into online games (such as World of Warcraft) to make your lights change depending on the status of your character. You could make your computer perform lightshows on specific events, such as new e-mail or just one effect all the time. The QuickSet application even has plugins for Media Player and WinAmp to change the colors based on the music you are listening to. With the ability to change the LED colors and intensity, the opportunities are endless. If you are looking for a great idea in a professional environment, check out this article by Mike Swanson on Automated Continuous Integration and the Ambient Orb™. Using visual aids to augment the build lifecycle can be a very useful tool.
UpdatesMay 15, 2008
Altered the project by removing unnecessary references.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||