* exit status:
* 0 all ok
* other some other problem
+ *
+ * joystick values are always doubles from -1 to 0 to +1
*/
#include "hidrawconv.h"
if (mb==lb) continue;
mb >>= loc->rshift;
mb -= loc->zero;
- printf("%s %d\n", loc->str, loc->sign * (int8_t)mb);
+ double val= (int8_t)mb;
+ val /= (val >= 0 ? 127 : 128);
+ printf("%s %.5f\n", loc->str, loc->sign * val);
}
}