added "methods" to header

This commit is contained in:
Andy Killorin 2025-12-06 14:48:08 -05:00
parent b3c09c6047
commit f8d0b85def
Signed by: ank
GPG key ID: 23F9463ECB67FE8C
2 changed files with 8 additions and 3 deletions

View file

@ -12,3 +12,11 @@ struct Setpoint {
float position; // unitless float position; // unitless
bool complete; // the setpoint will no longer change 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);

View file

@ -1,9 +1,6 @@
#include "trapezoidal.h" #include "trapezoidal.h"
// trapezoidal impl, not fuzzed // 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) { struct Setpoint trapezoidal_planner(struct Trapezoidal* trapezoidal, float time) {
float max_vel = trapezoidal->max_vel; float max_vel = trapezoidal->max_vel;
float max_acc = trapezoidal->max_acc; float max_acc = trapezoidal->max_acc;