Jump to content

StreamDeck fuel indicator F-16/F/A-18.


Recommended Posts

Hello!

 

I am switching between the F/A-18 and F-16 lately and using a StreamDeck XL to help me control these beasts.

 

F/A-18 StreamDeck profile:

https://www.digitalcombatsimulator.com/en/files/3319825/

 

F-16 StreamDeck profile:

https://www.digitalcombatsimulator.com/en/files/3316577/

 

I the F/A-18 StreamDeck profile there is an indicator for the amount of fuel left.

 

afbeelding.pngafbeelding.png

 

In the F-16 profile there isn't and it would be really handy for me.

 

Is it possible to add this function and how can i do that?

Link to comment
Share on other sites

  • 2 weeks later...
On 5/4/2022 at 4:07 PM, P-inna said:

Hello!

 

I am switching between the F/A-18 and F-16 lately and using a StreamDeck XL to help me control these beasts.

 

F/A-18 StreamDeck profile:

https://www.digitalcombatsimulator.com/en/files/3319825/

 

F-16 StreamDeck profile:

https://www.digitalcombatsimulator.com/en/files/3316577/

 

I the F/A-18 StreamDeck profile there is an indicator for the amount of fuel left.

 

afbeelding.pngafbeelding.png

 

In the F-16 profile there isn't and it would be really handy for me.

 

Is it possible to add this function and how can i do that?

It is possible. You can use this:
 

function ExportScript.FuelInfo(mainPanelDevice)	
	local FuelTotalizer_10k = mainPanelDevice:get_argument_value(730) * 100000
	local FuelTotalizer_1k = math.floor(mainPanelDevice:get_argument_value(731) * 10) * 1000 -- this method counters the odd rounding seen with roller counters
	local FuelTotalizer_100 = mainPanelDevice:get_argument_value(732) * 1000
	
	local totalFuel = FuelTotalizer_10k + FuelTotalizer_1k + FuelTotalizer_100
	totalFuel = round(totalFuel, 0)
	totalFuel = format_int(totalFuel)
	ExportScript.Tools.SendData(3006, "Fuel LBS\n" .. totalFuel)
	
	
	local FuelFlowCounter_10k = mainPanelDevice:get_argument_value(88) * 100000
	local FuelFlowCounter_1k = math.floor(mainPanelDevice:get_argument_value(89) * 10) * 1000 -- this method counters the odd rounding seen with roller counters
	local FuelFlowCounter_100 = mainPanelDevice:get_argument_value(90) * 1000
	
	local totalFuelFlowCounter = FuelFlowCounter_10k + FuelFlowCounter_1k + FuelFlowCounter_100
	totalFuelFlowCounter = round(totalFuelFlowCounter, -1)
	totalFuelFlowCounter = format_int(totalFuelFlowCounter)
	
	ExportScript.Tools.SendData(3007, "Fuel Flow\n" .. totalFuelFlowCounter)
end

It is from:
https://github.com/asherao/DCS-ExportScripts
https://github.com/asherao/DCS-ExportScripts/wiki
https://github.com/asherao/DCS-ExportScripts/wiki/F-16C-Viper.

Link to comment
Share on other sites

  • 3 weeks later...
On 5/18/2022 at 9:38 AM, Bailey said:

It is possible. You can use this:
 

function ExportScript.FuelInfo(mainPanelDevice)	
	local FuelTotalizer_10k = mainPanelDevice:get_argument_value(730) * 100000
	local FuelTotalizer_1k = math.floor(mainPanelDevice:get_argument_value(731) * 10) * 1000 -- this method counters the odd rounding seen with roller counters
	local FuelTotalizer_100 = mainPanelDevice:get_argument_value(732) * 1000
	
	local totalFuel = FuelTotalizer_10k + FuelTotalizer_1k + FuelTotalizer_100
	totalFuel = round(totalFuel, 0)
	totalFuel = format_int(totalFuel)
	ExportScript.Tools.SendData(3006, "Fuel LBS\n" .. totalFuel)
	
	
	local FuelFlowCounter_10k = mainPanelDevice:get_argument_value(88) * 100000
	local FuelFlowCounter_1k = math.floor(mainPanelDevice:get_argument_value(89) * 10) * 1000 -- this method counters the odd rounding seen with roller counters
	local FuelFlowCounter_100 = mainPanelDevice:get_argument_value(90) * 1000
	
	local totalFuelFlowCounter = FuelFlowCounter_10k + FuelFlowCounter_1k + FuelFlowCounter_100
	totalFuelFlowCounter = round(totalFuelFlowCounter, -1)
	totalFuelFlowCounter = format_int(totalFuelFlowCounter)
	
	ExportScript.Tools.SendData(3007, "Fuel Flow\n" .. totalFuelFlowCounter)
end

It is from:
https://github.com/asherao/DCS-ExportScripts
https://github.com/asherao/DCS-ExportScripts/wiki
https://github.com/asherao/DCS-ExportScripts/wiki/F-16C-Viper.

Sorry for my late response but it works... awesome!! thanks you!!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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