mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-06 04:59:16 +01:00
22 lines
439 B
JavaScript
22 lines
439 B
JavaScript
// 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);
|
|
}
|