Team612 / 612-2017

Chantilly Robotics Team 612 robot code repository for 2017 game FIRST Steamworks
GNU General Public License v3.0
4 stars 4 forks source link

Make UpdateAll more dynamic #52

Closed Ahmad-Bamba closed 7 years ago

Ahmad-Bamba commented 7 years ago

In the past, different subsystems and commands have had SmartDashboard calls. What we want to do is, instead of having them everywhere, we want them to be called with UpdateAll.

That's why I propose we do something weird. Flashback to 612-2014's FunctionRegistry except instead of the lame C++98 way of doing it we have a hip C++14 way of doing it.

UpdateAll() should have an array of void(void) std::functions that can be updated with another method in Networking.h, AddSmartDashboardUpdate(std::function<void(void)>). Then, UpdateAll should loop through this vector and call all the function, thus updating smartdashboard from whatever subsystems and stuff we want.

Ahmad-Bamba commented 7 years ago

Done with #56