Added position control and profiling to drivetrain.

Change-Id: I09ad01c46b23f1c7b6e8530bc10b03a733245b95
diff --git a/frc971/control_loops/drivetrain/gear.h b/frc971/control_loops/drivetrain/gear.h
new file mode 100644
index 0000000..8fabb69
--- /dev/null
+++ b/frc971/control_loops/drivetrain/gear.h
@@ -0,0 +1,25 @@
+#ifndef FRC971_CONTROL_LOOPS_GEAR_H_
+#define FRC971_CONTROL_LOOPS_GEAR_H_
+
+namespace frc971 {
+namespace control_loops {
+namespace drivetrain {
+
+// The state of the shift.
+enum class Gear { HIGH, LOW, SHIFTING_UP, SHIFTING_DOWN };
+
+// True if the the robot might or is trying to be in high gear.
+inline bool MaybeHigh(Gear g) {
+  return g == Gear::HIGH || g == Gear::SHIFTING_UP;
+}
+
+// True if the shifter is engaged and ready for action.
+inline bool IsInGear(Gear gear) {
+  return gear == Gear::LOW || gear == Gear::HIGH;
+}
+
+}  // namespace drivetrain
+}  // namespace control_loops
+}  // namespace frc971
+
+#endif  // FRC971_CONTROL_LOOPS_GEAR_H_