Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/python
import hal
import time
h = hal.component("numstr")
h.newpin("in", hal.HAL_S32, hal.HAL_IN)
h.ready()
tmp = 0
try:
while 1:
# check program data every 0.01 seconds
time.sleep(0.01)
if h['in'] == 0:
continue
else:
if h['in'] > tmp:
f = open('/home/jura/line-number.txt','w')
f.write(str(int(h['in'])))
f.close()
tmp = h['in']
except KeyboardInterrupt:
raise SystemExit