Skip to content

Commit

Permalink
Use profile penUp instead of hardcoded values. Closes nornagon#178
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Sep 26, 2023
1 parent 138f2fd commit 03b5027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/planning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,14 @@ export function plan(

// for each path: move to the initial point, put the pen down, draw the path,
// then pick the pen up.
paths.forEach((p, i) => {
paths.forEach((p) => {
const m = constantAccelerationPlan(p, profile.penDownProfile);
const penUpPos = i === paths.length - 1 ? penHomePosition : profile.penUpPos;
motions.push(
constantAccelerationPlan([curPos, m.p1], profile.penUpProfile),
new PenMotion(profile.penUpPos, profile.penDownPos, profile.penDropDuration),
m,
new PenMotion(profile.penDownPos, penUpPos, profile.penLiftDuration)
new PenMotion(profile.penDownPos, profile.penUpPos, profile.penLiftDuration)
);
curPos = m.p2;
});
Expand Down

0 comments on commit 03b5027

Please sign in to comment.