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/control_loops/update_polydrivetrain.sh b/frc971/control_loops/update_polydrivetrain.sh
index cd0d71e..2e2748e 100755
--- a/frc971/control_loops/update_polydrivetrain.sh
+++ b/frc971/control_loops/update_polydrivetrain.sh
@@ -1,8 +1,12 @@
#!/bin/bash
#
-# Updates the polydrivetrain controller and CIM models.
+# Updates the polydrivetrain controllers (for both robots) and CIM models.
-./python/polydrivetrain.py drivetrain/polydrivetrain_motor_plant.h \
- drivetrain/polydrivetrain_motor_plant.cc \
+cd $(dirname $0)
+
+./python/polydrivetrain.py drivetrain/polydrivetrain_dog_motor_plant.h \
+ drivetrain/polydrivetrain_dog_motor_plant.cc \
+ drivetrain/polydrivetrain_clutch_motor_plant.h \
+ drivetrain/polydrivetrain_clutch_motor_plant.cc \
drivetrain/polydrivetrain_cim_plant.h \
drivetrain/polydrivetrain_cim_plant.cc