diff --git a/firmware/tinyg/plan_zoid.c b/firmware/tinyg/plan_zoid.c index c0851f78a..55b5f54fa 100755 --- a/firmware/tinyg/plan_zoid.c +++ b/firmware/tinyg/plan_zoid.c @@ -289,10 +289,10 @@ void mp_calculate_trapezoid(mpBuf_t *bf) } bf->body_length = 0; - // If the body is a standalone make the cruise velocity match the entry velocity + // If the body is a standalone make the cruise velocity match the entry velocity as long as it's not zero // This removes a potential velocity discontinuity at the expense of top speed - } else if ((fp_ZERO(bf->head_length)) && (fp_ZERO(bf->tail_length))) { - bf->cruise_velocity = bf->entry_velocity; + } else if ((fp_ZERO(bf->head_length)) && (fp_ZERO(bf->tail_length)) && fp_NOT_ZERO(bf->entry_velocity)) { + bf->cruise_velocity = bf->entry_velocity; } }