Pass voltage through to the trajectory python wrapper.
Add dependencies on python_init at suggestion of Brian.
Change-Id: I4fc7394bbe891115cf05f8604f2dde398f40e75f
diff --git a/frc971/control_loops/drivetrain/libspline.cc b/frc971/control_loops/drivetrain/libspline.cc
index 0d14f66..f931e59 100644
--- a/frc971/control_loops/drivetrain/libspline.cc
+++ b/frc971/control_loops/drivetrain/libspline.cc
@@ -149,6 +149,12 @@
void TrajectoryPlan(Trajectory *t) { t->Plan(); }
+ void TrajectoryVoltage(Trajectory *t, double distance, double* res) {
+ double *val = t->FFVoltage(distance).data();
+ res[0] = val[0];
+ res[1] = val[1];
+ }
+
double TrajectoryLength(Trajectory *t) { return t->length(); }
int TrajectoryGetPathLength(Trajectory *t) { return t->plan().size(); }