pixalynx/pixal-gps
These files define two separate printed circuit boards: a small, two-layer battery cartridge with protection circuitry and contact pads for a pouch cell, and a larger, two-layer wireless charging dock featuring USB-C input, a resonant coil, and wireless power transmission components.
- Version
- 0.1.2
- License
- unset
- Stars
- 0
review/source-build/scripts/render-svg.ts
// Render dist/<board>/pcb.svg (and schematic.svg if present) to PNG using resvg from the sibling project.
import { existsSync } from "node:fs"
const { Resvg } = await import("../../sync-stream-media-hub/node_modules/@resvg/resvg-js/index.js")
for (const b of process.argv.slice(2).length ? process.argv.slice(2) : ["tracker", "battery-pack", "dock"]) {
for (const f of ["pcb", "schematic"]) {
const p = `dist/${b}/${f}.svg`
if (!existsSync(p)) continue
const png = new Resvg(await Bun.file(p).text(), { fitTo: { mode: "width", value: f === "pcb" ? 2400 : 3200 }, background: "#ffffff" }).render().asPng()
await Bun.write(`dist/${b}/${f}.png`, png); console.log(`wrote dist/${b}/${f}.png`)
}
}