Devesh36/key-finder
A compact BLE key finder for keys, bags and remotes: replaceable CR2032, piezo alert, status LED and pair button in a 38 mm black keyring enclosure. Includes routed PCB, enclosed/exploded assembly and BOM. Firmware/app and physical qualification remain separate.
- Version
- 0.1.2
- License
- unset
- Stars
- 0
manual-routing.ts
import type { GenericLocalAutorouter, SimpleRouteJson, SimplifiedPcbTrace } from '@tscircuit/core'
// All copper paths are declared natively in index.circuit.tsx. The router
// contributes no extra paths; standard connectivity and geometry checks remain on.
export async function manualRouting(input:SimpleRouteJson):Promise<GenericLocalAutorouter>{
const traces:SimplifiedPcbTrace[]=[]
const handlers: Record<string, Array<(event: any)=>void>> = {complete:[],error:[],progress:[]}
const router: GenericLocalAutorouter = {
input, isRouting:false,
on(event,callback) { handlers[event].push(callback) },
async start() {
this.isRouting=true
queueMicrotask(()=>{
this.isRouting=false
handlers.complete.forEach(fn=>fn({type:'complete',traces}))
})
},
stop() { this.isRouting=false },
solveSync() { return traces },
}
return router
}