lesthegrngo Posted June 20, 2023 Posted June 20, 2023 (edited) Hi all, curiously my Oxy panel can't select the 'test' position I have the following code in the sketch const byte oxyEmergencyPins[3] = {17, 16, 15}; DcsBios::SwitchMultiPos oxyEmergency("OXY_EMERGENCY", oxyEmergencyPins, 3); The Emergency and Normal positions are fine, but the test position is ignored Is that consistent with your experience? I'm sure it used to work..... Les Edited June 20, 2023 by lesthegrngo
No1sonuk Posted June 20, 2023 Posted June 20, 2023 No problems for me. I used: const byte oxyEmergencyPins[3] = {2, 3, 4}; DcsBios::SwitchMultiPos oxyEmergency("OXY_EMERGENCY", oxyEmergencyPins, 3); I only have a SPDT ON-ON switch that I connected first with NO to 2 and NC to 3, then common to gnd. That switched between centre and aft. Then I swapped 2 and 4 in the pin list, and the same switch changed between centre and fwd. In this way, I confirmed the control itself works in all three positions. If yours doesn't, it must be a fault with your code or wiring. This also works with a 3-position SPDT ON-OFF-ON switch: DcsBios::Switch3Pos oxyEmergency("OXY_EMERGENCY", 2, 3);
lesthegrngo Posted June 21, 2023 Author Posted June 21, 2023 I've got something weird happening then, because even if I use a new nano with a flylead from the GND pin and set your code above using pins 8, 9 and 10, Emergency and Normal positions are fine, but I can't get it to select the Test position If it is a coding issue, it's got to be in the game code somewhere... Les
No1sonuk Posted June 21, 2023 Posted June 21, 2023 Try that with the 3-position (2 pins) code. Grounding a pin should move the switch to each side, with it in the middle when no pin is connected. BTW, I tested on the A10CII. Not sure if I can select the older A10C.
lesthegrngo Posted June 21, 2023 Author Posted June 21, 2023 Yeah, tried it with the same result I wonder whether the .lua file has been changed somehow, I'll see if there is something in there Les
No1sonuk Posted June 21, 2023 Posted June 21, 2023 Mine's a fairly new install, and I don't tweak stock luas.
lesthegrngo Posted June 21, 2023 Author Posted June 21, 2023 In the DCS World\Mods\A-10C\Cockpit\Scripts folder there is a file called 'clickabledata.lua it has the following (on my file line 701 on) --Oxygen System Control Panel --elements["PTR-OXYGENCP-EMERGENCY"] = default_3_position_tumb(_("Oxygen Flow Emergency/Normal/Test Mask"), devices.OXYGEN_SYSTEM, device_commands.Button_3, 601) -- TEST MASK position is spring-loaded elements["PTR-OXYGENCP-EMERGENCY"] = {class = {class_type.TUMB, class_type.BTN}, hint = _("Oxygen Flow Emergency/Normal/Test Mask"), device = devices.OXYGEN_SYSTEM, action = {device_commands.Button_3, device_commands.Button_3}, stop_action = {0, device_commands.Button_3}, arg = {601, 601}, stop_value = {nil, 0.0}, arg_value = {1, -1}, arg_lim = {{0, 1},{-1, 0}}, use_release_message = {false, true}, updatable = true, use_OBB = true} It says that the test mask position is spring loaded, could it be that in my iteration it is set so that it can't be selected by an outside device? In game I can click to select it, but it will spring back immediately it is released Les
lesthegrngo Posted June 21, 2023 Author Posted June 21, 2023 Relax, no hurry! I didn't expect anyone to respond so quickly anyway! Les
No1sonuk Posted June 21, 2023 Posted June 21, 2023 This is in mine, from Line 1042: -- TEST MASK position is spring-loaded elements["PTR-OXYGENCP-EMERGENCY"] = default_button_tumb(_("Oxygen Flow Emergency/Normal/Test Mask"), devices.OXYGEN_SYSTEM, device_commands.Button_4, device_commands.Button_3, 601) elements["PTR-OXYGENCP-EMERGENCY"].sound = {{SOUND_SW1_OFF, SOUND_SW1}, {SOUND_SW1}} elements["PTR-OXYGENCP-OXYGEN-DILUTER"] = default_2_position_tumb(_("Oxygen Normal/100%"), devices.OXYGEN_SYSTEM, device_commands.Button_2, 602) elements["PTR-OXYGENCP-SUPPLY"] = default_2_position_tumb(_("Oxygen Supply On/Off"), devices.OXYGEN_SYSTEM, device_commands.Button_1, 603) What COULD be the difference is I'm running the Open Beta version. And both the A-10C and A-10CII are spring-loaded in the test position. Both respond properly to this: DcsBios::Switch3Pos oxyEmergency("OXY_EMERGENCY", 2, 3);
lesthegrngo Posted June 22, 2023 Author Posted June 22, 2023 Thanks for this - I was so sure that this was going to resolve it, as it was clearly different between the two bits of code. Unfortunately not, neither with the DcsBios::Switch3Pos oxyEmergency("OXY_EMERGENCY", 2, 3); command Curiously I can bind the test position to a joystick button so it is not disabled, merely not set up to work with the DCS Bios output I'll keep looking, but I also found that the inverter test position DCS Bios script doesn't work either where I think it used to. I'm starting to wonder if was using a Bodnar board when I first made these panels, which is why I think they used to work Les
lesthegrngo Posted June 23, 2023 Author Posted June 23, 2023 I resolved this, please check out this post Cheers Les
Recommended Posts