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/write-connectivity-audit.mjs

import fs from "node:fs"
import crypto from "node:crypto"
import assert from "node:assert/strict"
const bytes=fs.readFileSync("dist/index/circuit.json")
const circuitSha256=crypto.createHash("sha256").update(bytes).digest("hex")
const report=JSON.parse(fs.readFileSync("routing/import-report.json","utf8"))
assert.equal(report.circuit_sha256,circuitSha256,"audit reads the actual built artifact")
assert.ok(report.audit_only && report.ignored_protected,"no saved/protected copper injected into audit")
assert.deepEqual(report.failures,[],"zero failed source connections")
assert.equal(report.physical_island_links,0,"zero disconnected terminal islands")
const result={circuitSha256,checkedAt:new Date().toISOString(),
  sourceFailures:0,disconnectedTerminalIslands:0,emittedCopperOnly:true,
  sessionSha256:report.session_sha256,paths:report.paths,nets:report.stats.length}
fs.writeFileSync("reports/connectivity-audit.json",JSON.stringify(result,null,2)+"\n")
console.log(JSON.stringify(result,null,2))