Switch to c++11 enums for flatbuffers

Change-Id: I99171464bf54efbb7eb322c556760dee86648f5e
diff --git a/frc971/autonomous/base_autonomous_actor.cc b/frc971/autonomous/base_autonomous_actor.cc
index dee2931..27b63cc 100644
--- a/frc971/autonomous/base_autonomous_actor.cc
+++ b/frc971/autonomous/base_autonomous_actor.cc
@@ -47,7 +47,7 @@
 
   drivetrain::Goal::Builder goal_builder =
       builder.MakeBuilder<drivetrain::Goal>();
-  goal_builder.add_controller_type(drivetrain::ControllerType_POLYDRIVE);
+  goal_builder.add_controller_type(drivetrain::ControllerType::POLYDRIVE);
   goal_builder.add_highgear(true);
   goal_builder.add_wheel(0.0);
   goal_builder.add_throttle(0.0);
@@ -85,7 +85,7 @@
   drivetrain::Goal::Builder goal_builder =
       builder.MakeBuilder<drivetrain::Goal>();
 
-  goal_builder.add_controller_type(drivetrain::ControllerType_MOTION_PROFILE);
+  goal_builder.add_controller_type(drivetrain::ControllerType::MOTION_PROFILE);
   goal_builder.add_highgear(true);
   goal_builder.add_wheel(0.0);
   goal_builder.add_throttle(0.0);
@@ -420,7 +420,7 @@
     drivetrain::Goal::Builder goal_builder =
         builder.MakeBuilder<drivetrain::Goal>();
     goal_builder.add_controller_type(
-        drivetrain::ControllerType_SPLINE_FOLLOWER);
+        drivetrain::ControllerType::SPLINE_FOLLOWER);
     // TODO(james): Currently the 4.0 is copied from the
     // line_follow_drivetrain.cc, but it is somewhat year-specific, so we should
     // factor it out in some way.
@@ -469,7 +469,7 @@
       builder.MakeBuilder<drivetrain::Goal>();
 
   drivetrain::ControllerType controller_type =
-      drivetrain::ControllerType_SPLINE_FOLLOWER;
+      drivetrain::ControllerType::SPLINE_FOLLOWER;
   if (drivetrain_goal_fetcher_.get()) {
     controller_type = drivetrain_goal_fetcher_->controller_type();
     goal_builder.add_throttle(drivetrain_goal_fetcher_->throttle());
@@ -493,7 +493,7 @@
       ((base_autonomous_actor_->drivetrain_status_fetcher_->trajectory_logging()
                 ->planning_spline_idx() == spline_handle_ &&
         base_autonomous_actor_->drivetrain_status_fetcher_->trajectory_logging()
-                ->planning_state() == 3) ||
+                ->planning_state() == drivetrain::PlanningState::PLANNED) ||
        base_autonomous_actor_->drivetrain_status_fetcher_->trajectory_logging()
                ->current_spline_idx() == spline_handle_)) {
     return true;
@@ -521,7 +521,7 @@
   auto builder = base_autonomous_actor_->drivetrain_goal_sender_.MakeBuilder();
   drivetrain::Goal::Builder goal_builder =
       builder.MakeBuilder<drivetrain::Goal>();
-  goal_builder.add_controller_type(drivetrain::ControllerType_SPLINE_FOLLOWER);
+  goal_builder.add_controller_type(drivetrain::ControllerType::SPLINE_FOLLOWER);
 
   AOS_LOG(INFO, "Starting spline\n");
 
diff --git a/frc971/autonomous/base_autonomous_actor.h b/frc971/autonomous/base_autonomous_actor.h
index 09d9a0e..9444389 100644
--- a/frc971/autonomous/base_autonomous_actor.h
+++ b/frc971/autonomous/base_autonomous_actor.h
@@ -85,7 +85,7 @@
   void LineFollowAtVelocity(
       double velocity,
       y2019::control_loops::drivetrain::SelectionHint hint =
-          y2019::control_loops::drivetrain::SelectionHint_NONE);
+          y2019::control_loops::drivetrain::SelectionHint::NONE);
 
   // Waits until the robot is pitched up above the specified angle, or the move
   // finishes.  Returns true on success, and false if it cancels.