Jump to content

Recommended Posts

Posted

Interesting, I will read up on the arduino boards, they seem to be priced quite well, even in New Zealand.

 

I am keen to see what the language is like and what you can do with them. It's been a few years since I have done any embedded stuff. I stil have my Atmel development kit around but I was using C and it looks like this is a different language. No doubt easier to do things with.

Posted

I have had a look at that stuff and I am sold! It looks lie a pretty good compromise for ease of use and functionality.

 

I thought there were only a few shields but there appear to be a lot made by third parties including gps etc. Fairly good prices. I might just have to give this all a go.

 

 

I also see one of them already supports windows keyboard/joysticks etc at a cheaper price that some of the other stuff I have been getting - with the benefit I can add my own code as well..

 

Thanks for the heads up on this guys!

Posted
The language is C++ with some limitations, anything "Arduino" in the language are just functions in their library

This "Arduino" cards seems interesting!

have you any links to show implementation of this cards?

Posted

A good way to script

 

Hi, some information concerning LUA and how you can use several scripts together.

 

For example, the folowing was done to use Tactview and Lotact together.

 

- First of all do not use Export.lua to integrate you lua script. Export.lua is a big comment ans should stay as.

 

- Add you export script in a new file (My_script.lua)

 

- Add the folowing line at the end in export.lua to call your script : dofile( "./Config/export/My_script.lua ")

- Your export script "My_script.lua" should have the folowing structure to work together with other scripts.

 

Myfunction =

 

{

Start=function(self)

-- Add here your code who will be executed once at startup (after pause)

 

end,

 

 

AfterNextFrame=function(self)

-- Add here your code who will be executed at each cycle time

 

end,

 

 

Stop=function(self)

-- Add here your code who will be executed when your leaving the simu

 

end,

}

 

 

-- =============

-- Overload

-- =============

 

-- Works once just before mission start.

do

local PrevLuaExportStart=LuaExportStart;

LuaExportStart=function()

Myfonction:Start();

if PrevLuaExportStart then

PrevLuaExportStart();

end

end

end

 

-- Works just after every simulation frame.

do

local PrevLuaExportAfterNextFrame=LuaExportAfterNextFram e;

LuaExportAfterNextFrame=function()

Myfonction:AfterNextFrame();

if PrevLuaExportAfterNextFrame then

PrevLuaExportAfterNextFrame();

end

end

end

 

-- Works once just after mission stop.

do

local PrevLuaExportStop=LuaExportStop;

LuaExportStop=function()

Myfonction:Stop();

if PrevLuaExportStop then

PrevLuaExportStop();

end

end

end

  • Like 1

EVAC : French fighter school on LockOn: Flaming Cliffs

 

Moding tutorials at C6

  • 2 months later...
Posted

I just finished my prototype of an USB output device. It's basically a microcontroller with an USB plug. The clou is that I managed to let DCS communicate via the LUA scripts directly with that device without any other software needed. Actual I'm searching for some documentation how to get the simulation values in the LUA scripts. Then its possible to switch LEDs like they are in the simulation.

Posted

Hi Meta,

 

Look for arg_number in lua files of Aircrafts/A-10C/Cockpit folder, for instance:

    AirspeedIndicator/device/AirspeedIndicator.lua
   maximum_IAS_needle.arg_number   = 50
   ...
   LightSystem/LightSystem.lua
   ConsoleLight = { [b]arg_number[/b]     = [color="Red"]800 [/color]... }
   ...
   mainpanel_init.lua
   pilot_draw.arg_number	    = 540
   ...
   NMSP/NMSP_param.lua
   light_HARS.arg_number	    = 606
   ...
   StandbyCompass/StandbyCompass.lua
   heading.arg_number		    = 6
   ...

Then, in your Export.lua:

    local LightSystem = GetDevice(0)
   local v       = LightSystem:get_argument_value([color="red"]800[/color])
   ...

  • 1 year later...
Posted

Now that is the thread I've been looking for all along. Thanks guys! (Yes I'm aware it is dated, but still not a bad idea to up it).

 

Looked through cockpit folder and for the life of me I can find arguments pertaining to SAS panel. Any idea what folder is the SAS lua file resides in ?

Thanks !

Anton.

 

My pit build thread .

Simple and cheap UFC project

  • Recently Browsing   0 members

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