Jump to content

Sim Bandit AHCP, problems with two position switches


EasyEB

Recommended Posts

So I have set the AHCP up and it's for the most part functioning, except for the two way switches. They don't know which way is on, so it toggles from whatever mode I start in.

 

{down = iCommandPlaneAHCPMasterArm, up = iCommandPlaneAHCPMasterSafe, name = _('ALT Master switch ARM'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPMasterSafe, name = _('Master switch SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPMasterTrain, up = iCommandPlaneAHCPMasterSafe, name = _('ALT Master switch TRAIN'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPGUNPACArm, up = iCommandPlaneAHCPGUNSafe, name = _('ALT GUN/PAC switch ARM'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPGUNSafe, name = _('GUN/PAC switch SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPGUNArm, up = iCommandPlaneAHCPGUNSafe, name = _('ALT GUN/PAC switch GUNARM'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPLaserArm, up = iCommandPlaneAHCPLaserSafe, name = _('ALT LASER switch ARM'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPLaserSafe, name = _('LASER switch SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPLaserTrain, up = iCommandPlaneAHCPLaserSafe, name = _('ALT LASER switch TRAIN'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPTGPOnOff, up = iCommandPlaneAHCPTGPOnOff, value_down = 0.0, value_up = 1.0, name = _('ALT TGP switch ON/OFF'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPAltSCEBaro, up = iCommandPlaneAHCPAltSCERadar, value_down = 0.0, value_up = 1.0, name = _('ALT ALT SCE switch BARO'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPAltSCEDelta, name = _('ALT SCE switch DELTA'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPAltSCERadar, name = _('ALT SCE switch RADAR'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPHUDModeDayNight, up = iCommandPlaneAHCPHUDModeDayNight, value_down = 0.0, value_up = 1.0, name = _('ALT HUD Mode switch Day/Night'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPHUDModeNormSTBY, up = iCommandPlaneAHCPHUDModeNormSTBY, value_down = 0.0, value_up = 1.0, name = _('ALT HUD Mode switch NORM/STBY'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPCICUOnOff, up = iCommandPlaneAHCPCICUOnOff, value_down = 0.0, value_up = 1.0, name = _('ALT CICU switch ON/OFF'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPJTRSOnOff, up = iCommandPlaneAHCPJTRSOnOff, value_down = 0.0, value_up = 1.0, name = _('ALT JTRS switch ON/OFF'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPIFFCCOn, up = iCommandPlaneAHCPIFFCCTest, name = _('ALT IFFCC switch ON'), category = _('Special Simbandit')},
{down = iCommandPlaneAHCPIFFCCTest, name = _('IFFCC switch TEST'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPIFFCCOff, up = iCommandPlaneAHCPIFFCCTest, name = _('ALT IFFCC switch OFF'), category = _('Special Simbandit')},

 

It seems like the parts value_up and value_down are not functioning properly.

 

Example: I start in air, and in game cockpit TGP is ON, but on my controller TGP is OFF, so if I switch it to ON on the controller it goes to OFF in the in game cockpit.

 

Anyone know what I'm doing wrong here?

Link to comment
Share on other sites

Those commands are not compatible with value_up and value_down.

 

I go over this exact problem and how to create commands that are compatible in this video.

 

 

Intel 9600K@4.9GHz, Asus Z390, 32GB DDR4, EVGA RTX 3070, Custom Water Cooling, 970 EVO 1TB NVMe

34" UltraWide 3440x1440 Curved Monitor, 21" Touch Screen MFD monitor, TIR5

My Pit Build, VKB Gunfighter Pro w/WH Grip, TMWH Throttle, MFG Crosswinds W/Combat Pedals, Cougar MFDs, Custom A-10C panels, Custom Helo Collective, SimShaker with Transducer

Link to comment
Share on other sites

Here are some commands I have created for the Hog II:

{down = iCommandPlaneAHCPGUNPACArm, up = iCommandPlaneAHCPGUNSafe, name = _('GUN/PAC switch 3-Pos ARM/SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPGUNArm, up = iCommandPlaneAHCPGUNSafe, name = _('GUN/PAC switch 3-Pos GUNARM/SAFE'), category = _('Armament HUD Control Panel')},

{down = iCommandPlaneAHCPLaserArm, up = iCommandPlaneAHCPLaserSafe, name = _('LASER switch 2-Pos ARM/SAFE'), category = _('Armament HUD Control Panel')},

{down = 3004, up = 3004, cockpit_device_id = 7, value_down = 1.0, value_up = -1.0, name = _('TGP switch 2-Pos ON/OFF'), category = _('Armament HUD Control Panel')},
{down = 3004, cockpit_device_id = 7, value_down = 1.0, name = _('TGP Power switch ON'), category = _('Armament HUD Control Panel')},
{down = 3004, cockpit_device_id = 7, value_down = -1.0, name = _('TGP Power switch OFF'), category = _('Armament HUD Control Panel')},

{down = iCommandPlaneAHCPIFFCCOn, up = iCommandPlaneAHCPIFFCCTest, name = _('IFFCC switch 2-Pos ON/TEST'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPMasterArm, up = iCommandPlaneAHCPMasterSafe,name = _('Master switch 3-Pos ARM/SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPMasterTrain, up = iCommandPlaneAHCPMasterSafe, name = _('Master switch 3-Pos TRAIN/SAFE'), category = _('Armament HUD Control Panel')},
{down = 3006, up = 3006, cockpit_device_id = 7 , value_down = 1.0, value_up = 0.0, name = _('AHCP HUD Mode 2-Pos DAY/NIGHT'), category = _('Armament HUD Control Panel')},

{down = 3007, up = 3007, cockpit_device_id = 49 , value_down = 1.0, value_up = 0.0, name = _('Emergency Flood Light 2-Pos DAY/NIGHT'), category = _('Electrical power control panel')},
{down = 3007, cockpit_device_id = 49 , value_down = 1.0, name = _('Emergency Flood Light DAY'), category = _('Electrical power control panel')},
{down = 3007, cockpit_device_id = 49 , value_down = 0.0, name = _('Emergency Flood Light NIGHT'), category = _('Electrical power control panel')},
{down = 3001, up = 3001, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('APU Gen Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},
{down = 3004, up = 3004, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('AC Gen Left Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},
{down = 3005, up = 3005, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('AC Gen Right Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},
{down = 3006, up = 3006, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('Battery Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},

-- Landing/Taxi Lights 3-Position
{down = iCommandPlaneLGPLandLight, up = iCommandPlaneLGPLightsOff, name = _('Landing Lights ON/OFF'), category = _('Landing gear panel')},
{down = iCommandPlaneLGPTaxiLight, up = iCommandPlaneLGPLightsOff, name = _('Taxi Lights ON/OFF'), category = _('Landing gear panel')},

{down = 3012, up = 3012, cockpit_device_id = 49, value_down = 1.0, value_up = -1.0, name = _('Nose Light 2-Pos switch ON/OFF'), category = _('Lighting Panel')},
{down = 3004, up = 3004, cockpit_device_id = 49, value_down = 1.0, value_up = -1.0, name = _('Accel & Compass Light 2-Pos Bright/DIM'), category = _('Lighting Panel')},
{down = 3013, up = 3013, cockpit_device_id = 49, value_down = 1.0, value_up = -1.0, name = _('Signal Lights 2-Pos BRIGHT/DIM'), category = _('Lighting Panel')},

{down = 3029, pressed = 3029,up = 3028, up = 3028, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, value_up = 1.0, value_up = 0.0, name = _('Anti-Skid 2-Pos ON/OFF'), category = _('Landing gear panel')}, -- heureka, this works!
{down = 3029, pressed = 3029, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button ON'), category = _('Landing gear panel')},
{down = 3028, pressed = 3028, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button OFF'), category = _('Landing gear panel')},

{down = 3001, up = 3001, cockpit_device_id = 75, value_down = 1.0, value_up = 0.0, name = _('HMCS Power 2-Pos ON/OFF'), category = _('HMCS Power')},
{down = 3001, up = 3001, cockpit_device_id = 75, value_down = -1.0, value_up = 0.0, name = _('HMCS Power 2-Pos BAT/OFF'), category = _('HMCS Power')},
{down = 3001, cockpit_device_id = 75, value_down = 1.0, name = _('HMCS Power ON'), category = _('HMCS Power')},
{down = 3001, cockpit_device_id = 75, value_down = 0.0, name = _('HMCS Power OFF'), category = _('HMCS Power')},
{down = 3001, cockpit_device_id = 75, value_down = -1.0, name = _('HMCS Power BAT'), category = _('HMCS Power')},

Maybe this helps. Also I have posted a tutorial in the subforum "Input and Output", thread "How to set up toggle switches", post #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

Those commands are not compatible with value_up and value_down.

 

I go over this exact problem and how to create commands that are compatible in this video.

 

 

Thanks! Not working for me though, I get no control input at all (no trackIR, no keyboard, nothing). Here's what I'm trying to run, what am I missing?

 

{down = device_commands.Button_4, up = device_commands.Button_4, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 TGP switch ON/OFF'), category = _('Easy Simbandit')},
{down = device_commands.Button_6, up = device_commands.Button_6, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 HUD Mode switch Day/Night'), category = _('Easy Simbandit')},
{down = device_commands.Button_7, up = device_commands.Button_7, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 HUD Mode switch NORM/STBY'), category = _('Easy Simbandit')},
{down = device_commands.Button_8, up = device_commands.Button_8, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 CICU switch ON/OFF'), category = _('Easy Simbandit')},
{down = device_commands.Button_9, up = device_commands.Button_9, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 JTRS switch ON/OFF'), category = _('Easy Simbandit')},

 

​​​​​

Link to comment
Share on other sites

Here are some commands I have created for the Hog II:
{down = iCommandPlaneAHCPGUNPACArm, up = iCommandPlaneAHCPGUNSafe, name = _('GUN/PAC switch 3-Pos ARM/SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPGUNArm, up = iCommandPlaneAHCPGUNSafe, name = _('GUN/PAC switch 3-Pos GUNARM/SAFE'), category = _('Armament HUD Control Panel')},

{down = iCommandPlaneAHCPLaserArm, up = iCommandPlaneAHCPLaserSafe, name = _('LASER switch 2-Pos ARM/SAFE'), category = _('Armament HUD Control Panel')},

{down = 3004, up = 3004, cockpit_device_id = 7, value_down = 1.0, value_up = -1.0, name = _('TGP switch 2-Pos ON/OFF'), category = _('Armament HUD Control Panel')},
{down = 3004, cockpit_device_id = 7, value_down = 1.0, name = _('TGP Power switch ON'), category = _('Armament HUD Control Panel')},
{down = 3004, cockpit_device_id = 7, value_down = -1.0, name = _('TGP Power switch OFF'), category = _('Armament HUD Control Panel')},

{down = iCommandPlaneAHCPIFFCCOn, up = iCommandPlaneAHCPIFFCCTest, name = _('IFFCC switch 2-Pos ON/TEST'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPMasterArm, up = iCommandPlaneAHCPMasterSafe,name = _('Master switch 3-Pos ARM/SAFE'), category = _('Armament HUD Control Panel')},
{down = iCommandPlaneAHCPMasterTrain, up = iCommandPlaneAHCPMasterSafe, name = _('Master switch 3-Pos TRAIN/SAFE'), category = _('Armament HUD Control Panel')},
{down = 3006, up = 3006, cockpit_device_id = 7 , value_down = 1.0, value_up = 0.0, name = _('AHCP HUD Mode 2-Pos DAY/NIGHT'), category = _('Armament HUD Control Panel')},

{down = 3007, up = 3007, cockpit_device_id = 49 , value_down = 1.0, value_up = 0.0, name = _('Emergency Flood Light 2-Pos DAY/NIGHT'), category = _('Electrical power control panel')},
{down = 3007, cockpit_device_id = 49 , value_down = 1.0, name = _('Emergency Flood Light DAY'), category = _('Electrical power control panel')},
{down = 3007, cockpit_device_id = 49 , value_down = 0.0, name = _('Emergency Flood Light NIGHT'), category = _('Electrical power control panel')},
{down = 3001, up = 3001, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('APU Gen Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},
{down = 3004, up = 3004, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('AC Gen Left Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},
{down = 3005, up = 3005, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('AC Gen Right Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},
{down = 3006, up = 3006, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('Battery Power 2-Pos ON/OFF'), category = _('Electrical power control panel')},

-- Landing/Taxi Lights 3-Position
{down = iCommandPlaneLGPLandLight, up = iCommandPlaneLGPLightsOff, name = _('Landing Lights ON/OFF'), category = _('Landing gear panel')},
{down = iCommandPlaneLGPTaxiLight, up = iCommandPlaneLGPLightsOff, name = _('Taxi Lights ON/OFF'), category = _('Landing gear panel')},

{down = 3012, up = 3012, cockpit_device_id = 49, value_down = 1.0, value_up = -1.0, name = _('Nose Light 2-Pos switch ON/OFF'), category = _('Lighting Panel')},
{down = 3004, up = 3004, cockpit_device_id = 49, value_down = 1.0, value_up = -1.0, name = _('Accel & Compass Light 2-Pos Bright/DIM'), category = _('Lighting Panel')},
{down = 3013, up = 3013, cockpit_device_id = 49, value_down = 1.0, value_up = -1.0, name = _('Signal Lights 2-Pos BRIGHT/DIM'), category = _('Lighting Panel')},

{down = 3029, pressed = 3029,up = 3028, up = 3028, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, value_up = 1.0, value_up = 0.0, name = _('Anti-Skid 2-Pos ON/OFF'), category = _('Landing gear panel')}, -- heureka, this works!
{down = 3029, pressed = 3029, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button ON'), category = _('Landing gear panel')},
{down = 3028, pressed = 3028, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button OFF'), category = _('Landing gear panel')},

{down = 3001, up = 3001, cockpit_device_id = 75, value_down = 1.0, value_up = 0.0, name = _('HMCS Power 2-Pos ON/OFF'), category = _('HMCS Power')},
{down = 3001, up = 3001, cockpit_device_id = 75, value_down = -1.0, value_up = 0.0, name = _('HMCS Power 2-Pos BAT/OFF'), category = _('HMCS Power')},
{down = 3001, cockpit_device_id = 75, value_down = 1.0, name = _('HMCS Power ON'), category = _('HMCS Power')},
{down = 3001, cockpit_device_id = 75, value_down = 0.0, name = _('HMCS Power OFF'), category = _('HMCS Power')},
{down = 3001, cockpit_device_id = 75, value_down = -1.0, name = _('HMCS Power BAT'), category = _('HMCS Power')},

Maybe this helps. Also I have posted a tutorial in the subforum "Input and Output", thread "How to set up toggle switches", post #214.

 

Tried your TGP bit there

{down = 3004, up = 3004, cockpit_device_id = 7, value_down = 1.0, value_up = -1.0, name = _('TGP switch 2-Pos ON/OFF'), category = _('Armament HUD Control Panel')},

and it works great!

 

What is 3004, and how did you find cockpit_device_id? Now I want the same thing for the Hud Day/Night, hud Norm/Stby, CICU on/off and JTRS on/off but I can't find their cockpit_device_id


Edited by EasyEB
Link to comment
Share on other sites

 

Thanks! Not working for me though, I get no control input at all (no trackIR, no keyboard, nothing). Here's what I'm trying to run, what am I missing?

 

{down = device_commands.Button_4, up = device_commands.Button_4, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 TGP switch ON/OFF'), category = _('Easy Simbandit')},
{down = device_commands.Button_6, up = device_commands.Button_6, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 HUD Mode switch Day/Night'), category = _('Easy Simbandit')},
{down = device_commands.Button_7, up = device_commands.Button_7, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 HUD Mode switch NORM/STBY'), category = _('Easy Simbandit')},
{down = device_commands.Button_8, up = device_commands.Button_8, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 CICU switch ON/OFF'), category = _('Easy Simbandit')},
{down = device_commands.Button_9, up = device_commands.Button_9, value_down = 0.0, value_up = 1.0, cockpit_device_id = devices.AHCP, name = _('ALT2 JTRS switch ON/OFF'), category = _('Easy Simbandit')},

 

​​​​​

Been a while since I made the video so maybe it isn't clear, but instead of "device_commands.Button_4", you need "3004", instead of "device_commands.Button_6" you need 3006, ect. You also don't need multiple bindings for a 2 way switch, it should be a single binding that tells it to turn off when your toggle switch is off.

 

In the same folder you find clickabledata, you will find a list of cockpit device IDs.

Intel 9600K@4.9GHz, Asus Z390, 32GB DDR4, EVGA RTX 3070, Custom Water Cooling, 970 EVO 1TB NVMe

34" UltraWide 3440x1440 Curved Monitor, 21" Touch Screen MFD monitor, TIR5

My Pit Build, VKB Gunfighter Pro w/WH Grip, TMWH Throttle, MFG Crosswinds W/Combat Pedals, Cougar MFDs, Custom A-10C panels, Custom Helo Collective, SimShaker with Transducer

Link to comment
Share on other sites

 

Tried your TGP bit there

{down = 3004, up = 3004, cockpit_device_id = 7, value_down = 1.0, value_up = -1.0, name = _('TGP switch 2-Pos ON/OFF'), category = _('Armament HUD Control Panel')},

and it works great!

 

What is 3004, and how did you find cockpit_device_id? Now I want the same thing for the Hud Day/Night, hud Norm/Stby, CICU on/off and JTRS on/off but I can't find their cockpit_device_id

 

The command code is equal to the button number (in "clickabledata.lua") + 3000 (as defined in "command_defs.lua"). The numeric cockpit_device_id is defined in "devices.lua". Both files are under "...\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\A-10C_2\Cockpit\Scripts". Give it a try for Hud Day/Night!

Note: most modules allow you to use the mnemonic device ID (like "devices.AHCP"). But the Hog (both) and the Black Shark require the numeric one.

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...