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/prepare-sense-staging.mjs

import fs from 'node:fs'

const routes = JSON.parse(fs.readFileSync('routing/accepted-sense-block.json', 'utf8'))
// Shift this newly authored temperature-ground leaf 0.05 mm left to make
// room for the full-through alert via. Its endpoints and net stay unchanged.
const retained = routes.filter(t => !['CURRENT_B_DECOUPLE','CURRENT_B_DECOUPLE_GND','DRV_REF_DIV','MOTOR_ENABLE_PULLDOWN_GND','TEMP_ADDR','TEMP_BYPASS_GND','CURRENT_A_FILTER_GND','CURRENT_B_FILTER_GND'].includes(t.name)
  && !(t.name==='TEMP_GND' && t.route.some(p=>p.layer==='top'))
  && !(t.name==='CURRENT_B_GROUND' && t.route.some(p=>(p.x===8.6 && p.y===-15.15)||(p.x===10.69 && p.y===-15.4))))
  .map(t => t.name === 'MOTOR_B_PLUS'
  ? {...t,route:t.route.map(p=>p.y===-20.8?{...p,y:-20.78}:p)}
  : t.name === 'CURRENT_B_SUPPLY'
  ? {...t,route:t.route.map(p=>p.x===7.5?{...p,x:8.5,y:p.y===-17.5?-17.2:p.y}:p)}
  : t.name === 'CURRENT_B_OUTPUT'
  ? {...t,route:t.route.map(p=>p.x===10.4?{...p,x:10}:p)}
  : t.name === 'TEMP_GND' && t.route.some(p => p.x===20.3 && p.y===-14)
  ? { ...t, route: [[20.3,-16.5],[20.25,-16.4],[20.25,-14],[19.8,-14]].map(([x,y]) =>
      ({route_type:'wire',x,y,layer:'bottom',width:.15})) }
  : t)
fs.writeFileSync('routing/retained-sense-block.json', JSON.stringify(retained, null, 2)+'\n')