summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2008-07-15 22:41:51 +0000
committerEric S. Raymond <esr@thyrsus.com>2008-07-15 22:41:51 +0000
commit34a73848030ad7f50ac50ca975d8846d5616b65a (patch)
tree8fb8cffe4b9632e62899c5148e688f89c65e1920
parent4eb223bcf4ccc0847b62ae80aeabafd1c34209af (diff)
downloadgpsd-34a73848030ad7f50ac50ca975d8846d5616b65a.tar.gz
No longer necessary to define LITTLE_ENDIAN_PROTOCOL.
All regression tests pass.
-rw-r--r--bits.h3
-rw-r--r--evermore.c1
-rw-r--r--italk.c1
-rw-r--r--navcom.c1
-rw-r--r--rtcm3.c12
-rw-r--r--ubx.c1
-rw-r--r--zodiac.c1
7 files changed, 5 insertions, 15 deletions
diff --git a/bits.h b/bits.h
index eb22a6ce..c73ac8b4 100644
--- a/bits.h
+++ b/bits.h
@@ -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.
diff --git a/evermore.c b/evermore.c
index 6f6d9477..396bb0c1 100644
--- a/evermore.c
+++ b/evermore.c
@@ -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"
diff --git a/italk.c b/italk.c
index e53930bf..a0e09f13 100644
--- a/italk.c
+++ b/italk.c
@@ -16,7 +16,6 @@
#include "gpsd.h"
#if defined(ITRAX_ENABLE) && defined(BINARY_ENABLE)
-#define LITTLE_ENDIAN_PROTOCOL
#include "bits.h"
#include "italk.h"
diff --git a/navcom.c b/navcom.c
index d0c8467b..572ef13b 100644
--- a/navcom.c
+++ b/navcom.c
@@ -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 */
diff --git a/rtcm3.c b/rtcm3.c
index 0b4bdb91..debd5860 100644
--- a/rtcm3.c
+++ b/rtcm3.c
@@ -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 */
}
diff --git a/ubx.c b/ubx.c
index f25d5c80..1dac3693 100644
--- a/ubx.c
+++ b/ubx.c
@@ -18,7 +18,6 @@
#if defined(UBX_ENABLE) && defined(BINARY_ENABLE)
#include "ubx.h"
-#define LITTLE_ENDIAN_PROTOCOL
#include "bits.h"
/*
diff --git a/zodiac.c b/zodiac.c
index b97529f8..349c3425 100644
--- a/zodiac.c
+++ b/zodiac.c
@@ -11,7 +11,6 @@
#include "gpsd_config.h"
#include "gpsd.h"
-#define LITTLE_ENDIAN_PROTOCOL
#include "bits.h"
#ifdef ZODIAC_ENABLE