Toggle switches

Discussion in 'Hardware' started by Fleskebacon, Oct 20, 2016.

  1. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    While I'm at it, I'm building a new button box. I'm using the DSD controller card, some buttons, rotary encoders and toggle switches. It's going to be sweet.

    I have a question about on/off toggle switches though. I really like them. But no sims I have come across supports constant on/off switches by nature. They have to be "tricked" by the button controller, which when set up correctly generates a single button click when the toggle is switched on, and another button click when switched off. This will often confuse the game, i.e. when enabling pit limiter in R3E. It works ok, but when exiting the pit, the limiter is switched off automatically by the game, which in turn leads to the toggle switch being "out of sync" with the game - the physical switch is still on, but the pit limiter is off.

    Why can't games have native support for constant on/off switches? Like add a simple "hold button to activate" option in the controller menu for each of the on/off-type features? That would solve it all.
     
  2. le_poilu

    le_poilu Well-Known Member

    Joined:
    Jan 30, 2015
    Ratings:
    +278 / 0 / -0
    yep, this is why DSD button box use 2-way toggles that come back in neutral position and not those who stay on the position you set.

    By default all games are done for keyboard input. And I think it will not be easy to have a constant switch as you want.
    IRL theses kind of switchs make sens: there's an electrical circuit behind, it's really an electrical switch (you open or close the circuit). But as a PC input it's not that easy, You don't have an electrical "analog" connexion between each switch and the PC, it's datas through USB bus, from a button controller.
    If you want it to work you'll need the controller to be able to constantly send the "ON" value. And I don't think DSD or Leo Bodnar ones are made for this.
    And even after that you'll need the Windows input to be able to retrieve this value without messing with all other inputs, then the game should have some logic to constantly check if the value is ON or OFF. This may seems easy but it adds cpu cycle for something that really not worth it.
    Think about it: it would be as if every button input would be analog input (like pedals, steering, etc).

    Lot of work for this for not so many gamers to be able to use it...

    You better have to do as every button box maker: use 2-way switchs ;)
     
  3. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    I have to disagree on some issues here. All game controllers support this - it's simply a matter of connecting the on-off toggle to a button input. When the switch is on, the circuit is closed, and the button is pressed and held constantly, which is easy for the game to register. When the switch is off, the circuit is open and the button is unpressed.

    The DSD controller can be programmed to send a simple "click" when both pressing and releasing a button, instead of just being constantly on or off, like a regular game controller would with such a switch connected. This allows "unorthodox" use of constant switches, but it also causes the problems described.

    The H-shifter already works like a constant switch. It's basically a game controller with 8 buttons which holds each button while in gear. No buttons held = neutral. And the game polls the controller so that it always knows what position the shifter is in. All games already support this, so this can be done for other features as well. It won't use more cpu, since the game already polls all connected game controllers to register which buttons are pressed and which are not.

    But I see your point that this is of marginal interest to developers, and that it's perhaps not worth spending time on implementing.

    I would love it, though.

    The regular constant on-off toggle switches feel great, and when they work properly, they give a really good indication of when stuff is turned on, and when it's turned off. And they are old-school, which is of course good.

    But I took my precautions when starting the project, so I bought a set of momentary off-(on) and (on)-off-(on) toggle switches as well. Will look into it and perhaps keep one or two constant switches along with a couple of two-way momentary ones. :)
     
  4. VladGets

    VladGets New Member

    Joined:
    Nov 2, 2016
    Ratings:
    +0 / 0 / -0
    its funny