Problem/ switch behaviour

Hi everyone, I have a funny behaviour with a switch node in a patch that I don’t quite understand. Hopefully someone has a solution for this.
Please check out the attached patch.

I’m using a Logitech Gamepad and with the left analog controller I’m controlling lot’s of stuff.
I’m using 2 counter nodes to change my mapped values. The problem I have here
is that switch outputs different values on two outputs even so there is only one input. What is even worse is that the switch never outputs the same value on one side even so my gamepad is back to it’s starting position. Therefore I cannot adjust the value for the counter, since it is never the same. If the value passed to the counter is higher than five even so my gamepad is back to it’s original position, I have a problem in my system. The only way for me is to shake the stick a little until the value is smaller than 5 again…(which isn’t really cool)
Would be great if I get this fixed.
Thanks, Jannis

switch.rar (1.9 kB)

hej jannis!

why are you using a switch (output) node anyway, if you want the same output on both outputpins? as much i understand, switch (output) means to route the input to output a OR b while the other outputpin stays at the last value.

i’m not quite sure, if it’s this what you want ->

gamecontroller.v4p (3.7 kB)

yes the switch (output) nodes are somewhat unnecessary, and basically an undebugged s+h combo. we included these for symmetries sake very early in the history of vvvv after playing too long with max and pd. i never actually found an occasion where i actually needed one. i propose removing them sometime soon.

Hi Woei,
I just checked your little patch and it seems as if this solves my problem !
I didn’t implement it yet into my complete setup but I’m quite positive it’ll work.
Thanks !
Jannis