View Single Post
Old 10-01-2007, 06:36 PM   #287
cherrybomb
Variable Bitrate
cherrybomb's CarPC Specs
 
cherrybomb's Avatar
 
Join Date: Apr 2005
Location: Southern Califorina
Vehicle: 1999 Ford Explorer
Posts: 227
My Photos: ()
Okay ladies and gents..

I've added LED support. But more than that, I've added the ability to send output reports to HID devices in a generic way.

This may not seem like a big deal, but in the context of this application as a "generic" framework for input from many different HID sources, it's significant.

Basically, in the config file, for any given HID device, you can now define several commands, which define an HID output report number, and the value you wish to send in that report.

For the SpaceNavigator, there is only one output report, and only two potential values. The output report controls the LED and the value is either 1 == On or 0 == Off.

Code:
<devices> <device type="hid" name="SpaceNavigator" vid="0x046D" pid="0xC626"> <command name="Led On" report="0x0004" value="0x0001"/> <command name="Led Off" report="0x0004" value="0x0000"/> </device> </devices>

Then, you can invoke these commands, by sending a window message to the SpaceNavigator Driver app, that is in this format.

HID;<Device Name>,<Command>

Where <Device Name> is the name of the device defined in the <devices> config node, and <Command> is the name of the command you wish to invoke. So an example to turn on the LED would be.

HID;SpaceNavigator;Led On

You can download the latest binary from the sourceforge page here.

The config.xml file in the zip contains the devices node shown above, as well as a context that turns the LED on or off based on the button you push on the SN. The zip also includes a README.txt file which mentions the dependency on xerces C++ and has a download link. It also links back to this thread for reference.

Now to get working on a configuration app. :-)
__________________
'99 Ford Explorer Eddie Bauer
CarPC Progress ~= 97%. Everything is installed, and operational. Still need to tweak and tune, and do some "finish" fabrication.
CarPC Project Web Site

SpaceNavigatorDriver SourceForge Project

Check out my blog.

Last edited by cherrybomb : 10-01-2007 at 06:37 PM. Reason: 2 != Off
cherrybomb is offline   Reply With Quote