Skip to content

Leave pen up at end of plotΒ #178

@osresearch

Description

@osresearch

It seems that after a successful plot, the carriage returns to home and executes a pen down. Is there a way to turn this off so that it doesn't mark the paper? I'm not sure why it does this, since the code in function plan seems to end with a max-up pen position:

  // finally, move back to (0, 0).
  motions.push(constantAccelerationPlan([curPos, {x: 0, y: 0}], profile.penUpProfile));
  motions.push(new PenMotion(Device.Axidraw.penPctToPos(penMaxUpPos), profile.penUpPos, profile.penDropDuration));
  return new Plan(motions);

unless it is being modified in withPenHeights()? I'm not clear on exactly what is happening here, although it seems odd that the last motion is being treated special and overriding the actual command:

                if (j === this.motions.length - 3) {
                    return new PenMotion(penDownHeight, exports.Device.Axidraw.penPctToPos(0), motion.duration());
                }
                else if (j === this.motions.length - 1) {
                    return new PenMotion(exports.Device.Axidraw.penPctToPos(0), penUpHeight, motion.duration());
                }

(I'm running this on a Pi Zero with the saxi version 0.15.0 installed via npm)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions