File: tracking-test.hal

package info (click to toggle)
linuxcnc 1%3A2.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 285,604 kB
  • sloc: python: 202,568; ansic: 109,036; cpp: 99,239; tcl: 16,054; xml: 10,631; sh: 10,303; makefile: 1,255; javascript: 138; sql: 72; asm: 15
file content (25 lines) | stat: -rw-r--r-- 878 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# a cone moves with your mouse in X and Y. Another cone points at the first.
# set Z with the mouse wheel. the algorithm gets crusty for values of z between
# -0.2 and 0.2
#
# run with halcmd -fk tracking-test.hal

# this assumes your mouse is on /dev/input/event1 and is world-writable. 
# if not, chmod a+rw /dev/input/event1 and/or change 1 to the location of 
# your mouse. see man hal_input for details
loadusr -W hal_input -RK 1
net x-mouse input.0.rel-x-position
net y-mouse input.0.rel-y-position
net z-mouse input.0.rel-wheel-position
net click input.0.btn-right
net click input.0.rel-wheel-reset
net click input.0.rel-x-reset
net click input.0.rel-y-reset

loadusr -W tracking-test
net x-mouse tracking-test.axis0
net y-mouse tracking-test.axis1
net z-mouse tracking-test.axis2
#linksp a tracking-test.axis3
#linksp b tracking-test.axis4
#linksp c tracking-test.axis5