Is there a way to disable deceleration in AccelSteppe for a position transition?

As the title implies, is there a way to accelerate (slowly) to a position, but skip the deceleration to that position so I can instantly accelerate to a new position (rotating the same direction, just "further") at a faster speed?

Currently using this simple code:

stepper.setAcceleration(250);
  stepper.setMaxSpeed(1000);
  stepper.runToNewPosition(5000);
  stepper.setMaxSpeed(4500);
  stepper.runToNewPosition(20000);

Of course, runToNewPostion utilizes acceleration and deceleration.

It works, but it comes to a stop inbetween positions, I would like the workflow to look like:

accelerate to position 1, accelerate (at faster max speed) to position 2, decelerate to stop.

Thoughts? Or do I need to ditch AccelStepper?

I don’t know if you can do that with the AccelStepper library.

If you are using a stepper driver that takes step and direction signals it is not that difficult to create your own acceleration code. have a look at the code in this link.

…R
Stepper Motor Basics
Simple Stepper Code