04-20-2018 08:10 AM
I am trying to control voltage with a boolean array, but I do not want the user to be able to select increase and decrease at the same time. If the increase switch is activated, then the decrease switch is deactivated.
Solved! Go to Solution.
04-20-2018 08:15 AM
04-20-2018 08:18 AM
GerdW,
Thank you so much!
04-20-2018 12:52 PM
I assume you have three "states": [increase, decrease, idle]. If you only have two states (increase, decrease), a single boolean is sufficient to represent all choices. No array needed.
If you actually have three states, make sure the radiobutton control is configured to "allow no selection".
We don't know enough about how you are using this "array", but if the increase/decrease action is just temporary, you could set the mechanical action to switch until released (like a car horn). Now it will increase or decrease only while you are holding the button down and you can naturally only interact with one at any given time.
Feel free to show us a simplified version of your code. Maybe there are even better solutions. 🙂