P-inna Posted May 4, 2022 Posted May 4, 2022 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. 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?
Bailey Posted May 18, 2022 Posted May 18, 2022 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. 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. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
P-inna Posted June 2, 2022 Author Posted June 2, 2022 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!!
Bailey Posted June 2, 2022 Posted June 2, 2022 58 minutes ago, P-inna said: Sorry for my late response but it works... awesome!! thanks you!! No problem. Glad to help. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
Recommended Posts