diff --git a/robot_controller/trapezoidal.h b/robot_controller/trapezoidal.h index 78dcaa8..a991f67 100644 --- a/robot_controller/trapezoidal.h +++ b/robot_controller/trapezoidal.h @@ -12,3 +12,11 @@ struct Setpoint { float position; // unitless bool complete; // the setpoint will no longer change }; + +// returns the position and velocity at the given time on a trapezoidal motion plan +// this could be baked if too computationally expensive +// not fully fuzzed +struct Setpoint trapezoidal_planner(struct Trapezoidal* trapezoidal, float time); + +// returns the time a given plan will take +float trapezoidal_time(struct Trapezoidal* trapezoidal); diff --git a/robot_controller/trapezoidal.ino b/robot_controller/trapezoidal.ino index e0ab6e5..9da6772 100644 --- a/robot_controller/trapezoidal.ino +++ b/robot_controller/trapezoidal.ino @@ -1,9 +1,6 @@ #include "trapezoidal.h" // trapezoidal impl, not fuzzed -// returns the position and velocity at the given time on a trapezoidal motion plan -// this could be baked if too computationally expensive -// not fully fuzzed struct Setpoint trapezoidal_planner(struct Trapezoidal* trapezoidal, float time) { float max_vel = trapezoidal->max_vel; float max_acc = trapezoidal->max_acc;