projects
/
sball
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d35aa7
)
magellan motion packets didn't need swapping on big endian
author
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 7 Nov 2020 02:45:00 +0000
(
04:45
+0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 7 Nov 2020 02:45:00 +0000
(
04:45
+0200)
src/sball.c
patch
|
blob
|
history
diff --git
a/src/sball.c
b/src/sball.c
index
2a893de
..
e6ff48e
100644
(file)
--- a/
src/sball.c
+++ b/
src/sball.c
@@
-309,13
+309,8
@@
static int mag_parsepkt(struct sball *sb, int id, char *data, int len)
return -1;
}
for(i=0; i<6; i++) {
-#ifdef SBALL_BIG_ENDIAN
- sb->mot[i] = ((((int)data[3] & 0xf) << 12) | (((int)data[2] & 0xf) << 8) |
- (((int)data[1] & 0xf) << 4) | (data[0] & 0xf)) - 0x8000;
-#else
sb->mot[i] = ((((int)data[0] & 0xf) << 12) | (((int)data[1] & 0xf) << 8) |
(((int)data[2] & 0xf) << 4) | (data[3] & 0xf)) - 0x8000;
-#endif
data += 4;
}
print_state(sb);