seveibar/nema17-stepper-motor-driver-tmc2209-usb-pd

RP2040-based USB-C PD stepper-motor controller with TMC2209 drive, AS5600 position feedback, TMP102 thermal shutdown, current/voltage telemetry, RGB status LED, and protected buzzer alarm circuitry.

Version
0.2.0
License
unset
Stars
0

scripts/test-route-guard.ts

import plan from "../routing/route-plan.json";
import { savedRouting } from "../routing/saved-routing";
await savedRouting(plan.expectedInput);
let rejected=false;
try {await savedRouting({...plan.expectedInput,minTraceWidth:(plan.expectedInput.minTraceWidth??0.1)+0.01})}
catch {rejected=true}
if(!rejected) throw new Error("Saved routes accepted changed trace rules");
console.log("PASS: exact routing input accepted; changed trace rules rejected");