static void pr(const uint8_t *msg, int msglen, const uint8_t *last) {
reportbits(msg, last, msglen, keybits);
- reportlocs(msg, last, msglen, vallocs);
+ reportvals(msg, last, msglen, vallocs);
}
ProcessReport *const nested_processors[MAXREPORTS]= {
printf("%s %d\n", bit->str, !!mb);
})
-DEFINE_STANDARD_REPORTER(ValLoc, loc, {
- mb >>= loc->rshift;
- mb -= loc->zero;
- double val= (int8_t)mb;
- val /= (val >= 0 ? 127 : 128);
- printf("%s %.5f\n", loc->str, loc->sign * val);
+DEFINE_STANDARD_REPORTER(ValLoc, val, {
+ mb >>= val->rshift;
+ mb -= val->zero;
+ double v= (int8_t)mb;
+ v /= (v >= 0 ? 127 : 128);
+ printf("%s %.5f\n", val->str, val->sign * v);
})
} KeyBit;
void reportbits(const uint8_t msg[], const uint8_t last[],
- int len, const KeyBit bits[]);
+ int len, const KeyBit keybits[]);
typedef struct {
uint8_t mask, zero;
} ValLoc;
-void reportlocs(const uint8_t msg[], const uint8_t last[],
- int len, const ValLoc locs[]);
+void reportvals(const uint8_t msg[], const uint8_t last[],
+ int len, const ValLoc vallocs[]);
#endif /*HIDRAWCONV_H*/