Jump to content

Recommended Posts

Posted (edited)

I'm currently in the process of building an A-10 cockpit. The basic I/O layout is: all the switches, buttons, rotaries, etc are run by Leo Bodnar cards; all the indicator lights, 7-segments, servos, and lcd's (CMSC, CMSP, ARC-210) are run by arduino and DCS-BIOS; and a 27" monitor running the MIP, 7" usb screen running the Fuel/Hyd panel (for now), and a 5" screen running the CDU, all with HELIOS. So far, everything has been running fairly smoothly. However, I have recently run into an interesting snag...

After wiring up and programming my CMSP panel, I went to test it and found that the 4 x 3Pos switches controlling the MWS, JMR, RWR, and DISP are all acting strange. Starting in the down (OFF) position, I flip the switch to the middle (ON) position, but nothing happens in the sim. I then flip the switch(es) to the up (MENU) position, and the switch(es) in game all flip to that position. When I try flipping them back to the middle (ON) position, nothing happens again, and when flipping to the down (OFF) position, the switch(es) flip down in game.
[EDIT]
I forgot to mention in the original post that I have tried programming the switches in HELIOS to act like: Up=ON, Middle=N/A, Down=OFF, but that did not work either. All switches just stayed in the OFF position in game.

All 4 switches show up and function correctly in both windows and HELIOS, they are all programmed correctly in HELIOS, and none of the other 3Pos switches in the pit have this problem.

When I get home from work tomorrow, I will swap out the switches for new ones to see if (somehow) that fixes the issue, but since all the switches do function as intended I'm not gonna hold my breath.

I currently have no other ideas as to how to fix this, so any help would be fantastic.

Edited by Shadowhunter241

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted

Have you checked the control binds aren't clashing?  I know that causes odd behaviour with analogue axes, but maybe that's also a problem for some standard buttons/switches.

Posted (edited)
17 hours ago, No1sonuk said:

Have you checked the control binds aren't clashing?  I know that causes odd behaviour with analogue axes, but maybe that's also a problem for some standard buttons/switches.

I have. HELIOS doesn't automatically assign anything, all the binds are manually assigned, so no worries there. I'll double check DCS to make sure everything is unbound in game Everything is unbound in game, but either way, it shouldn't clash like that. It would just do 2 different things at the same time when I flip the switch.

 

9 hours ago, Scott-S6 said:

Are your toggle switches on-on-on or on-off-on and which keybinds exactly are you binding them to?

The toggles in question are ON-OFF-(ON), and the binds look like this:

Capture.PNG


I just updated HELIOS, so we'll see if that fixes it it did not fix the issue.

Edited by Shadowhunter241

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted
2 minutes ago, No1sonuk said:

You wrote "programming my CMSP panel".  What programming?  I thought you were using a Bodnar board for the switches.

I am. It's easier to write "programming" than "spending however long digging through HELIOS to find the correct interface card, correct input, and correct function, then assigning each individual input to it's desired function".

Also, if it makes you feel better, there is an Arduino connected to the panel as well, that is programmed (with actual lines of code) to run the display.

In both instances and context, using "programming" to describe what I'm doing is still a correct use of the word, according to the definition.

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted

OK. No need to get defensive...
My initial reaction was "F**K IT sort it yourself."
However, I'll cut you some slack this time as you might have misread my comment.
I'm trying to determine if you cocked up some arduino code that's leading to your problem.
As you appear to have gone straight to Helios, I will suggest trying to bind the switches in the normal controls screen in DCS.
Start with the switches in the middle, "ON" position. Bind the MENU position by switching up and releasing. Then bind the ON/OFF by switching down to "OFF".

This may be redundant if you've checked the button press output in the Windows USB Game Controller settings app:
How have you wired the Bodnar board?  Are you using the breakout with diodes?  If not, did you put your own diodes in?

Posted (edited)

Ah. Yeah, let's chalk that one up to a miscommunication.
Couldn't tell if it was a legitimate question, or an attempt at being a smarta**. This being the internet, I defaulted to the latter.

As far as coding goes, the only things in the pit that are coded through the arduinos are the various lcd screens, servos, 7-segments, and indicator lights. None of the switches/buttons/rotaries/etc. are coded.
I'll try binding it straight through DCS in a moment. Kinda embarrassed that I didn't think of that tbh. I was so focused on the HELIOS aspect that I forgot going through the game itself was even an option.

The bodnars are all either BBI-64's or BU0836A's. The inputs are all wired to the boards via dupont connectors plugged into the pins on the boards. As far as I know, diodes are not needed for these particular boards. However, if they are required, I haven't had any issues without them. This is the only panel in the entire pit that's being ornery.

Edited by Shadowhunter241

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted

If you're using the matrix on the BU0836A's, you need the diodes to allow more than one switch to be made at a time. If you don't use the diodes, the matrix polling can "go the wrong way" and could be a problem. To determine if this is the issue, put all the switches in their centre position (no connections) and try one each way at a time. If they work individually, you need the diodes.

 

I have one of the matrix breakout boards. They give individual connections for each switch, and have the diodes built in.

Posted

None of the BU0836A's have a matrix. They're only used for the analog inputs.

I bound the switches on the CMSP panel directly through DCS yesterday, and they appear to be working, kinda. The switches still don't go directly from the OFF to ON positions, but instead have to be first set from OFF to MENU then ON. Not sure if that's "working as intended" for this panel, but I'll take it. I can at least turn my countermeasures on now.

I appreciate the help.

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted

Does it work OK after you've done that once?
I've found some switches need to be "synced" before they'll work.
e.g. When I do a cold start, I begin with the throttles at idle, then move them to cutoff before the startup sequence so that DCS registers they've switched.
In your case, you might need to start with the switches at "ON", then move them to "OFF" before powerup in order for them to work.

OTOH, in options>misc. there's an option to sync the cockpit controls to HOTAS on startup.  Maybe that's what you need.

Posted

While the switches do need to be synced, they still don't want to go from OFF to ON even after several cycles. It's only ever OFF->MENU->ON. I'm not too terribly worried about it though,  as the switches I have are momentary in the MENU position so they automatically flip down to ON once I let go.

I have sync option turned off for now, as the pit isn't 100% completed yet. Also, I mostly fly singleplayer right now, and some missions start with the aircraft already running and in the air, which would be not so great if I had the pit configured for a cold start before the sync. Maybe when the pit is finished and I start flying online, I'll turn the sync on.

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted

I'm leaning more towards it being a weird game mechanic, unless nobody else is having this issue.

The wiring is just 4 wires running from each switch to the pins on the bodnar board. That's it.
They work for every other switch bind I've tried for other panels. It's just the CMSP that's derpy.

 

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

Posted (edited)

It's nothing to do with your board or switches - behaviour is exactly the same when bound to the keyboard.

Menu returns to On when the switch is released. This works just fine with the toggle switch.

On/off toggles on repeated presses. This is not what we want for a toggle switch. A new keybind will need to be created.

ETA - I think the reason you aren't seeing discussion about this from other pit builders is that they're using DCS-BIOS which makes toggle switch behaviour easy to implement.

Edited by Scott-S6
Posted (edited)

Okay, here's a rough and ready solution for you. If the on/off positions are out of sync you'll need to move the toggle to the menu position to resync them. There is a better solution referencing switch states directly but that'll need a little more digging.

For each of the four CMSP switches you need an additional keybind in the input/joystick/default.lua

{down = iCommandPlaneCMSP_JMR_MENU,up = iCommandPlaneCMSP_JMR_ON,         name = _('CMSP JMR MENU'), category = _('CMSP Panel')},
{down = iCommandPlaneCMSP_JMR_ON,                                                                             name = _('CMSP JMR ON/OFF'), category = _('CMSP Panel')},
{down = iCommandPlaneCMSP_JMR_ON,up = iCommandPlaneCMSP_JMR_ON,              name = _('CMSP JMR switch'), category = _('CMSP Panel')},

That last line needs to be added. That toggles the state of the switch between On/Off when the switch is pressed and when it's released. Bind up position to menu and down position to switch (the new keybind).

You now have working toggles. I'll update if I get the better but messier solution which references switch state directly working.

 

 

Edited by Scott-S6
Posted

I just tried my BU0836 and I see the problem.
I confirm Scott's findings: The switch in the controls is set to TOGGLE when activated. 
It appears:
"ON/OFF" means press on, press off.
"ON<>OFF" means the control follows the switch state.

Posted (edited)

Interesting. I'll sticky note this and see about implementing it the next time I have the pit set up. It's currently unplugged and pulled away from the desk so I can use the computer for other things. Hopefully fairly soon, I'll have a video switch and some tv's set up so I don't have to dismantle the thing to get to the pc

Edited by Shadowhunter241

A-10C | FC3 | P-51D | CA | BS2 | UH-1H | F/A-18C | SA342 | F-16C | A-10C II | F-14 | F-5E | AH-64D | BS3 | F-15E

Too Many Modules, Not Enough Time

AMD 7950X | ROG X670E HERO | RTX 3080 | 64GB DDR5 6000 | 1 TB 980 M.2 NVMe | 16TB (4+4+8) WD BLACK HDD

  • Recently Browsing   0 members

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