i have been trying to figure out a way to get them workin, but im not the best with the programming.
i did find 2 things in the logitech SDK for the LEDs.
i just need to figure out how to get the RPM data sent to wheel
#ifndef LOGI_LEDS_H_INCLUDED_
#define LOGI_LEDS_H_INCLUDED_
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
namespace LogitechSteeringWheel
{
CONST DWORD ESCAPE_COMMAND_LEDS = 0;
CONST DWORD LEDS_VERSION_NUMBER = 0x00000001;
struct LedsRpmData
{
FLOAT currentRPM;
FLOAT rpmFirstLedTurnsOn;
FLOAT rpmRedLine;
};
struct WheelData
{
DWORD size;
DWORD versionNbr;
LedsRpmData rpmData;
};
class Leds
{
public:
HRESULT Play(CONST LPDIRECTINPUTDEVICE8 device, CONST FLOAT currentRPM, CONST FLOAT rpmFirstLedTurnsOn, CONST FLOAT rpmRedLine);
private:
};
}
#endif // LOGI_LEDS_H_INCLUDED_
#include "LogiLeds.h"
#include "crtdbg.h"
using namespace LogitechSteeringWheel;
HRESULT Leds::Play(CONST LPDIRECTINPUTDEVICE8 device, CONST FLOAT currentRPM, CONST FLOAT rpmFirstLedTurnsOn, CONST FLOAT rpmRedLine)
{
if (NULL == device)
{
return E_POINTER;
}
WheelData wheelData_;
ZeroMemory(&wheelData_, sizeof(wheelData_));
wheelData_.size = sizeof(WheelData);
wheelData_.versionNbr = LEDS_VERSION_NUMBER;
wheelData_.rpmData.currentRPM = currentRPM;
wheelData_.rpmData.rpmFirstLedTurnsOn = rpmFirstLedTurnsOn;
wheelData_.rpmData.rpmRedLine = rpmRedLine;
DIEFFESCAPE data_;
ZeroMemory(&data_, sizeof(data_));
data_.dwSize = sizeof(DIEFFESCAPE);
data_.dwCommand = ESCAPE_COMMAND_LEDS;
data_.lpvInBuffer = &wheelData_;
data_.cbInBuffer = sizeof(wheelData_);
return device->Escape(&data_);
}