Allow driving while planning spline
This lets us plan the spline while not in spline drivetrain mode.
Change-Id: I14aa4794662e9ffbbcb94b0d1f435deb53308c77
diff --git a/frc971/autonomous/base_autonomous_actor.cc b/frc971/autonomous/base_autonomous_actor.cc
index 3509d63..097196d 100644
--- a/frc971/autonomous/base_autonomous_actor.cc
+++ b/frc971/autonomous/base_autonomous_actor.cc
@@ -400,7 +400,13 @@
drivetrain_queue.goal.FetchLatest();
auto drivetrain_message = drivetrain_queue.goal.MakeMessage();
- drivetrain_message->controller_type = 2;
+
+ int controller_type = 2;
+ if (drivetrain_queue.goal.get()) {
+ controller_type = drivetrain_queue.goal->controller_type;
+ drivetrain_message->throttle = drivetrain_queue.goal->throttle;
+ }
+ drivetrain_message->controller_type = controller_type;
drivetrain_message->spline = spline;
drivetrain_message->spline.spline_idx = spline_handle;