Jump to content

Program for export data (uv26, pvi, pui800) for dcs ka50


Crivi

Recommended Posts

hello bnepethomas

I'm working with teensy card to manage a 20x2 VFD screen and the cmsp buttons, the thing is i use COM ports on my teensy, for communication!

I use AutoIT to create my programs, the problem is that the dll i use to manage com ports is 32bits only and the DCSExport DLL is X64 only!

I am a totally noob in Visual studio and don't have any clues in how to change code to use com ports, do you think you can make a Com port version of your program?


Edited by icemaker
Link to comment
Share on other sites

hello bnepethomas

I'm working with teensy card to manage a 20x2 VFD screen and the cmsp buttons, the thing is i use COM ports on my teensy, for communication!

I use AutoIT to create my programs, the problem is that the dll i use to manage com ports is 32bits only and the DCSExport DLL is X64 only!

I am a totally noob in Visual studio and don't have any clues in how to change code to use com ports, do you think you can make a Com port version of your program?

I'm thinking/hoping you won't need to change the code too much.

This chunk of code is a simple mod of Crivi's code - it grabs the data and exports it over UDP to the filter. This means different programs are isolated from one another meaning it shouldn't matter if one is 64 bit and another is 32 bit. My goal is to minimise any changes to Crivi's code so that is easy to update to whatever other goodies come along. I basically do two things, I use text to speech to inform me when the code has found the A10 running, and when the search completes, and then for each cycle, I grab the data from text boxes and throw it into a UDP packet. I've basically just got the code going and haven't bothered cleaning it up, as its been a year building, and now I want to do some flying :)

 

https://code.google.com/p/bne-dcs-extract-master/

 

The filter listens on a UDP port on the same PC, it looks at the data received from Crivi's code and only forwards the data if it is different from the last packet, reducing the load further downstream.

https://code.google.com/p/bne-ocr-oled/

 

The final piece of c# code looks for a "9999=" in the data, if its there, then looks for CMSP or CMSC, and throws the data at the display.

 

All this runs on a single PC, and generates practically no CPU load. I don't think you'll need any ethernet shields as you can pass the data over the serial port to the board (which is what I'm doing). You need need to remember to insert some delay in the c# code so you don't overwhelm the serial interface. I found delays of around 50mS seem to work well for me.

 

I have a bit of a twist in my code as I hadn't a circuit to enable me to drive 7 displays off a single Arduino, but that can be removed if only a single display is connected to the board.

 

cheers

 

Peter


Edited by bnepethomas
Link to comment
Share on other sites

You're right, i have spent some hours on code and finally managed to send data to my LCD, i just need to slow the refresh rate because it crashes the com port due to too fast refreshes.

Should i use the "Thread.sleep()" function? to pause the program for fiew milliseconds?

Link to comment
Share on other sites

You're right, i have spent some hours on code and finally managed to send data to my LCD, i just need to slow the refresh rate because it crashes the com port due to too fast refreshes.

Should i use the "Thread.sleep()" function? to pause the program for fiew milliseconds?

Great to hear you've got it running.

 

Correct - Thread.sleep is your friend, what I did I was start with something very large (eg 500mS) and then started dialing it back. You may also want to check that the COM port is running at max speed, i.e. not 9600bps

 

cheers

 

Peter

Link to comment
Share on other sites

@Crivi can it be possible to get more datas from DCS memory like Warning panel satus, CDU Screen MFD's?

I have in mind something like F4Glass or other stuff like that.

 

Hi

 

I'd suggest sticking with the 'standard' LUA export where the right data it is available, hopefully that won't leave you up the creek if DCS changes something under the covers.

 

cheers

 

Peter

Link to comment
Share on other sites

you're right but things like CDU and MFD are not available by script so if we want it to be managed by another computer it's not that easy to do, that's why i asked.

In fact that's a question asked to my by a french user of the CheckSix forums where i'm WebMaster.

Link to comment
Share on other sites

Hello. Very nice work.

 

For the warning panel is better as you said Peter, much easier to implement if you already have something done in lua, the rest is more complicated. I'll try to watch it when I have more time.

 

I forgot to mention to one thing. I do not know if you noticed you have a line of code. In forms.cs:

 

/ / tacan, ils, vhf_am, vhf_fm

if (! DCSExtract.scan_a10c (true, true, true, true))

 

That it does is scan what you ask. If you put false so it does not interest greatly reduces scanning time. Especially when testing.

Link to comment
Share on other sites

Hi Noob in C#... therefore source code is not very usefull to people like me ... Is there any guide on how to do to use this software to communicate with helios or to display anything (autohotkey or with lua in DCS...) ? Or is it only to be used with interface cards for hard pit builders ? Hope you will find time to answer and if possible to implement it one day.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Crivi and all

Probably do this all wrong but can't get it working ;-). Any ideas wellcome

Got a fair hunch I miss something obvious (as wify keeps telling me)

 

First step is to see the data inside the DCSExtractGui

 

Haven't compiled the code, just downloaded the .zip and extracted files into a subdirectory. DCSexport64.dll and DCSExtractGui.exe are in same directory including rest of structure intact.

 

Starting DCSExtractGui prior DCS shows "Game not detected". Then starting DCS and wait.. Same status and blank datafield in the DCSExtractGui.

 

Starting DCS and enter a flight and then start DCSExtractGui does not show the "Game not detected" but on the otherhand nothing says "Game detected" or likewise. Data fields still blank. Waited for a 'long' time.

 

Made same attempt with Bnepethomas codeset with same results so the err seems to be on my side as usuall.

 

W7_64, All running on same PC

Tested with and without Windows firewall activated

DCS v1.2.6

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

Hi Crivi and all

Probably do this all wrong but can't get it working ;-). Any ideas wellcome

Got a fair hunch I miss something obvious (as wify keeps telling me)

 

First step is to see the data inside the DCSExtractGui

 

Haven't compiled the code, just downloaded the .zip and extracted files into a subdirectory. DCSexport64.dll and DCSExtractGui.exe are in same directory including rest of structure intact.

 

Starting DCSExtractGui prior DCS shows "Game not detected". Then starting DCS and wait.. Same status and blank datafield in the DCSExtractGui.

 

Starting DCS and enter a flight and then start DCSExtractGui does not show the "Game not detected" but on the otherhand nothing says "Game detected" or likewise. Data fields still blank. Waited for a 'long' time.

 

Made same attempt with Bnepethomas codeset with same results so the err seems to be on my side as usuall.

 

W7_64, All running on same PC

Tested with and without Windows firewall activated

DCS v1.2.6

 

Cheers

Gus

HI Guss

 

are you up for an update to 1.2.7?

 

cheers

 

Peter

Link to comment
Share on other sites

Hi Crivi. Sorry, I was away for biz. I have a usb matrix orbital lcd screen integrated into my pvi800 panel for years. Since there was no hope to be able to send pvi 800 info to an serial lcd screen for bs, I gave it up. Now you are bringing back the hope! I saw on this topic that some a10 pilots already succeded in doing this for their bird. Would very luch like to know how you guys did this.

Link to comment
Share on other sites

Hi guys. I had not set, but it only works with 1.2.7 as Peter said, do not know if it will work with the 1.2.8 beta, I prefer to wait for the final release to try out.

 

As for how to send data to your circuit pvi I can not help you, as you have not implemented or if it works through hid or bulk or require any driver as winusb, libusb or others. That would have to look, but if you need to implement a class in c# to communicate with your lcd, I've done things hid, with drivers microchip or winusb libusb, but the rest should before you, sorry.

  • Like 1
Link to comment
Share on other sites

Hi Gents,

 

A stupid question from my side. Have just tried it out and I do get everything working smoothly.

My question is... DCSExtractGui is extracting the information beautifully from the game but where are the information sent to? Is it by any change on a UDP string kind a like the Export.lua.

 

If questions is too stupid please discregard :smilewink:

 

Cheers

Hans

Link to comment
Share on other sites

Hi Gents,

 

A stupid question from my side. Have just tried it out and I do get everything working smoothly.

My question is... DCSExtractGui is extracting the information beautifully from the game but where are the information sent to? Is it by any change on a UDP string kind a like the Export.lua.

 

If questions is too stupid please discregard :smilewink:

 

Cheers

Hans

Hi Hans

 

Check out my code, it throws the information out via UDP.

 

Cheers

 

Peter

Link to comment
Share on other sites

  • Recently Browsing   0 members

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