|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
9 char touchpad_sensitivity = 4;
15 int btns = 0b00000000;
26 btns |= (
input(NAV_COM_L) << 6);
27 btns |= (
input(NAV_COM_R) << 3);
32 btns |= (
input(NAV_COM_L) << 5);
33 btns |= (
input(NAV_COM_R) << 2);
38 btns |= (
input(NAV_COM_L) << 4);
39 btns |= (
input(NAV_COM_R) << 1);
45 tDecay[1] =
rc_time(NAV_TOUCH_L,1);
49 tDecay[0] =
rc_time(NAV_TOUCH_R,1);
51 btns |= ((tDecay[0] > touchpad_sensitivity ? 1 : 0) << 7);
52 btns |= ((tDecay[1] > touchpad_sensitivity ? 1 : 0) << 0);
67 sens = (sens < 0 ? 0 : sens);
68 sens = (sens > 15 ? 15 : sens);
72 touchpad_sensitivity = sens;