app/src/mouse/trackball_pim447.c
static int16_t convert_speed(int32_t value)
{
    bool negative = (value < 0);

    if (negative) {
        value = -value;
    }

    switch (value) {
        case 0:  value = 0;   break;
        case 1:  value = 1;   break;
        case 2:  value = 4;   break;
        case 3:  value = 8;   break;
        case 4:  value = 18;  break;
        case 5:  value = 32;  break;
        case 6:  value = 50;  break;
        case 7:  value = 72;  break;
        case 8:  value = 98;  break;
        default: value = 127; break;
    }

    if (negative) {
        value = -value;
    }

    return value;
}
/*
 * It feels more natural and more confortable to convert the speed
 * reported by the PIM447 trackball.
 */
It feels more natural and more confortable to convert the speed
reported by the PIM447 trackball.
It feels more natural and more confortable to convert the speed reported by the PIM447 trackball .
static int16_t convert_speed(int32_t value)
{
    bool negative = (value < 0);
    if (negative) {
        value = -value;
    }
    switch (value) {
        case 0:  value = 0;   break;
        case 1:  value = 1;   break;
        case 2:  value = 4;   break;
        case 3:  value = 8;   break;
        case 4:  value = 18;  break;
        case 5:  value = 32;  break;
        case 6:  value = 50;  break;
        case 7:  value = 72;  break;
        case 8:  value = 98;  break;
        default: value = 127; break;
    }
    if (negative) {
        value = -value;
    }
    return value;
}
static int16_t convert_speed ( int32_t value ) { bool negative = ( value < 0 ) ; if ( negative ) { value = - value ; } switch ( value ) { case 0 : value = 0 ; break ; case 1 : value = 1 ; break ; case 2 : value = 4 ; break ; case 3 : value = 8 ; break ; case 4 : value = 18 ; break ; case 5 : value = 32 ; break ; case 6 : value = 50 ; break ; case 7 : value = 72 ; break ; case 8 : value = 98 ; break ; default : value = 127 ; break ; } if ( negative ) { value = - value ; } return value ; }
It feels more natural and more confortable to convert the speed
 reported by the PIM447 trackball.
It feels more natural and more confortable to convert the speed reported by the PIM447 trackball .