shibosoftwaredev/f1c100s-linux-nema8-stepper-controller

Restores component part numbers and CAD models, removes test-point 3D bodies, and validates that solder paste exists only on top-side SMT pads without altering copper or DRC.

Version
0.3.5
License
unset
Stars
0

work/publish/fixed-board-router.ts

import savedBoardTraces from "./saved-board-traces.json"

export async function fixedBoardRouter(input: any) {
  const handlers: Record<string, Array<(event: any) => void>> = {
    complete: [], error: [], progress: [],
  }
  let isRouting = false
  return {
    input,
    get isRouting() { return isRouting },
    on(event: string, handler: (event: any) => void) {
      handlers[event]?.push(handler)
    },
    start() {
      isRouting = true
      queueMicrotask(() => {
        if (!isRouting) return
        isRouting = false
        handlers.complete.forEach((handler) => handler({
          type: "complete",
          traces: savedBoardTraces,
        }))
      })
    },
    stop() { isRouting = false },
    solveSync() { return savedBoardTraces },
  }
}