added support for both drivetrains with the same code
Previously, we were just switching back and forth manually, which
doesn't work very well. The python code for (both) drivetrain loops now
generates constants for both robots and frc971/constants knows which one
to give the actual drivetrain control loop code.
Various other cleanups to things that were so hard to read it made it
difficult to figure out how to do this too.
diff --git a/frc971/constants.h b/frc971/constants.h
index 8bf1367..838bb35 100644
--- a/frc971/constants.h
+++ b/frc971/constants.h
@@ -3,6 +3,8 @@
#include <stdint.h>
+#include "frc971/control_loops/state_feedback_loop.h"
+
namespace frc971 {
namespace constants {
@@ -75,6 +77,9 @@
bool clutch_transmission;
+ ::std::function<StateFeedbackLoop<2, 2, 2>()> make_v_drivetrain_loop;
+ ::std::function<StateFeedbackLoop<4, 2, 2>()> make_drivetrain_loop;
+
// How many pixels off center the vertical line
// on the camera view is.
int camera_center;