abse/gameboy-advance

Validates and exports a four-layer Game Boy–style PCB assembly with RP2350 MCU, 32MB flash, USB-C, LCD and speaker connectors, battery buck-boost power, buttons, and verified routing, connectivity, clearances, CAD models, and physical DRC.

Version
0.0.39
License
unset
Stars
0

checks/manual-preflight.ts

PCBPCB preview for checks/manual-preflight.ts
SchematicSchematic preview for checks/manual-preflight.ts
import {readFileSync,writeFileSync} from 'node:fs'
import * as checks from '@tscircuit/checks'
const c=JSON.parse(readFileSync('manual-preflight-circuit.json','utf8'))
for(const e of c)if(e.type==='pcb_via'){e.layers=['top','inner1','inner2','bottom'];e.from_layer='top';e.to_layer='bottom'}
const results:any={}
for(const n of ['checkViaPadClearance','checkViaTraceClearance','checkSameNetViaSpacing','checkDifferentNetViaSpacing','checkHoleTraceClearance','checkCopperPourShorts']){results[n]=await (checks as any)[n](c);console.log(n,results[n].length)}
writeFileSync('manual-preflight.json',JSON.stringify(results,null,2));writeFileSync('manual-preflight-output.json',JSON.stringify(c))