shibosoftwaredev/f1c100s-linux-nema17-stepper-controller
A four-layer NEMA 17 motor-controller PCB combining an Allwinner F1C100S Linux computer, USB‑PD/buck power system, W5500 Ethernet, STM32 real-time motion control, DRV8825 stepper driver, protection/temperature/current telemetry, USB interfaces, and local LED/buzzer diagnostics.
- Version
- 0.4.56
- License
- unset
- Stars
- 0
scripts/draft-clean-schematic.mjs
import fs from "node:fs"
import { spawn } from "node:child_process"
async function run(name,args) {
const fd=fs.openSync(`reports/clean-${name}.log`,"w")
await new Promise((resolve,reject)=>{
const p=spawn(process.execPath,args,{env:{...process.env,SCHEMATIC_STYLE_ANALYZER:"/tmp/nema17-style-082-SUsDpR/package/dist/browser.js"},stdio:["ignore",fd,fd]})
p.once("exit",code=>{fs.closeSync(fd);code===0?resolve():reject(new Error(name+" failed"))})
p.once("error",reject)
})
}
await run("draft-build",["node_modules/@tscircuit/cli/cli/entrypoint.js","--use-global","build","index.circuit.tsx","--disable-pcb","--routing-disabled","--disable-parts-engine","--schematic-svgs"])
await run("style",["scripts/analyze-schematic-review.mjs","dist/index/circuit.json","reports/clean-style"])
const report=JSON.parse(fs.readFileSync("reports/clean-style/analysis.json","utf8"))
console.log("Style issues: "+report.issueCount)
for(const item of report.issues)console.log(item.issueIndex+": "+item.descriptionXml)