Fix reading of balance board data
This commit is contained in:
@@ -85,6 +85,10 @@ extern FILE* logtarget[];
|
||||
#define BIG_ENDIAN_LONG(i) (htonl(i))
|
||||
#define BIG_ENDIAN_SHORT(i) (htons(i))
|
||||
|
||||
/* Convert from big endian */
|
||||
#define FROM_BIG_ENDIAN_LONG(i) (ntohl(i))
|
||||
#define FROM_BIG_ENDIAN_SHORT(i) (ntohs(i))
|
||||
|
||||
#define absf(x) ((x >= 0) ? (x) : (x * -1.0f))
|
||||
#define diff_f(x, y) ((x >= y) ? (absf(x - y)) : (absf(y - x)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user