File: vimo.js

package info (click to toggle)
freej 0.10git20080824-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,504 kB
  • ctags: 19,398
  • sloc: ansic: 135,255; cpp: 32,550; sh: 9,318; perl: 2,932; asm: 2,355; yacc: 1,178; makefile: 1,119; java: 136; lex: 94; python: 16
file content (21 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// video mouse test script

echo("VideoMouse");
vm = new ViMoController("/dev/ttyUSB0");
register_controller(vm);

// inner wheel
vm.wheel_i = function(dir, hist) {
	var msg = "wi "+dir+" "+hist;
	echo(msg);
}

// outer wheel
vm.wheel_o = function(s, so) { 
	echo("speed: " + s + " / " + so);
}

// ye butts
vm.button = function(button, state, mask, mask_old) {
	echo("VM buttom: " + button + " " + state + " " + mask + "/" + mask_old);
}