Jump to content

ILS weirdness


Rage9532

Recommended Posts

Hi all!

 

First post.

 

I've been playing A-10C for a little while now and find it to be an outstanding sim! So, I decided to start putting together a panel to manage the radios, including TACAN and ILS, among other things. So far, everything is sitting on a breadboard.

 

I'm currently running DCS 1.2.6.19532 (Update 3 for Oct'2013).

 

I've got both an Export script and a .NET microcontroller setup with UDP broadcast Servers and Clients for two way communication. Everything network related works perfectly.

 

I've started putting together the code (both Export and controller) for getting the current values of, for now, just ILS and setting its knob positions. I've run into what I think is a bug in DCS.

 

When I set an encoder knob on the micro, it formats a command message and broadcasts it to DCS. The Export script receives it and executes a performClickableAction form the data in the message, but DCS does not change the value of either the MHz or KHz knobs on every other position change coming from the micro. This happens far more often when turning the knobs up from one value to the next. Turning them down in frequency still has the problem, but if you wait one full second between value changes, the game sets the new values as expected. But, waiting a full second is a bit of a pain.

 

For example... When changing the KHz knob, the controller sends the message "C53,3003,0.2" and the Export script properly parses and executes the change. Device 0:get_argument_value(252) returns 0.2, just as expected. BUT, increment the knob position one click again, the message sent is "C53,3003,0.3". This time, the game takes a long time to set the value. It continues to return 0.2 and eventually changes to 0.4 and the display in the game cockpit doesn't change. Now, if you then turn the knob again, sending "C53,3003,0.4", the 252 value stays at 0.4, skipping 0.3 altogether. The display in the game cockpit changes to what it should be.

 

There is also a delay between executing the command (performClickableAction) in the Export script and when the value is actually being returned as updated.

 

A log of the problem follows. The first column is the O/S timestamp. "Received..." is where the Export script gets the message from the UDP listener and parses and executes the command. The "SendData" lines are where the values are polled and compared to the previously recorded values. If there is a change, a message is composed to send the new data back to the microcontroller, over UDP broadcast. This is denoted in the log by "Send new value...".

 

Oh! If you change the knobs directly in the game by clicking on them, the correct values are exported without any problems whatsoever.

 

Any clues as to what's going on?? This problem occurs constantly and pretty much defeats the purpose of building this altogether.

 

<pre>526d8f11 Received: C53,3003,0.2

DeviceID: 53

Command: 3003=0.2

526d8f12 SendData: 251:0.0000 -- ILS MHz

526d8f12 SendData: 252:0.2000 -- ILS KHz

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 Received: C53,3003,0.3

DeviceID: 53

Command: 3003=0.3

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.2000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.4000

Send new value: 252=0.4000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.4000

526d8f12 SendData: 251:0.0000

526d8f12 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 Received: C53,3003,0.4

DeviceID: 53

Command: 3003=0.4

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000

526d8f13 SendData: 251:0.0000

526d8f13 SendData: 252:0.4000</pre>

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...