Hi all!
I am recently active with VB6 and making a application that is receiving the OutGauge UDP packets.
With VB6 i have created a Virtual dashboard that will visible on a secondary monitor.
All is going very well exept 1 thing....
How do I get the OG flags out of the FLAGS variable?
I want to copy the result into a new variable that would be 1 or 0
Anyone got an idea?
Kind Regards
Bjorn Pasteuning
I am recently active with VB6 and making a application that is receiving the OutGauge UDP packets.
With VB6 i have created a Virtual dashboard that will visible on a secondary monitor.
All is going very well exept 1 thing....
'Each update sends the following UDP packet :
Private Type OutGaugePacket
Time(0 To 3) As Byte 'time in milliseconds (to check order)
Car(0 To 3) As Byte 'Car name
Flags(0 To 1) As Byte 'Combination of OG_FLAGS, see below
Gear As Byte 'Reverse:0, Neutral:1, First:2...
SpareB As Byte 'Spare
Speed As Single 'M/S
Rpm As Single 'RPM
Turbo As Single 'BAR
EngTemp As Single 'C
Fuel As Single '0 to 1
OilPress As Single 'BAR
Spare1 As Single 'Spare
Spare2 As Single 'Spare
Spare3 As Single 'Spare
Throttle As Single '0 to 1
Brake As Single '0 to 1
Clutch As Single '0 to 1
Display1(0 To 15) As Byte 'Usually Fuel
Display2(0 To 15) As Byte 'Usually Settings
ID As Long '(optional ID - if specified in cfg.txt)
End Type
Private Const OG_SHIFTLIGHT As Long = 1
Private Const OG_FULLBEAM As Long = 2
Private Const OG_HANDBRAKE As Long = 4
Private Const OG_PITSPEED As Long = 8
Private Const OG_TC As Long = 16
Private Const OG_HEADLIGHTS As Long = 32
Private Const OG_SIGNAL_L As Long = 64
Private Const OG_SIGNAL_R As Long = 128
Private Const OG_REDLINE As Long = 256
Private Const OG_OILWARN As Long = 512
Private Const OG_1 As Long = 1024
Private Const OG_2 As Long = 2048
Private Const OG_3 As Long = 4096
Private Const OG_4 As Long = 8192
Private Const OG_KM As Long = 16384
Private Const OG_BAR As Long = 32768
How do I get the OG flags out of the FLAGS variable?
I want to copy the result into a new variable that would be 1 or 0
Anyone got an idea?
Kind Regards
Bjorn Pasteuning