Jump to content

icls channel display?


eatthis

Recommended Posts

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?  

  • Like 2

7700k @5ghz, 32gb 3200mhz ram, 2080ti, nvme drives, valve index vr

Link to comment
Share on other sites

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?

  • Like 1
Link to comment
Share on other sites

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.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

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

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 by Kiseki_Yu
Link to comment
Share on other sites

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

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

  • Thanks 1
Link to comment
Share on other sites

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

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

  • Like 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

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

  • Recently Browsing   0 members

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