Mercurial > ublox > ublox8
changeset 78:3de43d6cacd6
dump-common: pass UBX message id to the callback
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Wed, 05 Feb 2020 11:07:03 -0500 |
parents | 44c7178eefac |
children | e2084f4098bf |
files | dump-common.h dump-ecef.c dump-sat.c dump-ubx.c print-state.c ubx.c ubx.h |
diffstat | 7 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dump-common.h Wed Feb 05 11:01:15 2020 -0500 +++ b/dump-common.h Wed Feb 05 11:07:03 2020 -0500 @@ -31,6 +31,7 @@ extern void process_ubx_message(const struct ubx_header *header, const uint8_t *raw, size_t len, + enum ubx_msg_id msgid, uint64_t tick); #endif
--- a/dump-ecef.c Wed Feb 05 11:01:15 2020 -0500 +++ b/dump-ecef.c Wed Feb 05 11:07:03 2020 -0500 @@ -24,6 +24,7 @@ void process_ubx_message(const struct ubx_header *header, const uint8_t *raw, size_t len, + enum ubx_msg_id msgid, uint64_t tick) { struct ubx_nav_posecef msg;
--- a/dump-sat.c Wed Feb 05 11:01:15 2020 -0500 +++ b/dump-sat.c Wed Feb 05 11:07:03 2020 -0500 @@ -24,6 +24,7 @@ void process_ubx_message(const struct ubx_header *header, const uint8_t *raw, size_t len, + enum ubx_msg_id msgid, uint64_t tick) { struct ubx_nav_sat *msg;
--- a/dump-ubx.c Wed Feb 05 11:01:15 2020 -0500 +++ b/dump-ubx.c Wed Feb 05 11:07:03 2020 -0500 @@ -26,6 +26,7 @@ void process_ubx_message(const struct ubx_header *header, const uint8_t *raw, size_t len, + enum ubx_msg_id msgid, uint64_t tick) { int ret;
--- a/print-state.c Wed Feb 05 11:01:15 2020 -0500 +++ b/print-state.c Wed Feb 05 11:07:03 2020 -0500 @@ -207,6 +207,7 @@ void process_ubx_message(const struct ubx_header *header, const uint8_t *raw, size_t len, + enum ubx_msg_id msgid, uint64_t tick) { static struct galileo_state galileo_state;
--- a/ubx.c Wed Feb 05 11:01:15 2020 -0500 +++ b/ubx.c Wed Feb 05 11:07:03 2020 -0500 @@ -139,6 +139,7 @@ const uint64_t tick, void(*f)(const struct ubx_header *, const uint8_t *, size_t, + enum ubx_msg_id, uint64_t)) { struct ubx_header hdr; @@ -162,7 +163,8 @@ } if (f) - f(&hdr, &buf[sizeof(hdr)], ubx_len, tick); + f(&hdr, &buf[sizeof(hdr)], ubx_len, + mkmsgid(hdr.class, hdr.id), tick); return true; }