Jump to content

New StreamDeck Plugin


Recommended Posts

Also what software version are you running of the Stream Deck Interface. It may not be firmware, but rather the software. (more likely).

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Do you still have the older software version of stream deck on your machine (downloads folder), try uninstalling it, and installing an older version.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

For reference It's working on

 

Software Version: 4.7.0.12981

Firmware Version: 1.00.007

 

This is specific to the XL from what I understand.

 

Out of interest, where did you find the firmware update for the stream deck. It seems like elgato doesn't support updating the firmware on many of their products unless directed to by their support. (stated on a few of their products on the web). Just wondering as I'm looking into it myself.


Edited by nosaMtrevoC

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Also, this may be the problem (please report back if this is):

 

According to their site:

 

Windows 10 May 2020 Update Requires Elgato Stream Deck Software Update to 4.7

 

https://help.elgato.com/hc/en-us/articles/360044140571-Windows-10-May-2020-Update-Requires-Elgato-Stream-Deck-Software-Update-to-4-7

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Hi I’ll update my Streamdeck firmware and check for issues with the plugin. Feel free to post issues on that Github page as they’re easier for me to track. It’s easy to lose things in these forum threads.

Link to comment
Share on other sites

It's a Stream Deck XL.

I updated the firmware via the gear in the top middlish right of the Stream Deck software.

(Seems the option is only available if there's an update available)

I'm running the latest version, although Windows updated some time last night. I'll try again now and see if all the updates are in place.

Link to comment
Share on other sites

Hrm. I also have Software Version: 4.7.0.12981 Firmware Version: 1.00.007.

It's a connection issue, but I've not altered any of the connection settings.

Not sure what I'm missing here, or what could have changed.

 

Crap. I might know what changed. I installed Tacview, which apparently vomited excrement all over Export.lua. Not sure how to fix it, though.

 

 

RhSZXSu.png


Edited by slaintemaith
Link to comment
Share on other sites

This order seems to work.

 

dofile(lfs.writedir()..[[scripts\DCS-ExportScript\ExportScript.lua]])

 

pcall(function() local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[Mods\Tech\DCS-SRS\Scripts\DCS-SimpleRadioStandalone.lua]]); end,nil);

 

local Tacviewlfs=require('lfs');dofile(Tacviewlfs.writedir()..'Scripts/TacviewGameExport.lua')

Link to comment
Share on other sites

I got it all fixed. Tacview was the culprit. Be warned--it completely trashes your Export.lua and anything you might have had in it is toast--along with any other installs you had in your Saved Games folder. (I was hoping to copy it either from a "clean" [no longer] backup, or my VR backup. No such luck.)

Thankfully, the info I needed was on my backup backup.

Link to comment
Share on other sites

Glad it's resolved, there is a specific order for your export.lua that works and does not. I remember running into this when installing exportscripts.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

GunSlingerAUS and Phoenix FR,

 

It's going to be a large undertaking, but well on it's way. Sent you both a PM regarding your email address' to keep you updated. If I post the in progress script here I'll end up answering more questions than its worth. Never like posting in progress code/scripts.

 

Either way, I will post the original question posed by Phoenix which was doing the fuel output for the F-14 on the stream deck, completed that today along with documenting over 1000 and filtering about 2000 of the f-14 arguments or DCS ID's that relate to the cockpit including their functions, calls and appropriate variables.

 

If you want to see an example of the fuel output I'll post a youtube video later on tonight (still processing), but to add the fuel outputs to your stream deck do the following:

 

replace the ExportScript.ProcessIkarusDCSConfigHighImportance function (might look like below for you if you were testing with me, might look different if you were not, but you need to replace from the "fundtion ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)" line to the "end"

function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)

--Test fuel 10k output
local ourVariableTotalFuelRIO10k = mainPanelDevice:get_argument_value(2117)
local ourVariableTotalFuel10k = mainPanelDevice:get_argument_value(6010)
local ourVariableBingoFuel10k = mainPanelDevice:get_argument_value(6020)

ExportScript.Tools.SendData(2600, ourVariableTotalFuelRIO10k)
ExportScript.Tools.SendData(2601, ourVariableTotalFuel10k)
ExportScript.Tools.SendData(2602, ourVariableBingoFuel10k)

end

 

with:

 

function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
-- every frame export to Ikarus

-- FUEL Exports Formatted
-- NOTE: In case you are wondering to the weird methodology used below to derive fuel totals, I'll try to explain.
-- A combination of how the f-14 module is using this fuel data (e.g. 0.9 might mean 900 lbs, 0.0 would mean 000 lbs and 1.0 would mean 000 lbs also which effects the total if you use math to add them all together, so we can't use a simple method)
-- And also playing into this is the non-existance of certain math functions in lua language like concatenation or rounding. You need to convert to string and back which is slow
-- Because of this (not fully explained) it will create strange output for the total fuel when it rolls between whole values e.g. 15000 to 14900.
-- So instead we convert them to strings right away and extract the portion of the string (3'rd charachter) that is always correct (e.g. 1.0 is always 0 and 0.0 is also 0 and 0.4 is 4 etc...)
-- we then take the 10k, 1k, 100's etc.. 3'rd charachter and combine them like 15000
-- There is still a strange behaviour at first site that is exhibited, that is not so strange once explained:
-- When rolling over from 15000 to 14900, it will show 15000, then 15900 for a second or two, and then 14900. The reason is that the hundreds dial on the f-14 rolls quicker than the thousands dial therefore getting updated first instead of at the same time.
-- the above strange behaviour cannot be corrected unless there is a variable that stores the total fuel value instead of the fuel cockpit dial value which are two different things. (In my experience most dcs mods only give you access to the latter)
-- Therefore, we first concatenate the number to 0.X by converting it to a string and formatting it as such, and then extract the 3'rd character (I get it, nasty work around, If you have a better solution I'd love to hear it.)

local RIOFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(2117)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(2118)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(2119)), 3, 3) .. "00"
local leftFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6000)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6001)), 3, 3) .. "00"
local rightFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6004)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6005)), 3, 3) .. "00"
local totalFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6010)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6011)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6012)), 3, 3) .. "00"
local bingoFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6020)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6021)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6022)), 3, 3) .. "00"

local multiGauge = "BINGO " .. bingoFuel .. "\nTOTAL " .. totalFuel .. "\n\n   L   |   R   \n" .. leftFuel .. " | " .. rightFuel

ExportScript.Tools.SendData(52117, ExportScript.formatFuel('RIO', RIOFuel))
ExportScript.Tools.SendData(56000, ExportScript.formatFuel('left', leftFuel))
ExportScript.Tools.SendData(56004, ExportScript.formatFuel('right', rightFuel))
ExportScript.Tools.SendData(56010, ExportScript.formatFuel('total', totalFuel))
ExportScript.Tools.SendData(56020, ExportScript.formatFuel('bingo', bingoFuel))
ExportScript.Tools.SendData(56024, multiGauge)

end

 

and at the end of the file where you see Custom Functions area looks like:

 

-----------------------------
--     Custom functions    --
-----------------------------

 

Create some new lines below it and add:

 

-----------------------------
--     Custom functions    --
-----------------------------

function ExportScript.formatFuel(fuelType, fuelValue) 	-- Return Requested Fuel totals formatted (You can change the formatting here)

local returnFuel

if fuelType == "RIO" then							-- Return Total RIO Fuel Qty Formatted like F-14 Gauge
	returnFuel = "TOTAL\nFUEL QTY\n" .. fuelValue .. "\nLBS"
elseif fuelType == "left" then 						-- Return Total Left Fuel Qty Formatted like F-14 Gauge
	returnFuel = "L\n" .. fuelValue
elseif fuelType == "right" then 					-- Return Total Right Fuel Qty Formatted like F-14 Gauge
	returnFuel = "R\n" .. fuelValue
elseif fuelType == "total" then 					-- Return Total Fuel Qty Formatted like F-14 Gauge
	returnFuel = "FUEL\n" .. fuelValue .. "\nQTY"
elseif fuelType == "bingo" then 					-- Return Total Bingo Fuel Qty Formatted like F-14 Gauge
	returnFuel = "BINGO\n" .. fuelValue
end

return returnFuel
end

 

save file and for reference ID's use the following: (note: this doesn't need to be added to the file)

 

[Formatted for Stream Deck]
[iD]______ [Description]__________________________ [status]_______ [Output e.g.]___________
52117		RIO Total Fuel Gauge in lbs				working		15000 lbs
56000		Left Fuel Gauge in lbs 				working		4000 lbs
56004		Right Fuel Gauge in lbs 				working		4000 lbs
56010		Total Fuel Gauge in lbs 				working		15200 lbs
56020		Bingo Fuel Guage in lbs 				working		04000 lbs
56024		Multi Fuel Guage Custom				working		Shows all relevant fuel output totals in a single stream deck button

 

Figured I'd get your original question out of the way first.

 

Next step is maybe the fuel warning lights?

 

Still familiarizing myself with the f-14, need to figure out which lights go on and when and where etc... (diving through the manual)

 

Then back to all the other ID's

 

If you have a request about formatted or specialized output to the stream deck let me know and I'll prioritize them.

 

more to come....

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Here's an example of the above fuel indicators for the Stream Deck with the F-14B

 

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Does exporting this data does something performance wise to DCS (in a negative way)?

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

GunSlingerAUS and Phoenix FR,

 

It's going to be a large undertaking, but well on it's way. Sent you both a PM regarding your email address' to keep you updated. If I post the in progress script here I'll end up answering more questions than its worth. Never like posting in progress code/scripts.

 

Either way, I will post the original question posed by Phoenix which was doing the fuel output for the F-14 on the stream deck, completed that today along with documenting over 1000 and filtering about 2000 of the f-14 arguments or DCS ID's that relate to the cockpit including their functions, calls and appropriate variables.

 

If you want to see an example of the fuel output I'll post a youtube video later on tonight (still processing), but to add the fuel outputs to your stream deck do the following:

 

replace the ExportScript.ProcessIkarusDCSConfigHighImportance function (might look like below for you if you were testing with me, might look different if you were not, but you need to replace from the "fundtion ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)" line to the "end"

function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)

   --Test fuel 10k output
   local ourVariableTotalFuelRIO10k = mainPanelDevice:get_argument_value(2117)
   local ourVariableTotalFuel10k = mainPanelDevice:get_argument_value(6010)
   local ourVariableBingoFuel10k = mainPanelDevice:get_argument_value(6020)

   ExportScript.Tools.SendData(2600, ourVariableTotalFuelRIO10k)
   ExportScript.Tools.SendData(2601, ourVariableTotalFuel10k)
   ExportScript.Tools.SendData(2602, ourVariableBingoFuel10k)

end

with:

 

function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
   -- every frame export to Ikarus

   -- FUEL Exports Formatted
   -- NOTE: In case you are wondering to the weird methodology used below to derive fuel totals, I'll try to explain.
   -- A combination of how the f-14 module is using this fuel data (e.g. 0.9 might mean 900 lbs, 0.0 would mean 000 lbs and 1.0 would mean 000 lbs also which effects the total if you use math to add them all together, so we can't use a simple method)
   -- And also playing into this is the non-existance of certain math functions in lua language like concatenation or rounding. You need to convert to string and back which is slow
   -- Because of this (not fully explained) it will create strange output for the total fuel when it rolls between whole values e.g. 15000 to 14900.
   -- So instead we convert them to strings right away and extract the portion of the string (3'rd charachter) that is always correct (e.g. 1.0 is always 0 and 0.0 is also 0 and 0.4 is 4 etc...)
   -- we then take the 10k, 1k, 100's etc.. 3'rd charachter and combine them like 15000
   -- There is still a strange behaviour at first site that is exhibited, that is not so strange once explained:
   -- When rolling over from 15000 to 14900, it will show 15000, then 15900 for a second or two, and then 14900. The reason is that the hundreds dial on the f-14 rolls quicker than the thousands dial therefore getting updated first instead of at the same time.
   -- the above strange behaviour cannot be corrected unless there is a variable that stores the total fuel value instead of the fuel cockpit dial value which are two different things. (In my experience most dcs mods only give you access to the latter)
   -- Therefore, we first concatenate the number to 0.X by converting it to a string and formatting it as such, and then extract the 3'rd character (I get it, nasty work around, If you have a better solution I'd love to hear it.)

   local RIOFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(2117)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(2118)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(2119)), 3, 3) .. "00"
   local leftFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6000)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6001)), 3, 3) .. "00"
   local rightFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6004)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6005)), 3, 3) .. "00"
   local totalFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6010)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6011)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6012)), 3, 3) .. "00"
   local bingoFuel = string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6020)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6021)), 3, 3) .. string.sub(string.format("%.1f", mainPanelDevice:get_argument_value(6022)), 3, 3) .. "00"

   local multiGauge = "BINGO " .. bingoFuel .. "\nTOTAL " .. totalFuel .. "\n\n   L   |   R   \n" .. leftFuel .. " | " .. rightFuel

   ExportScript.Tools.SendData(52117, ExportScript.formatFuel('RIO', RIOFuel))
   ExportScript.Tools.SendData(56000, ExportScript.formatFuel('left', leftFuel))
   ExportScript.Tools.SendData(56004, ExportScript.formatFuel('right', rightFuel))
   ExportScript.Tools.SendData(56010, ExportScript.formatFuel('total', totalFuel))
   ExportScript.Tools.SendData(56020, ExportScript.formatFuel('bingo', bingoFuel))
   ExportScript.Tools.SendData(56024, multiGauge)

end

and at the end of the file where you see Custom Functions area looks like:

 

-----------------------------
--     Custom functions    --
-----------------------------

Create some new lines below it and add:

 

-----------------------------
--     Custom functions    --
-----------------------------

function ExportScript.formatFuel(fuelType, fuelValue)     -- Return Requested Fuel totals formatted (You can change the formatting here)

   local returnFuel

   if fuelType == "RIO" then                            -- Return Total RIO Fuel Qty Formatted like F-14 Gauge
       returnFuel = "TOTAL\nFUEL QTY\n" .. fuelValue .. "\nLBS"
   elseif fuelType == "left" then                         -- Return Total Left Fuel Qty Formatted like F-14 Gauge
       returnFuel = "L\n" .. fuelValue
   elseif fuelType == "right" then                     -- Return Total Right Fuel Qty Formatted like F-14 Gauge
       returnFuel = "R\n" .. fuelValue
   elseif fuelType == "total" then                     -- Return Total Fuel Qty Formatted like F-14 Gauge
       returnFuel = "FUEL\n" .. fuelValue .. "\nQTY"
   elseif fuelType == "bingo" then                     -- Return Total Bingo Fuel Qty Formatted like F-14 Gauge
       returnFuel = "BINGO\n" .. fuelValue
   end

   return returnFuel
end

save file and for reference ID's use the following: (note: this doesn't need to be added to the file)

 

[Formatted for Stream Deck]
[iD]______ [Description]__________________________ [status]_______ [Output e.g.]___________
52117        RIO Total Fuel Gauge in lbs                working        15000 lbs
56000        Left Fuel Gauge in lbs                 working        4000 lbs
56004        Right Fuel Gauge in lbs                 working        4000 lbs
56010        Total Fuel Gauge in lbs                 working        15200 lbs
56020        Bingo Fuel Guage in lbs                 working        04000 lbs
56024        Multi Fuel Guage Custom                working        Shows all relevant fuel output totals in a single stream deck button

Figured I'd get your original question out of the way first.

 

Next step is maybe the fuel warning lights?

 

Still familiarizing myself with the f-14, need to figure out which lights go on and when and where etc... (diving through the manual)

 

Then back to all the other ID's

 

If you have a request about formatted or specialized output to the stream deck let me know and I'll prioritize them.

 

more to come....

 

Here's an example of the above fuel indicators for the Stream Deck with the F-14B

 

 

 

Thank you a lot. :thumbup:

Link to comment
Share on other sites

nosaMtrevoC where can I find your F14 stream deck profile?

 

Don't have one yet.

 

the video is showing the raw output from the exportscript file and using the OP's stream deck plugin to use the 3'rd option to change or monitor text (can't remember what the title is) and using the ID's above like 56010 to monitor total fuel.

 

I do not have a sD proifle though. First step is to build the output properly in the form of the exportscript.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Started to play around a bit with this, got some stuff working, copied some stuff over, just as a test to see where which data comes from, like the Heading and the Altimeter in the P-51.

However, for the altimeter, 0 on the cockpitmeter (and the Streamdeck value) isn't exactly sea level because if the meter (and the Streamdeck value) give 0 and i switch to outside view it still gives around 30 feet ASL. Maybe i need to set the air pressure value in the cockpit somewhere first?

But that's not my biggest problem.

 

How do i know which DCS-ID to use if it is not listed in the P-51D.lua file?

Ex: The heading is DCS-ID 2012 this is simple because if i call up the DCS Comms list, it has HDG as text showing.

But where do i get the info that DCS-ID 2025 is the altimeter value?

Or what DCS-ID 2096 is?

If i use ID Look up in Streamdeck, i don't get any of these high ID numbers.

So where are these to be found?

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

Started to play around a bit with this, got some stuff working, copied some stuff over, just as a test to see where which data comes from, like the Heading and the Altimeter in the P-51.

However, for the altimeter, 0 on the cockpitmeter (and the Streamdeck value) isn't exactly sea level because if the meter (and the Streamdeck value) give 0 and i switch to outside view it still gives around 30 feet ASL. Maybe i need to set the air pressure value in the cockpit somewhere first?

But that's not my biggest problem.

 

Exactly (set air pressure, inches mercury) What you need to understand about the data exported is that it's cockpit or gauge information, not actual altitude (this goes for most of the data in this script)

 

If you want to show 0 at sea level then you would need to set the altimeter to the proper at sea level pressure value for the location.

 

How do i know which DCS-ID to use if it is not listed in the P-51D.lua file?

 

Not exactly sure what you mean, they are listed in the lua file (green text is the description of id)

 

Ex: The heading is DCS-ID 2012 this is simple because if i call up the DCS Comms list, it has HDG as text showing.

But where do i get the info that DCS-ID 2025 is the altimeter value?

Or what DCS-ID 2096 is?

If i use ID Lookup in Streamdeck, i don't get any of these high ID numbers.

So where are these to be found?

 

These high ID's were created by me for formatted information.

 

not sure what you mean by the "DCS Comms list"

 

I haven't created a list of my "high number" id's in the .lua file, because I didn't create the original lua file, I just offered my high id code so that someone can integrate it in their original lua file easily and use it. It's formatted nicely like 10500 feet instead of some cryptic value from the export.

 

The stream deck plugin is not my project, and adding my high id's to it would be simply editing the files in the stream deck plugin. Easy enough I'm sure, but a separate project altogether. I'm guessing first ctytler would want to make sure my code was included in the p-51 exportscripts project, which it isn't. No sense adding my ID's to his project if 99% of the people using exportscripts havent' seen this post.

 

If you did add my code from here hopefully this will help:

 

2012 - True Heading

2002 - Command Heading

2025 - Altitude (from gauge)

2096 - Low altitude warning (if altitude is below 50' then this value is 1, otherwise 0)

2155 and 2156 - left and right fuel tank

2160 - Fuselage tank

2011 - Indicated Air speed

3011 - Overspeed warning (if speed is < 455 value is 0, if 455 or more value is 1)

3033 - multi-gauge shows temps and pressure gauge information for 5 things.

3032 - multi-gauge warning (if any of the above values from 3033 are out of range this value is 1 otherwise 0)

 

All of the above descriptions are in green if opened in a proper .lua editor or after a double dash in my code, but not necissarily as descriptive or easy to read as above. I wrote this for me, and shared it with the community. In my post I stated this is not a "HOW-TO", but rather just me wanting to share what I have done so others can use it. It is the exact code I need to get it working as shown in my youtube video example. I had no intentions of re-writing the p-51D script to be easier or anything else for that matter. Just got it working and that's good for me, then shared it.

 

the P-47 script and the upcoming F-14 script were written by me from the ground up and will be very descriptive.

 

Hopefully you can get something from the above.

 

Feel free to ask if you have any questions.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

keep in mind with altitude warning, it only works at 50' if proper pressure is set.

 

the reason it shows - after 0 even though you are still at altitude is because if you go below 0 feet (because the proper inHg is not set) it shows 99999 and then 99998 etc...

 

I didn't like the look of that on the gauge so as my code reflects if altitude is less than 0, just show -

 

usually, you would not set your altimeter to Sea-level anyways, so this problem will always present itself if flying low over the channel for instance.

 

The altitude warning is meant to be a visual that you can see out of the corner of your eye that changes to yellow at 50 and then red at 10, for instance, to assist with landing and when to flare etc...

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

I don't mind posting my p-51 file in its entirety, but I don't like posting things like this that were not created entirely by me as it may look like I'm taking credit for doing the p-51d.lua file as a whole. Instead I just posted the portion of the code that is above. If I knew who originally created the P-51D export file I would give appropriate credits at top and then make my additions at bottom, but I do not know who did this originally. It's kind of a sticking point for me with open source work. Credit for others work is important.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Altimeter: Makes sense, I'll test some more later today because i have some other things to figure out.

Credits: 100% with you there.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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