UPDATE_A | UPDATE_D | RESET_D | RESET_A);
}
-#include <stackdump.h>
-
/** set relative angle and distance consign to 0, and break any
* deceleration ramp in quadramp filter */
void trajectory_hardstop(struct trajectory *traj)
* distance. */
uint8_t trajectory_finished(struct trajectory *traj)
{
- return trajectory_angle_finished(traj) &&
+ uint8_t flags, ret;
+ IRQ_LOCK(flags);
+ ret = trajectory_angle_finished(traj) &&
trajectory_distance_finished(traj);
+ IRQ_UNLOCK(flags);
+ return ret;
}
/** return true if traj is nearly finished */
if (calc_clitoid(traj, x, y, a_rad, alpha_deg, beta_deg, R_mm,
Vd, traj->a_acc, d_inter_mm,
&Aa, &Va, &remain) < 0) {
- DEBUG(E_TRAJECTORY, "%s() calc_clitoid returned an error");
+ DEBUG(E_TRAJECTORY, "%s() calc_clitoid returned an error",
+ __FUNCTION__);
return -1;
}