Jump to content

How to break down toggle switches?


v2tec

Recommended Posts

Hi,

 

I just started learning the KA-50, coming from the A10C and I would like to use my TM Warthog.

 

I wonder if it is possible to break down all those toggle switches of the KA-50 into single key-commands for activate and deactivate, so I could use specific buttons on the HOTAS to engage or disengage functions.

 

Currently, it depends on the mission design (already in the air or cold start) or the HOTAS status itself if the button is in the correct state.

 

Any ideas? :book:

 

Example from the default.lua:

{combos = {{key = 'R'}}, down = iCommandPlane_RouteMode, name = _('Engage/Disengage Route Mode'), category = _('Ins Collective Stick')},

 

Would be great to have these commands

iCommandPlane_RouteModeEngage

iCommandPlane_RouteModeDisengage


Edited by v2tec

________________________ ________ ______ ___ __ _

Win10 64 Pro, i7-6800K 3.4Ghz, 32 GB (DDR4), Asus Aorus 1080 TI WF, TrackIR 5 / RIFT, Thrustmaster Warthog, Fanatec Pedals, 55" oled 4k TV, Modules:A10C, KA-50, Huey, AV-8B, FA-18, F-16, NTTR, Persian Gulf

_ __ ___ ____ _____ ______ _______ ____________



Link to comment
Share on other sites

Hi,

 

Have a look at these posts, very useful if your are happy to edit Lua's yourself.

 

https://forums.eagle.ru/showthread.php?t=89226&highlight=toggle+switches

 

https://forums.eagle.ru/showthread.php?t=130459&highlight=toggle+switches

 

Also have a look at JSGME so any errors you may make are easily fixed

 

https://forums.eagle.ru/showthread.php?t=98607

  • Like 1

Wise men speak because they have something to say; Fools because they have to say something.

Plato

Link to comment
Share on other sites

Why to reinvent the wheel? ;)

 

Post a list of your most wanted switches and I'll take a look what I've already converted.

Missing ones will follow.

 

Because he asked "How to" not can somebody do it for me.

 

I presumed, wrongly or rightly, that he would like to learn how to do it :thumbup:

Wise men speak because they have something to say; Fools because they have to say something.

Plato

Link to comment
Share on other sites

Because he asked "How to" not can somebody do it for me.

 

I presumed, wrongly or rightly, that he would like to learn how to do it :thumbup:

 

The neccessary links for learning the 'how to' where named, so my offer was ment as an add-on.

Not only for him: It is for all who stumble upon this thread.

Link to comment
Share on other sites

Why to reinvent the wheel? ;)

 

Post a list of your most wanted switches and I'll take a look what I've already converted.

Missing ones will follow.

 

May I ask if you can post or PM what you already have ?

 

I always wanted to change those but just don't have the time and patience to dive into Lua editing. Your pre-done templates might be just what someone could call an easy start into it.

 

For example:

 

Laser On/Off

Shkval On/off

AutoTurn2Target On/Off

MasterArm ON/Off

...

gears

drop weapons switches(armed on/off)

 

Providing those or what you have from that list would be nice :)

 

Bit

Gigabyte Aorus X570S Master - Ryzen 5900X - Gskill 64GB 3200/CL14@3600/CL14 - Asus 1080ti EK-waterblock - 4x Samsung 980Pro 1TB - 1x Samsung 870 Evo 1TB - 1x SanDisc 120GB SSD - Heatkiller IV - MoRa3-360LT@9x120mm Noctua F12 - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" QHD Gsync 144Hz - Corsair K70 RGB Pro - Win11 Pro/Linux - Phanteks Evolv-X 

Link to comment
Share on other sites

  • 2 months later...
..... a list of your most wanted switches....

 

You can never have enough custom mappings... you never know when you may need them..:)

 

Here's what I adapt for my use... in a JSGME ready drop in or as code after the link.. might save someone a bit of time..

 

https://www.dropbox.com/s/7h2f4bx0am15w8n/Gizzy%20KA50%20switches.zip?dl=0

 

--Gizzy Custom
{down = iCommandPlaneModeHelmet, up = iCommandPlaneModeHelmet,  name = _("Helmet-mounted system On/Off-custom"),  category = _("Custom"), },
{down = iCommandPlane_AutomaticTracking_Gunsight_switch, up = iCommandPlane_AutomaticTracking_Gunsight_switch, name = _("Automatic tracking/gun sight-custom"),  category = _("Custom"), },
{down = iCommandPlane_WeaponMode_Manual_Auto, up = iCommandPlane_WeaponMode_Manual_Auto, name = _("Weapon system control switch Manual/Auto-custom "),  category = _("Custom"), },
{down = iCommandPlaneGear, up = iCommandPlaneGear,  name = _("Gear lever-custom"),  category = _("Custom"), },
{down = iCommandPlane_FireRate, up = iCommandPlane_FireRate,  name = _("Cannon rate of fire setting-custom"),  category = _("Custom"), },
{down = iCommandPlane_AmmoTypeSelect, up = iCommandPlane_AmmoTypeSelect, name = _("Cannon Round Selector-custom"),  category = _("Custom"), },
{down = iCommandPlaneWheelParkingBrake, up = iCommandPlaneWheelParkingBrake,  name = _("Wheel brake parking-custom"),  category = _("Custom"), },
{down = iCommandSwitchMasterArm, up = iCommandSwitchMasterArm, name = _("Master arm on/off-custom"),  category = _("Custom"), },
{down = iCommandHelicopter_Rotor_Lock, up = iCommandHelicopter_Rotor_Lock, name = _("Rotor brake-custom"),  category = _("Custom"), },
{down = iCommandPlaneLaserRangerOnOff, up = iCommandPlaneLaserRangerOnOff, name = _("Laser standby On/Off switch-custom"),  category = _("Custom"), },
{down = iCommandPlaneWheelParkingBrake, up = iCommandPlaneWheelParkingBrake,  name = _("Wheel brake parking-custom"),  category = _("Custom"), },
{down = 3004, value_down = 0.2, up = 3004, value_up = 0.1, cockpit_device_id = 12, name = " Weapon mode switch center/up-custom", category = "Custom"},
{down = 3004, value_down = 0.0, up = 3004, value_up = 0.1, cockpit_device_id = 12, name = " Weapon mode switch down/center-custom", category = "Custom"},
{down = 3002, value_down = 0.0, cockpit_device_id = 50, name = "SPU-9 VHF-2-custom", category = "Custom"},
{down = 3002, value_down = 0.11, cockpit_device_id = 50, name = "SPU-9 VHF-1-custom", category = "Custom"},
{down = 3002, value_down = 0.22, cockpit_device_id = 50, name = "SPU-9 SW-custom", category = "Custom"},
{down = 3002, value_down = 0.33, cockpit_device_id = 50, name = "SPU-9 Ground Crew-custom", category = "Custom"},
--End Gizzy Custom

 

SIGBLOCK.png

Link to comment
Share on other sites

  • 2 years later...

What I'm trying (and failing) to do:

Assign the TM Warthog Throttle Laste 3 position switch to the BS landing gear lever.

 

Switch up = gear up

Switch center = nothing

Switch down = gear down.

 

Sorry to revive this. I know there are many hundreds of pages of "how to's" on this subject which I've spent a few hours pouring over but the simple fact is I don't understand a damn thing about coding beyond simply modifying an occasional existing value.

Any help or simple copy/pastes are appreciated. :(

i7 7700K @5.0, 1080Ti, 32GB DDR4, HMD Odyssey, TM WH, Crosswind Rudder...

Link to comment
Share on other sites

Very easy to do Sir without any hassle or editing. Just bond both up and down to the same function.

 

Double click the correct entry for the gear lever and move your switch up - click OK...

 

Double click the same entry and move your switch down - and then OK..

 

Sorted.... fully up or fully down will toggle the gear...

 

BUT the mappings for the KA50 do not have an UP and a DOWN function - its just a toggle... but itr will do as you requested... try it.. Here is a pic with DX 28 & 27 set...

 

2019-010.jpg

 

SIGBLOCK.png

Link to comment
Share on other sites

This is my solution

MapKey(&Throttle, SPDF, PULSE+DX7); //Route Engage

MapKeyR(&Throttle, SPDF, DX7); //Route Disengage

MapKey(&Throttle, SPDB, DX8); //Descent

 

I don't know what any of that means.


Edited by SonofEil

i7 7700K @5.0, 1080Ti, 32GB DDR4, HMD Odyssey, TM WH, Crosswind Rudder...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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