Jump to content

Outputting LED information from Black Shark


Recommended Posts

Hello Everyone,

 

I have been doing a lot of reading about how data can be exported from DCS Black Shark using Lua scripts. I installed Lua, and have done a fair bit of reading, but I'm still a little lost as to where to get started. I want to export data on LED indicators to either a usb HID device or a file or a serial port. Does anyone know where I can find information on how to do this? Thanks for all your help.

 

Sincerely,

Dirk7589

Link to comment
Share on other sites

If you are able to understand german this could be interesting:

 

http://forums.eagle.ru/showthread.php?t=76621

 

It's my selfmade USB devices which is able to be controlled by the simulation using LUA commands.

 

This is exactly what I'm hoping to make, sadly my german is a little rusty, but I will have a good look. What kind of micro controller is being used to interface? A PIC or an AVR?

 

Thanks,

Dirk7589

Link to comment
Share on other sites

Forgive me, but even after reading the wiki article, I'm still lost as to how to export data. I see how you can use the functions describe to obtain the information, but do you write that in your own script that gets run somewhere? Also, I'm pretty new with Lua so where do the scripts get run? Sorry for being so new at this.

 

Thanks,

Dirk7589

Link to comment
Share on other sites

The microcontroller is an AVR ATmega16.

 

I use the BlackShark\Config\Export\Export.lua file. There are a view functions that are called by the simulation.

 

LuaExportStart() is called once just before mission start.

 

LuaExportBeforeNextFrame() called before every simulation frame and can be used to give input data to the simulation so it can be used for calculation.

 

LuaExportAfterNextFrame() called after every simulation frame to get freshly calculated outputs from the simulation.

 

LuaExportStop() called once just after mission stop.

 

LuaExportActivityNextEvent(t) is called in chosen intervals dependent on value t.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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