enertial / streamdeck-dcs-interface

A StreamDeck plugin for interaction with Digital Combat Simulator (DCS)
GNU General Public License v3.0
190 stars 20 forks source link

A-10C2 module not able to export Fuel or other calculated values #132

Open jvanlint opened 8 months ago

jvanlint commented 8 months ago

Hi there, Great plugin and it has become a valuable tool for me in DCS. I was inspired by the F-15E profile I downloaded recently which displayed values like fuel flow and total fuel so dug around the files to see if something similar was available for the A-10C2. So there is code in there, but for A-10C2 it doesn't seem to want export the value defined in this line of code.


local lFuelQuantityCounterTenthOfThous = mainPanelDevice:get_argument_value(90) * 10000             -- {0.0, 10.0} {0.0, 1.0}
local lFuelQuantityCounterThousands = mainPanelDevice:get_argument_value(91) * 1000                 -- {0.0, 10.0} {0.0, 1.0}
local lFuelQuantityCounterHundreds = mainPanelDevice:get_argument_value(92) * 100                   -- {0.0, 10.0} {0.0, 1.0}
-- orginal
local lFuelQuantityCounter = ((lFuelQuantityCounterTenthOfThous + lFuelQuantityCounterThousands + lFuelQuantityCounterHundreds) / 10)
ExportScript.Tools.SendDataDAC("2007", string.format("%0.0f", lFuelQuantityCounter).."00")

Trying to read ID 2007 just gives a blank button. Trying to read the same value in the original A-10C airframe seems to return a value but this code is broken in the A-10C2 module. Any thoughts anyone?