From b0d5345cb36ad7dc82eb6fccd9521d1f09d4f6b7 Mon Sep 17 00:00:00 2001 From: Martin Miller Date: Sun, 19 Mar 2017 15:16:01 -0500 Subject: Fix img handling --- src/main.cpp | 9 ++++----- src/main.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index f1f2cd8..f1f192c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,7 +43,7 @@ covCallback(const message &msg, State &mu, const Quaterniond &q) } void -imgCallback(const message *msg) +imgCallback(const message &msg) { return; } @@ -127,11 +127,10 @@ parseLine(char *line, message *data) &data->utm.up); } else if (!strcmp(msg_type,"IMG")) { data->msg_type = IMG; - char *lfn,*rfn; + char *lfn; lfn = strsep(&line, ","); sscanf(lfn, "%s", &data->image_names); - rfn = strsep(&line, ","); - sscanf(rfn, "%s", &data->image_names+1); + sscanf(line, "%s", &data->image_names[1]); } else if (!strcmp(msg_type,"inscovs")) { double pos[9]; double att[9]; @@ -242,7 +241,7 @@ while (scanf("%s", line)!=EOF) { break; case IMG: - imgCallback(&msg); + imgCallback(msg); break; case INSPVAS: diff --git a/src/main.h b/src/main.h index 9e1b656..1f29309 100644 --- a/src/main.h +++ b/src/main.h @@ -21,7 +21,7 @@ int parseLine(char *line, message *msg); timestamp update_dt(const timestamp t, timestamp *t_old); void covCallback(const message &msg, Matrix &P, const Quaterniond &q); -void imgCallback(const message *msg); +void imgCallback(const message &msg); void imuCallback(const message &msg, State &mu, const Quaterniond &q, const timestamp dt); void pvaCallback(const message &msg, Matrix &X, Quaterniond &q); void utmCallback(const message &msg, State &mu); -- cgit v1.1