Allow cancelling un-executed splines
Previously we couldn't cancel a spline without starting execution of it.
Also, allow specifying driving backwards on a per-spline basis.
Change-Id: I7a1fc54a49bfdcfe8c8614bde18d2976ba3a7868
diff --git a/frc971/control_loops/drivetrain/drivetrain.q b/frc971/control_loops/drivetrain/drivetrain.q
index 09ecb4f..939ad75 100644
--- a/frc971/control_loops/drivetrain/drivetrain.q
+++ b/frc971/control_loops/drivetrain/drivetrain.q
@@ -45,6 +45,8 @@
// State of the spline execution.
bool is_executing;
+ // Whether we have finished the spline specified by current_spline_idx.
+ bool is_executed;
// The handle of the goal spline. 0 means stop requested.
int32_t goal_spline_handle;
@@ -130,8 +132,6 @@
// Which spline to follow.
int32_t spline_handle;
- // Whether to follow the spline driving forwards or backwards.
- bool drive_spline_backwards;
};
message Position {