pixalynx/nrf9151-gps-tracker
A compact 44×32 mm, 4-layer nRF9151 LTE-M/NB-IoT/GNSS tracker PCB with nPM1300 LiPo/USB-C power, nano-SIM/eSIM switching, nRF7002 Wi‑Fi scanning, accelerometer, antennas, buzzer, LEDs, SOS button, and SWD/debug connectors.
- Version
- 0.1.4
- License
- unset
- Stars
- 0
scripts/render-sch.ts
// Render dist/<entry>/circuit.json schematic to dist/<entry>/schematic.png
import { convertCircuitJsonToSchematicSvg } from "circuit-to-svg"
import { Resvg } from "@resvg/resvg-js"
const entry = process.argv[2] ?? "index"
const cj = await Bun.file(`dist/${entry}/circuit.json`).json()
const svg = convertCircuitJsonToSchematicSvg(cj, { width: 3200, height: 2400 } as any)
await Bun.write(`dist/${entry}/schematic.svg`, svg)
await Bun.write(`dist/${entry}/schematic.png`, new Resvg(svg, { fitTo: { mode: "width", value: 3200 }, background: "#ffffff" }).render().asPng())
console.log(`wrote dist/${entry}/schematic.png`)