Jump to content

Recommended Posts

Posted

Hi All,

 

I am building a StreamDeck XL profile. This profile is based on the great interface that Charles Tytler created that uses Device IDs etc to control the various programmed systems directly, rather than using Keyboard Commands/Keystrokes. If anyone is interested, I will document and release said profile if people are interested

 

What I am trying to add now is Auto-Throttle (ATC). I do not wish to just use a HotKey and T, I want to use the correct code interface command

 

Can anyone assist me with this?

 

  • Like 1

Toni Carrera (Ice Rhino)

 

ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL

Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors

Posted

You should start looking in Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua

Looking for ATC... bingo!

 

{    down = hotas_commands.THROTTLE_ATC,                                up = hotas_commands.THROTTLE_ATC,                                cockpit_device_id = devices.HOTAS,    value_down =  1.0,    value_up = 0.0,    name = _('ATC Engage/Disengage Switch'),                    category = {_('Throttle Grip'), _('HOTAS')}},

 

So, ATC is one of devices.HOTAS commands.

 

For Device ID, look into \Mods\aircraft\FA-18C\Cockpit\Scripts\device.lua

devices["HOTAS"]                    = counter()--13     -- Stick and throttle grips,

 

The DeviceID is assigned by counter() auto-inc function, but the comment at the right shows

that  it's 13.

 

Then, open \Mods\aircraft\FA-18C\Cockpit\Scripts\command_defs.lua,

and look for THROTTLE_ATC.

We once again have this counter() function... But in the beginning of each commands set the counter

is reset to 3000 (count = start_command).

Counting down to THROTTLE_ATC... The CommandID seems to be 3037.

 

So... DeviceID = 13, CommandID = 3037

 

 

 

 

 

Posted

olistotch,

 

Thank you for your detailed response, I will work through what you have written and see if I can get it working

 

Again, much appreciated

 

Toni Carrera (Ice Rhino)

 

ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL

Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors

Posted (edited)

You're welcome.

I'm not quite familiar with Stream Deck, just viewed some videos of it.. looks amazing.

But I hope this method is applicable to it, because normally theese IDs are the standard

way of DCS' script actions manipulation.

Edited by olistotch
Posted

Hi, I'm the developer of the Streamdeck DCS plugin. I looked into this a bit. The IDs are the way the plugin interfaces with DCS so if you can look them up in the lua as mentioned in the joystick inputs file and manually enter them they'll work.

For the convenience "ID Lookup" table I generate in the plugin, I populate this by running the "Cockpit/Scripts/clickable_data.lua" file from the module. This means it only populates "clickable" items in the cockpit. Looking in the F/A-18C one they have some of the HOTAS device commands commented out (they maybe get in the way of other switches):

 

-- HOTAS STICK
elements["pnt_475"]        = limit_button(_("Weapon Release Button"),                                devices.HOTAS, hotas_commands.STICK_WEAPON_RELEASE,             475)
--elements["pnt_476_1"]    = limit_button( _('Sensor Control Switch, Fwd'),                        devices.HOTAS, hotas_commands.STICK_SENSOR_CONTROL_FWD,         476, {0.0,0.2}, 0.2)
--elements["pnt_476_2"]    = limit_button( _('Sensor Control Switch, Aft'),                        devices.HOTAS, hotas_commands.STICK_SENSOR_CONTROL_AFT,         476, {0.0,0.4}, 0.4)
--elements["pnt_476_3"]    = limit_button( _('Sensor Control Switch, Left'),                        devices.HOTAS, hotas_commands.STICK_SENSOR_CONTROL_LEFT,         476, {0.0,0.1}, 0.1)
--elements["pnt_476_4"]    = limit_button( _('Sensor Control Switch, Right'),                        devices.HOTAS, hotas_commands.STICK_SENSOR_CONTROL_RIGHT,         476, {0.0,0.3}, 0.3)
elements["pnt_477"]        = limit_button(_('RECCE Event Mark Switch'),                            devices.HOTAS, hotas_commands.STICK_RECCE_EVENT_MARK,             477)
--elements["pnt_478_1"]    = limit_button(_('Trimmer Switch, PUSH(DESCEND)'),                        devices.HOTAS, hotas_commands.STICK_TRIMMER_UP,                     478, {0.0,0.2}, 0.2)
--elements["pnt_478_2"]    = limit_button(_('Trimmer Switch, PULL(CLIMB)'),                        devices.HOTAS, hotas_commands.STICK_TRIMMER_DOWN,                 478, {0.0,0.4}, 0.4)
--elements["pnt_478_3"]    = limit_button(_('Trimmer Switch, LEFT WING DOWN'),                        devices.HOTAS, hotas_commands.STICK_TRIMMER_LEFT,                 478, {0.0,0.1}, 0.1)
--elements["pnt_478_4"]    = limit_button(_('Trimmer Switch, RIGHT WING DOWN'),                    devices.HOTAS, hotas_commands.STICK_TRIMMER_RIGHT,                 478, {0.0,0.3}, 0.3)
--elements["pnt_479_1"]    = limit_button(_('Gun Trigger, FIRST DETENT)'),                            devices.HOTAS, hotas_commands.STICK_TRIGGER_1ST_DETENT,         479, {0.0,0.5}, 0.5)
--elements["pnt_479_2"]    = limit_button(_('Gun Trigger, SECOND DETENT (Press to shoot)'),        devices.HOTAS, hotas_commands.STICK_TRIGGER_2ND_DETENT,         479, {0.0,1.0}, 1)
elements["pnt_482"]        = limit_button(_('Autopilot/Nosewheel Steering Disengage (Paddle) Switch'),    devices.HOTAS, hotas_commands.STICK_PADDLE,                 482)
--elements["pnt_481_1"]    = limit_button(_('Select Sparrow'),                                        devices.HOTAS, hotas_commands.STICK_WEAPON_SELECT_FWD,             481, {0.0,0.2}, 0.2)
--elements["pnt_481_2"]    = limit_button(_('Select Gun'),                                            devices.HOTAS, hotas_commands.STICK_WEAPON_SELECT_AFT,             481, {0.0,0.4}, 0.4)
--elements["pnt_481_3"]    = limit_button(_('Select AMRAAM'),                                        devices.HOTAS, hotas_commands.STICK_WEAPON_SELECT_IN,             481, {0.0,0.3}, 0.3)
--elements["pnt_481_4"]    = limit_button(_('Select Sidewinder'),                                    devices.HOTAS, hotas_commands.STICK_WEAPON_SELECT_DOWN,         481, {0.0,0.1}, 0.1)
elements["pnt_480"]        = limit_button(_('Undesignate/Nose Wheel Steer Switch'),                devices.HOTAS, hotas_commands.STICK_UNDESIGNATE,                 480)


-- HOTAS THROTTLE
--elements["pnt_486_1"]    = limit_button(_('COMM Switch, COMM 1'),                                devices.HOTAS, hotas_commands.THROTTLE_COMMS_COMM1,                486, {0.0,0.2}, 0.2)
--elements["pnt_486_2"]    = limit_button(_('COMM Switch, COMM 2'),                                devices.HOTAS, hotas_commands.THROTTLE_COMMS_COMM2,                486, {0.0,0.4}, 0.4)
--elements["pnt_486_3"]    = limit_button(_('COMM Switch, MIDS A'),                                devices.HOTAS, hotas_commands.THROTTLE_COMMS_MIDS_A,            486, {0.0,0.3}, 0.3)
--elements["pnt_486_4"]    = limit_button(_('COMM Switch, MIDS B'),                                devices.HOTAS, hotas_commands.THROTTLE_COMMS_MIDS_B,             486, {0.0,0.1}, 0.1)
--elements["pnt_487"]        = limit_button(_('Cage/Uncage Button'),                                    devices.HOTAS, hotas_commands.THROTTLE_CAGE,                     487)
--elements["pnt_488"]        = springloaded_3_pos_tumb(_('Dispense Switch, CHAFF/OFF/FLARE'),        devices.HOTAS, hotas_commands.THROTTLE_DISPENSE_FWD, hotas_commands.THROTTLE_DISPENSE_AFT, 313)
--elements["pnt_488_1"]    = limit_button(_('Dispense Switch, Forward(CHAFF)/Center(OFF)'),        devices.HOTAS, hotas_commands.THROTTLE_DISPENSE_FWD,             488)
--elements["pnt_488_2"]    = limit_button(_('Dispense Switch, Aft(FLARE)/Center(OFF)'),            devices.HOTAS, hotas_commands.THROTTLE_DISPENSE_AFT,             488, {-1.0,0.0}, -1.0)
--elements["pnt_489"]        = default_3_position_tumb(_('Speed Brake Switch, EXTEND/OFF/RETRACT'),    devices.HOTAS, hotas_commands.THROTTLE_SPEED_BRAKE,                489,    false, anim_speed_default, false)
--elements["pnt_489"].side = {}
--elements["pnt_490_1"]    = limit_button(_('Throttle Designator Controller, Up'),                devices.HOTAS, hotas_commands.THROTTLE_DESIGNATOR_CONTROLLER_UP,      490, {0.0,0.2}, 0.2)
--elements["pnt_490_2"]    = limit_button(_('Throttle Designator Controller, Down'),                devices.HOTAS, hotas_commands.THROTTLE_DESIGNATOR_CONTROLLER_DOWN,      490, {0.0,0.4}, 0.4)
--elements["pnt_490_3"]    = limit_button(_('Throttle Designator Controller, Left'),                devices.HOTAS, hotas_commands.THROTTLE_DESIGNATOR_CONTROLLER_LEFT,      490, {0.0,0.3}, 0.3)
--elements["pnt_490_4"]    = limit_button(_('Throttle Designator Controller, Right'),                devices.HOTAS, hotas_commands.THROTTLE_DESIGNATOR_CONTROLLER_RIGHT,   490, {0.0,0.1}, 0.1)
--elements["pnt_491"]        = limit_button(_('ATC Engage/Disengage Switch'),                        devices.HOTAS, hotas_commands.THROTTLE_ATC,                     491)
--elements["pnt_492"]        = limit_button(_('RAID/FLIR FOV Select Button'),                        devices.HOTAS, hotas_commands.THROTTLE_RAID_FOV,                 492)
--elements["pnt_493"]        = default_axis_limited(_('Radar Elevation Control, Up'),                    devices.HOTAS, hotas_commands.THROTTLE_ELEVATION_CONTROL_UP, 493, 0.0, 0.1, false, false, {0, 1})
elements["pnt_494"]        = default_2_position_tumb(_("Exterior Lights Switch, ON/OFF"),            devices.HOTAS,     hotas_commands.THROTTLE_EXTERIOR_LIGHTS,        494)

 

Perhaps I can look at parsing in the joystick default.lua files as well.

  • 3 weeks later...
Posted (edited)

Hi Charles,

 

Apologies for not responding to you quicker on your very kind response. I will try to work out how to get the value displayed for 491, so I can set a change state for imaging. Currently I have the button working, but no value appears no matter what i do. I guess i have to get the value to appear in the ID Lookup so I can change image accordingly 

 

Again, apologies and thank you

 

BTW, it is such a fantastic interface you have built, I totally love it

Edited by Toni Carrera

Toni Carrera (Ice Rhino)

 

ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL

Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors

Posted

Hi All,

 

I have managed to get the ATC to appear in the ID Lookup in the Stream Deck Interface, what I can't get working is getting the value to appear, which I assume it is something to do with not getting it to appear in the DCS Comms screen within the SD interface

 

Anyone know how to get the value to appear, or get the ID 491 to appear in the DCS Comms List?

 

Thank you

 

Toni Carrera (Ice Rhino)

 

ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL

Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors

  • Recently Browsing   0 members

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