Jump to content

Fuel Dump Switch 2-position


Recommended Posts

Not sure why the following edit to the joystick.lua for the FA-18C is not working:

 

{	down = fuel_commands.DumpSw, 						up = fuel_commands.DumpSw, 					cockpit_device_id = devices.FUEL_INTERFACE, 		value_down =  1.0, 		value_up = 0.0,	name = _('Fuel Dump Switch - ON/OFF'),								category = {_('Left Console'), _('Fuel Control Panel')}},

 

Is anyone able to get the fuel dump switch to work as a 2-pos switch?

VF-111 Sundowners



[sIGPIC][/sIGPIC]

Carrier Group 1 - Battlegroup Delta

 

Beware the lessons of a fighter pilot who would rather fly a slide rule than kick your ass!

-Commander Ron "Mugs" McKeown, USN

Commander, U.S. Navy Fighter Weapons School

2 Victories, Vietnam

Link to comment
Share on other sites

  • 1 year later...

That original line of code produces an ON/OFF toggle behaviour.

I created a new line of code for a true 2-Pos. switch:

{down = fuel_commands.DumpSw, up = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down =  1.0, value_up = -1.0, name = _('Fuel Dump Switch 2-Pos ON/OFF'), category = {_('Left Console'), _('Fuel Control Panel')}},

I use the same approach to create 2-position switches for the launch bar, the hook bypass and Landing/Taxi Lights:

{down = cptlights_commands.HookBypass, up = cptlights_commands.HookBypass,    cockpit_device_id = devices.CPT_LIGTHS,    value_down =  -1.0,    value_up = 1.0,    name = _('Hook Bypass 2-Pos Switch FIELD/CARRIER'), category = {_('Left Vertical Panel')}},
{down = gear_commands.LaunchBarSw, up = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down =  -1.0, value_up = 1.0,    name = _('Launch Bar Control 2-Pos Switch RETRACT/EXTEND'), category = {_('Left Vertical Panel')}},
{down = extlights_commands.LdgTaxi,    up = extlights_commands.LdgTaxi, cockpit_device_id = devices.EXT_LIGHTS, value_down =  1.0,    value_up =  0.0, name = _('LDG/TAXI LIGHT Switch 2-Pos ON/OFF'), category = {_('Left Vertical Panel')}},

PS: the original code uses TAB's to produce a lot of padding between the fields. I prefer to have the lines shorter so they don't wrap. But if you like the alignment you can of course add the padding. It has no influence on function.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

That original line of code produces an ON/OFF toggle behaviour.

I created a new line of code for a true 2-Pos. switch:

{down = fuel_commands.DumpSw, up = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down =  1.0, value_up = -1.0, name = _('Fuel Dump Switch 2-Pos ON/OFF'), category = {_('Left Console'), _('Fuel Control Panel')}},

I use the same approach to create 2-position switches for the launch bar, the hook bypass and Landing/Taxi Lights:

{down = cptlights_commands.HookBypass, up = cptlights_commands.HookBypass,    cockpit_device_id = devices.CPT_LIGTHS,    value_down =  -1.0,    value_up = 1.0,    name = _('Hook Bypass 2-Pos Switch FIELD/CARRIER'), category = {_('Left Vertical Panel')}},
{down = gear_commands.LaunchBarSw, up = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down =  -1.0, value_up = 1.0,    name = _('Launch Bar Control 2-Pos Switch RETRACT/EXTEND'), category = {_('Left Vertical Panel')}},
{down = extlights_commands.LdgTaxi,    up = extlights_commands.LdgTaxi, cockpit_device_id = devices.EXT_LIGHTS, value_down =  1.0,    value_up =  0.0, name = _('LDG/TAXI LIGHT Switch 2-Pos ON/OFF'), category = {_('Left Vertical Panel')}},

PS: the original code uses TAB's to produce a lot of padding between the fields. I prefer to have the lines shorter so they don't wrap. But if you like the alignment you can of course add the padding. It has no influence on function.

 

Thanks that got them working

Link to comment
Share on other sites

Thanks for this! I just got a Warthog joy/throttle and figured I was going to have to do some serious learning to get scripts to make the switches useful. This is a simple way to do what I wanted! Thanks again for sharing.

Link to comment
Share on other sites

Thanks for this! I just got a Warthog joy/throttle and figured I was going to have to do some serious learning to get scripts to make the switches useful. This is a simple way to do what I wanted! Thanks again for sharing.

If you want to learn about the subject maybe you should download the document from this post: https://forums.eagle.ru/showpost.php?p=2862001&postcount=214

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 6 months later...

Thank You LeCuvier for your advice! :thumbup:

 

This DUMP switch didn't work properly at Winwing F/A-18 H.O.T.A.S

 

But with this code you can get it works fine:

 

{down = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down =  1.0, name = _('Fuel Dump Switch - ON'), category = {_('Left Console'), _('Fuel Control Panel')}},
{down = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down =  -1.0, name = _('Fuel Dump Switch - OFF'), category = {_('Left Console'), _('Fuel Control Panel')}},

 

According to LeCuvier's post:

(https://forums.eagle.ru/showpost.php?p=4171525&postcount=11)

 

"You need to insert it into the file "default.lua" under "...\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick". I recommend you insert it below line 7 which reads "join(res.keyCommands,{". Use Notepad++ to edit the file. If you don't use OvGME, make a backup copy of the modified file because updates overwrite modified files."

Hardware:

Asus ROG Strix X-570-F | AMD Ryzen 7 5800X3D | Asus GeForce RTX 4090 TUF Gaming | Kingston Fury Renegade DDR4-3600 CL16  64 GB | Corsair HX850i | Samsung SSD 980 PRO 500 GB M.2 | Kingston A2000 1TB M.2 | BenQ LCD BL3201PT | HP Reverb G2  | Loogitech G700s | Loogitech MX Ergo | Winwing F/A-18 H.O.T.A.S | TekCreations F18 Hornet Right Replica Panel | Thrustmaster Hotas Cougar FCC | Thrustmaster Pendular Rudder | SimShaker JetPad |

Software:

Windows 11m Home x64 ver.22H2| SteamVR | VoiceAttack | FPSvr | SimShaker for Aviators Beta ver. 2.6.1.0 |

Link to comment
Share on other sites

Some people might be confused why the original code didn't work for juimo. The code I posted in post #3 is for use with a single 2-position switch with stable ON and OFF positions. Juimo's code is for use with 2 pushbuttons, one for ON and one for OFF.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

Thanks LeCuvier for the clarification!

Your code in post #3 works vice versa at at Winwing F/A-18 H.O.T.A.S Fuel Dump switch.

Now I realized change value_down = -1.0, value_up = 1.0, and use combo command. Thats way it works fine :yes:

Hardware:

Asus ROG Strix X-570-F | AMD Ryzen 7 5800X3D | Asus GeForce RTX 4090 TUF Gaming | Kingston Fury Renegade DDR4-3600 CL16  64 GB | Corsair HX850i | Samsung SSD 980 PRO 500 GB M.2 | Kingston A2000 1TB M.2 | BenQ LCD BL3201PT | HP Reverb G2  | Loogitech G700s | Loogitech MX Ergo | Winwing F/A-18 H.O.T.A.S | TekCreations F18 Hornet Right Replica Panel | Thrustmaster Hotas Cougar FCC | Thrustmaster Pendular Rudder | SimShaker JetPad |

Software:

Windows 11m Home x64 ver.22H2| SteamVR | VoiceAttack | FPSvr | SimShaker for Aviators Beta ver. 2.6.1.0 |

Link to comment
Share on other sites

@juimo: you mean my code works in reverse for you? That's surprising indeed because I'm using this code in the F/A-18C and it certainly isn't reversed. I wonder if you are misunderstanding the meaning of "up" and "down". In the context of these LUA files, "down" means that the contact of the switch is closed, and "up" means that the contact is opened. It's nothing to do with the position of the physical switch lever. (as described in my tutorial)

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • Recently Browsing   0 members

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