nhs-t10 / Robotics_2021_2022

2 stars 0 forks source link

Beautify the glue code #27

Closed chlohal closed 2 years ago

chlohal commented 2 years ago

Right now, 90% of ExampleTeleopCarouselDualController's loop() method is "glue code"/"middleware". It takes a value from the InputManager and calls a method in one of the others.

Can we automate this?

I don't have any implementation ideas for how we'd do it, but it'd be cool if all of that could be simplified-- like the PriorityAsyncOpmodeComponent does-- and made understandable.

Challenges

Implementation Ideas

Okay, I lied. I have a few.

chlohal commented 2 years ago

Challenge 2-- we could put the if/else inside the proposed lambda. Baby steps! It's not all going to be pure nodes :)

chlohal commented 2 years ago

Obviously, if we do do this, it would need the cooperation of everyone, and it won't be done soon. We can think about doing it after our competitions.

chlohal commented 2 years ago

Having some ideas about this; started work on the entirely-nodes-teleop branch

Mario-Runner commented 2 years ago

I've optimized Teleop in DualControllerFools quite significantly to primarily use nodes instead of large numbers of if statements in loop.