nhs-t10 / Robotics_2021_2022

2 stars 0 forks source link

Make a OneOfNode #41

Closed chlohal closed 2 years ago

chlohal commented 2 years ago

This will help make our Teleops simpler! Eventually, we can use this to make constraints (from #27) ;)

A OneOfNode should take two nodes (or, optionally, more), and give the result of the first non-zero node.

Example


//This will be `1` if B is pressed, or otherwise, the left stick
new OneOfNode(new ButtonNode("b"), new JoystickNode("left_stick_x"))```