Skip to content

Commit

Permalink
Add brushless config to EBB
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Jul 12, 2023
1 parent a82f6f8 commit 904902f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ebb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export class EBB {

private cachedFirmwareVersion: [number, number, number] | undefined = undefined;

private brushless = false; // brushless pen servo

public constructor(port: SerialPort) {
this.port = port;
this.writer = this.port.writable.getWriter()
Expand Down Expand Up @@ -156,7 +158,8 @@ export class EBB {
}

public setPenHeight(height: number, rate: number, delay = 0): Promise<void> {
return this.command(`S2,${height},4,${rate},${delay}`);
const pin = this.brushless ? 5 : 4;
return this.command(`S2,${height},${pin},${rate},${delay}`);
}

public lowlevelMove(
Expand Down

0 comments on commit 904902f

Please sign in to comment.