diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2008-07-15 22:41:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2008-07-15 22:41:51 +0000 |
commit | 34a73848030ad7f50ac50ca975d8846d5616b65a (patch) | |
tree | 8fb8cffe4b9632e62899c5148e688f89c65e1920 | |
parent | 4eb223bcf4ccc0847b62ae80aeabafd1c34209af (diff) | |
download | gpsd-34a73848030ad7f50ac50ca975d8846d5616b65a.tar.gz |
No longer necessary to define LITTLE_ENDIAN_PROTOCOL.
All regression tests pass.
-rw-r--r-- | bits.h | 3 | ||||
-rw-r--r-- | evermore.c | 1 | ||||
-rw-r--r-- | italk.c | 1 | ||||
-rw-r--r-- | navcom.c | 1 | ||||
-rw-r--r-- | rtcm3.c | 12 | ||||
-rw-r--r-- | ubx.c | 1 | ||||
-rw-r--r-- | zodiac.c | 1 |
7 files changed, 5 insertions, 15 deletions
@@ -4,8 +4,7 @@ * * These macros extract bytes, words, longwords, floats or doubles from * a message that contains these items in either MSB-first or LSB-first - * byte order. To specify which, define one of LITTLE_ENDIAN_PROTOCOL - * or BIG_ENDIAN_PROTOCOL before including this header. + * byte order. * * By defining the GET_ORIGIN and PUT_ORIGIN macros before including * this header, it's possible to change the origin of the indexing. @@ -126,7 +126,6 @@ #include "gpsd.h" #if defined(EVERMORE_ENABLE) && defined(BINARY_ENABLE) -#define LITTLE_ENDIAN_PROTOCOL #define GET_ORIGIN 1 #define PUT_ORIGIN 0 #include "bits.h" @@ -16,7 +16,6 @@ #include "gpsd.h" #if defined(ITRAX_ENABLE) && defined(BINARY_ENABLE) -#define LITTLE_ENDIAN_PROTOCOL #include "bits.h" #include "italk.h" @@ -46,7 +46,6 @@ #include "gpsd.h" #if defined(NAVCOM_ENABLE) && defined(BINARY_ENABLE) -#define LITTLE_ENDIAN_PROTOCOL #include "bits.h" /* Have data which is 24 bits long */ @@ -449,20 +449,16 @@ void rtcm3_unpack(/*@out@*/struct rtcm3_t *tp, char *buf) assert(msg->preamble == 0xD3); assert(msg->version == 0x00); + tp->length = getbeuw(buf, 1) & ~0xCF00; + tp->type = getbeuw(buf, 3) >> 4; - // FIXME: bitfield extraction of the type field seems to fail. - (void)printf("%s: type=%d length=%d, computed length %d, computed type %d\n", - gpsd_hexdump(buf, 6), - msg->type, msg->length, - getbeuw(buf, 1), getbeuw(buf, 3) >> 4); - - // FIXME: Decoding of packet content goes here + // FIXME: More decoding of packet content goes here } void rtcm3_dump(struct rtcm3_t *rtcm, /*@out@*/char buf[], size_t buflen) /* dump the contents of a parsed RTCM104 message */ { - // (void)snprintf(buf, buflen, "%u (%u):\n", rtcm->type, rtcm->length); + (void)snprintf(buf, buflen, "%u (%u):\n", rtcm->type, rtcm->length); // FIXME: More dumping of packet contents goes here */ } @@ -18,7 +18,6 @@ #if defined(UBX_ENABLE) && defined(BINARY_ENABLE) #include "ubx.h" -#define LITTLE_ENDIAN_PROTOCOL #include "bits.h" /* @@ -11,7 +11,6 @@ #include "gpsd_config.h" #include "gpsd.h" -#define LITTLE_ENDIAN_PROTOCOL #include "bits.h" #ifdef ZODIAC_ENABLE |