imrishabh18/rp2040-motor-controller
An RP2040-based NEMA17 stepper-motor controller with USB-C programming and PD motor-power negotiation, DRV8825 dual H-bridge drive, current/temperature telemetry, protected power filtering, status RGB LED, buzzer alarm, and optional magnetic encoder.
- Version
- 1.0.42
- License
- unset
- Stars
- 3
mechanical/revision-placement.ts
import placement from "./next-placement.json";
/** Absolute board coordinates; subtract the origin for parts in translated groups. */
export function revisionPlacement(name: string, origin = {x: 0, y: 0}) {
const position = (placement as Record<string, {pcbX:number; pcbY:number; pcbRotation:number}>)[name];
if (!position) throw new Error(`Missing PCB placement for ${name}`);
return {...position, pcbX:position.pcbX-origin.x, pcbY:position.pcbY-origin.y};
}
