The online racing simulator
#1 - M.Mos
Outgauge plugin for my USB Device
I have made a USB Gamedevice Firmware for pic18f4550 microcontroller. It's a Hid device and can receive data from PC via Feature or Output reports, both are supported. Currently its just a Joystick with alot of buttons(64), 7-Segment Display and 16 LED. But i can do basicly any gamedevice stuff.

I need help with a Outgauge Plugin. So if someone realy want to help me with a plugin for LFS, i can send a ready assembled free controller. Of course i made it public so anyone can built it for free.
If you are familiar with C, you could check out my MOMO LEDs source code, it has code for initializing a HID device (though it only uses filewrite to write data to it, but it should be easy to modify to your needs) and receiving data from OutGauge.
#3 - M.Mos
Quote from Kegetys :If you are familiar with C

Unfourtunally i'm not I just learned Microchip Assembler and the USB stuff. But it looks like a easy job to modifiying your code. From reverse engineering the Momo i remember it used Vendor Output reports for switching the Led on/off. I don't know what you mean by file writes maybe thats just the MS terminology for Output Reports which you find in any USB docs!?
Quote from M.Mos :I don't know what you mean by file writes maybe thats just the MS terminology for Output Reports which you find in any USB docs!?

I mean it just opens a file handle to the HID device and writes 8 bytes of data to it. I guess the packet written is the 'raw' low-level method of doing the output reports, I found it by debugging the Momo racing centering fix utility - It does the same thing to set the LED states to defaults (for whatever reason).
#5 - M.Mos
I could change the code so that my device is reconized and can display some Led function. But I'm struggling to get the Gear data. I think i understand that it had to be read from OGPACKET.Gear and put into a variable, and then put it in the appropriate byte of 'foo' . But i have no clue how to do that. I'm a total C noob.

This don't work , dunno why :
Quote : // Write LED packet to wheel
BYTE foo[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
DWORD written;

// foo[0] = ReportId (if device use multiple ReportID's)
foo[1] = Gear;
foo[2] = Flags; //Flags bits 0-7
foo[3] = Flags; //Flags bits 8-15
// etc...

I saw your code sends data constantly, but only needs to send data if something has actually changed. i.e. Geardisplay it don't need to send the same gear over and over again. How could i compare the actual Geardata with last send Geardata and only resend if they are different, any hints?
#6 - M.Mos
Today i learned some C++. Now i got all the data i want. It was so easy, sorry i asked for help

@Kegetys , thank you for your great app.

Here a short video of my working Device.

btw. here are the schematics and firmware stuff.

FGED GREDG RDFGDR GSFDG