eatthis Posted September 4, 2023 Share Posted September 4, 2023 im a noob with this but is there a way to display the icl channel number anywhere? ie output it to arduino and have a display with the channel number. im pretty sure you can do it with the radio freqs etc but they have an in pit display wheras the icls doesnt. the reason i ask is its tricky to read exactly what chanell the switch is on. also how many icls channels are there? 2 7700k @5ghz, 32gb 3200mhz ram, 2080ti, nvme drives, valve index vr Link to comment Share on other sites More sharing options...
Trigati Posted September 4, 2023 Share Posted September 4, 2023 In an export script you can take the switch position and convert it to the channel number and output that.I’ve done this for a Streamdeck profile so should be just as possible for sending to another tool.Sent from my iPad using Tapatalk 1 Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 5, 2023 Share Posted September 5, 2023 11小时前,Trigati说: In an export script you can take the switch position and convert it to the channel number and output that. I’ve done this for a Streamdeck profile so should be just as possible for sending to another tool. Sent from my iPad using Tapatalk Could you please kindly explain this in more detail? 1 Link to comment Share on other sites More sharing options...
Trigati Posted September 6, 2023 Share Posted September 6, 2023 Sure, although I'm not sure what I know will fully help you unless you are already familiar in getting a DCS data export into your chosen device (arduino or StreamDeck etc) as mI don't fully understand that level. If you're going to build a display I can recommend searching around for DCS-BIOS (flight panels fork might be best) and DCS-Export on github and this forum. GitHub - DCSFlightpanels/dcs-bios: DCS-BIOS Flightpanels Fork I use DCS Export Scripts asherao/DCS-ExportScripts: DCS World Export Scripts (github.com) Simple Explanation: This script file enables the export of data from DCS and is focussed on cockpit controls and gauges. In the F-14 the ILS selection dial is mainpaneldevice argument 912. DCS sends all these as a value usually between 0 and 1....and as there are 20 channels it works out as a value of about 0.05 per channel. So if the switch was set to channel 7 the value would be 7 x 0.05 = 0.35 In the LUA script that formats these export values you can run all sorts of functions and formatting, so you would reverse engineer this value to output the channel number in a readable format (if the value from DCS is 0.70 then divide that by the 0.05 to get channel 14. More Complex: But it's not quite that simple, the selection knob has no 0/off position so when DCS sends a value of 0.0 it means channel 1 but the above simple math would tell you channel 0 - which does not exist. So we have to get the best approximate value and formula that works which works, so we set 0.0 value to equal channel 1 (by adding 1 to whatever we calculate the control position to be) and then split the value range of 1 into 19 (not 20) which is 0.0526315 This formula can be used to get the channel number from the DCS value: (VALUE/0.0526315) + 1 but you'll then need to round it to a single whole number to be readable in a display. Here is my LUA code I use to do this: channel = Round(mainPanelDevice:get_argument_value(912)/0.052) + 1 And the Round() function I'm using in that is: function Round(num) -- Rounds UP/Down to Nearest Whole Number return num % 1 >= 0.5 and math.ceil(num) or math.floor(num) end -------- How this is done in DCS-BIOS I have no clue, but I hope it gives you a good idea of what's needed. 2 2 Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 7, 2023 Share Posted September 7, 2023 16小时前,Trigati说: Sure, although I'm not sure what I know will fully help you unless you are already familiar in getting a DCS data export into your chosen device (arduino or StreamDeck etc) as mI don't fully understand that level. If you're going to build a display I can recommend searching around for DCS-BIOS (flight panels fork might be best) and DCS-Export on github and this forum. GitHub - DCSFlightpanels/dcs-bios: DCS-BIOS Flightpanels Fork I use DCS Export Scripts asherao/DCS-ExportScripts: DCS World Export Scripts (github.com) Simple Explanation: This script file enables the export of data from DCS and is focussed on cockpit controls and gauges. In the F-14 the ILS selection dial is mainpaneldevice argument 912. DCS sends all these as a value usually between 0 and 1....and as there are 20 channels it works out as a value of about 0.05 per channel. So if the switch was set to channel 7 the value would be 7 x 0.05 = 0.35 In the LUA script that formats these export values you can run all sorts of functions and formatting, so you would reverse engineer this value to output the channel number in a readable format (if the value from DCS is 0.70 then divide that by the 0.05 to get channel 14. More Complex: But it's not quite that simple, the selection knob has no 0/off position so when DCS sends a value of 0.0 it means channel 1 but the above simple math would tell you channel 0 - which does not exist. So we have to get the best approximate value and formula that works which works, so we set 0.0 value to equal channel 1 (by adding 1 to whatever we calculate the control position to be) and then split the value range of 1 into 19 (not 20) which is 0.0526315 This formula can be used to get the channel number from the DCS value: (VALUE/0.0526315) + 1 but you'll then need to round it to a single whole number to be readable in a display. Here is my LUA code I use to do this: channel = Round(mainPanelDevice:get_argument_value(912)/0.052) + 1 And the Round() function I'm using in that is: function Round(num) -- Rounds UP/Down to Nearest Whole Number return num % 1 >= 0.5 and math.ceil(num) or math.floor(num) end -------- How this is done in DCS-BIOS I have no clue, but I hope it gives you a good idea of what's needed. Thank you so much! I will try to add the code to F14B.lua tonight! Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 7, 2023 Share Posted September 7, 2023 (edited) 2023/9/6 PM5点44分,Trigati说: Sure, although I'm not sure what I know will fully help you unless you are already familiar in getting a DCS data export into your chosen device (arduino or StreamDeck etc) as mI don't fully understand that level. If you're going to build a display I can recommend searching around for DCS-BIOS (flight panels fork might be best) and DCS-Export on github and this forum. GitHub - DCSFlightpanels/dcs-bios: DCS-BIOS Flightpanels Fork I use DCS Export Scripts asherao/DCS-ExportScripts: DCS World Export Scripts (github.com) Simple Explanation: This script file enables the export of data from DCS and is focussed on cockpit controls and gauges. In the F-14 the ILS selection dial is mainpaneldevice argument 912. DCS sends all these as a value usually between 0 and 1....and as there are 20 channels it works out as a value of about 0.05 per channel. So if the switch was set to channel 7 the value would be 7 x 0.05 = 0.35 In the LUA script that formats these export values you can run all sorts of functions and formatting, so you would reverse engineer this value to output the channel number in a readable format (if the value from DCS is 0.70 then divide that by the 0.05 to get channel 14. More Complex: But it's not quite that simple, the selection knob has no 0/off position so when DCS sends a value of 0.0 it means channel 1 but the above simple math would tell you channel 0 - which does not exist. So we have to get the best approximate value and formula that works which works, so we set 0.0 value to equal channel 1 (by adding 1 to whatever we calculate the control position to be) and then split the value range of 1 into 19 (not 20) which is 0.0526315 This formula can be used to get the channel number from the DCS value: (VALUE/0.0526315) + 1 but you'll then need to round it to a single whole number to be readable in a display. Here is my LUA code I use to do this: channel = Round(mainPanelDevice:get_argument_value(912)/0.052) + 1 And the Round() function I'm using in that is: function Round(num) -- Rounds UP/Down to Nearest Whole Number return num % 1 >= 0.5 and math.ceil(num) or math.floor(num) end -------- How this is done in DCS-BIOS I have no clue, but I hope it gives you a good idea of what's needed. I am so sorry that I don't know anything about editing LUA. I copied two lines of code into F14B. lua, but nothing works. Could you please kindly tell me exactly where I should copy them? Edited September 7, 2023 by Kiseki_Yu Link to comment Share on other sites More sharing options...
Trigati Posted September 7, 2023 Share Posted September 7, 2023 Can you send me your lua and I can then see if I can add and rest it for you.Sent from my iPhone using Tapatalk 1 Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 7, 2023 Share Posted September 7, 2023 55分钟前,Trigati说: Can you send me your lua and I can then see if I can add and rest it for you. Sent from my iPhone using Tapatalk Thank you so much! I attached the file. F-14B.lua Link to comment Share on other sites More sharing options...
Trigati Posted September 7, 2023 Share Posted September 7, 2023 OK, is there a specific code number you want it output to? Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 7, 2023 Share Posted September 7, 2023 1分钟前,Trigati说: OK, is there a specific code number you want it output to? Sorry, I do not understand what you mean. I want to output the ICL channel number by using your suggestion mentioned above. i.e. the following codes: channel = Round(mainPanelDevice:get_argument_value(912)/0.052) + 1 function Round(num) -- Rounds UP/Down to Nearest Whole Number return num % 1 >= 0.5 and math.ceil(num) or math.floor(num) end Link to comment Share on other sites More sharing options...
Trigati Posted September 7, 2023 Share Posted September 7, 2023 Sure, that LUA file is used to send data out and I can easily add the lines to send the ICLS channel number.What the export does is send each bit of data under a separate Export IDFor example(and made up)….speed is sent as a value on ID 292, heading is sent as ID 456, rpm left is sent under ID 2036 etc etcWhatever you connect to read the export looks for the ID it wants and then uses that data.Is there a particular ID number you wanted me to code this to?If not I’ll send as I’d 88912 as the raw switch position is 912 1 Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 7, 2023 Share Posted September 7, 2023 8小时前,Trigati说: Sure, that LUA file is used to send data out and I can easily add the lines to send the ICLS channel number. What the export does is send each bit of data under a separate Export ID For example(and made up)….speed is sent as a value on ID 292, heading is sent as ID 456, rpm left is sent under ID 2036 etc etc Whatever you connect to read the export looks for the ID it wants and then uses that data. Is there a particular ID number you wanted me to code this to? If not I’ll send as I’d 88912 as the raw switch position is 912 Thank you very much! Please use ID88912. Link to comment Share on other sites More sharing options...
Trigati Posted September 14, 2023 Share Posted September 14, 2023 So sorry I've not had time to get to this...but it is done now. F-14B.lua 1 Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 15, 2023 Share Posted September 15, 2023 2023/9/14 PM6点41分,Trigati说: So sorry I've not had time to get to this...but it is done now. F-14B.lua 97.84KB · 1次下载 Thank you so much!!! It works fine! Link to comment Share on other sites More sharing options...
eatthis Posted September 16, 2023 Author Share Posted September 16, 2023 i need to work out what that all meant! 7700k @5ghz, 32gb 3200mhz ram, 2080ti, nvme drives, valve index vr Link to comment Share on other sites More sharing options...
Kiseki_Yu Posted September 17, 2023 Share Posted September 17, 2023 9小时前,eatthis说: i need to work out what that all meant! You need a Streamdeck. If you do not have it, you cannot out put your ICLS channel. Link to comment Share on other sites More sharing options...
eatthis Posted September 24, 2023 Author Share Posted September 24, 2023 On 9/17/2023 at 2:20 AM, Kiseki_Yu said: You need a Streamdeck. If you do not have it, you cannot out put your ICLS channel. why a streamdeck? 7700k @5ghz, 32gb 3200mhz ram, 2080ti, nvme drives, valve index vr Link to comment Share on other sites More sharing options...
draconus Posted September 25, 2023 Share Posted September 25, 2023 19 hours ago, eatthis said: why a streamdeck? I believe it's not true. If you have arduino and DCS-BIOS just make it talk to each other and use the script above to send current ICLS channel number to your device. https://thewarthogproject.com/arduinos-and-dcs-bios 2 Win10 i7-10700KF 32GB RTX3060 Rift S T16000M TWCS TFRP FC3 F-14A/B F-15E CA SC NTTR PG Syria Link to comment Share on other sites More sharing options...
eatthis Posted September 25, 2023 Author Share Posted September 25, 2023 4 hours ago, draconus said: I believe it's not true. If you have arduino and DCS-BIOS just make it talk to each other and use the script above to send current ICLS channel number to your device. https://thewarthogproject.com/arduinos-and-dcs-bios ULTIMATELY THATS WHAT I WANT. HOWEVER I HAVNT A CLUE HOW TO USE ARDUINO AND MY 1ST ATTEMPT AT SETTING IT IUP HAS FAILED MISERABLY LOL 7700k @5ghz, 32gb 3200mhz ram, 2080ti, nvme drives, valve index vr Link to comment Share on other sites More sharing options...
Recommended Posts