OK, I am raging against the machine a little bit here. But I want to get the LED counter of the back of these positional guns to work.
Are there any coders out there that can answer my question in a way this simpleton can understand?
In regards to the positional guns. This is the code that is sent to activate the recoil when the game sends a state of '1':
ghd 1 &H04B4 &H6870 8 &h02:&h01:&h01:&h00:&h00:&h00:&h00:&h00
From my understanding:
ghd 1 = Generic Hid Device 1
&H04B4 = The device #
&H6870 = The Vendor #
8 = The Byte Length
&h02 = The first byte and the specific part of the device being spoken to, in this case the recoil. On the others it looks like &h03 is the rear LED counter and &h04 is the LED strip.
&h01:&h01:&h00:&h00:&h00:&h00:&h00 = The last bytes sent
So this works to send the recoil signal. For the rear LED counter (double 7-digit displays), the signal sent is:
ghd 1 &H04B4 &H6870 3 &h03:&h00:&h0%s%
The difference this time is that we are sending only 3 bytes to &h03 and the &h0%s% sends the state, lets say '15' to display. Here is where my problem starts. The only thing displayed is '05' If I change it to &h01:&h%s% it will display '15' but only the 1st digit counts down, the 2nd digit stays a 1. If I change it to &h0%s%:&h0%s% it will display '55' and both numbers will count down in 44, 33, 22, etc..
I don't know how to get it to read the first digit in the state and send that to the display.
Any help would be greatly appreciated!