nhs-t10 / Robotics_2021_2022

2 stars 0 forks source link

Re-write the driving controls to use PlusNode #42

Closed chlohal closed 2 years ago

chlohal commented 2 years ago

Current code: image

ideal plan: We have 1 node instead of 2; it's a PlusNode of two MultiInputNodes:

new PlusNode( 
    new MultiInputNode(...),
    new MultiInputNode(...),
)

and then the above code can be simplified! This is drastically more efficient, since we're only calling getFloatArrayOfInput once!

driver.driveOmni(input.getFloatArrayOfInput("drivingControls"));