magellan motion packets didn't need swapping on big endian
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 7 Nov 2020 02:45:00 +0000 (04:45 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 7 Nov 2020 02:45:00 +0000 (04:45 +0200)
src/sball.c

index 2a893de..e6ff48e 100644 (file)
@@ -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);