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/select-round5-vias.mjs

import fs from "node:fs"
import assert from "node:assert/strict"
const baseline="../../checkpoints/nema17-pre-round5-20261019-ywUpyW/restore-verified/routing/complete-routes.json"
const before=JSON.parse(fs.readFileSync(baseline,"utf8"))
const candidate=JSON.parse(fs.readFileSync("routing/relocated-vias-candidate.json","utf8"))
const plan=JSON.parse(fs.readFileSync("reports/round5-ordinary-via-plan.json","utf8"))
assert.equal(plan.accepted.length,5)
// Native validation rejected the XI relocation because its added path exceeds
// the existing 15 mm oscillator budget. Retain the original clock, not a
// relaxed limit. The four unrelated via candidates are checked independently.
const rejectedSource="source_trace_157"
const retained=candidate.filter(t=>t.source_trace_id!==rejectedSource)
retained.push(...before.filter(t=>t.source_trace_id===rejectedSource))
fs.writeFileSync("routing/complete-routes.json",JSON.stringify(retained,null,2)+"\n")
console.log(JSON.stringify({accepted:plan.accepted.filter(x=>x.old[0]!==1.75||x.old[1]!==-.2),
  rejected:{sourceTraceId:rejectedSource,reason:"ETH_XI maximum length would regress"}}))