***updated***
I made with radekteam basecode (only udp packet capture) and my code
set outgauge port to 11111
unrar start and enjoy :
cfg.txt:
updated link : http://data.hu/get/658442/limiter.rar.html
try it
its only active for rpm limiter light!
Source code:
I made with radekteam basecode (only udp packet capture) and my code
set outgauge port to 11111
unrar start and enjoy :
cfg.txt:
OutGauge Mode 2
OutGauge Delay 5
OutGauge IP 127.0.0.1
OutGauge Port 11111
OutGauge ID 2
updated link : http://data.hu/get/658442/limiter.rar.html
try it
its only active for rpm limiter light!
Source code:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdUDPBase, IdUDPServer,IdSocketHandle, StdCtrls,
ComCtrls, ExtCtrls, Gauges, MMsystem;
type
TPacket = record
Time: longint; // time in milliseconds (to check order)
Car: array[0..3] of char; // Car name
Flags: word; // OG_FLAGS
Gear: byte; // Reverse:0, Neutral:1, First:2...
SpareB: byte;
Speed: single; // M/S
RPM: single; // RPM
Turbo: single; // BAR
EngTemp: single; // C
Fuel: single; // 0 to 1
OilPress: single; // BAR
Spare1: single;
Spare2: single;
Spare3: single;
Throttle: single; // 0 to 1
Brake: single; // 0 to 1
Clutch: single; // 0 to 1
Display1: array[0..15] of char; // Usually Fuel
Display2: array[0..15] of char; // Usually Settings
// ID: integer; // optional - only if GameID is specified
end;
TForm1 = class(TForm)
IdUDPServer1: TIdUDPServer;
Label16: TLabel;
Label17: TLabel;
GroupBox1: TGroupBox;
CheckBox1: TCheckBox;
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
procedure IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
paczka: Tpacket;
gear_tmp:string;
s: array[0..79] of char;
implementation
{$R *.dfm}
procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
begin
Adata.Read(paczka, sizeof(paczka));
//////OG Flags//////
if (paczka.Flags AND 1) <> 0 then
CheckBox1.Checked:= True
else
CheckBox1.Checked:= False;
if (paczka.Flags AND 1) <> 0 then
CheckBox1.Checked:= True
else
CheckBox1.Checked:= False;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
IdUDPServer1.DefaultPort := 11111;
IdUDPServer1.Active := true;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
IdUDPServer1.Active:=False;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
IdUDPServer1.DefaultPort := 11111;
IdUDPServer1.Active := true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if checkbox1.Checked = true then
begin
StrCopy(s, 'rev.wav');
sndPlaySound(s, 1);
checkbox1.Checked:=false;
end;
end;
end.