Skip to content
Snippets Groups Projects
Commit e6c16387 authored by GroundStation's avatar GroundStation
Browse files

Fixed height/long

parent e01d9b94
No related branches found
No related tags found
No related merge requests found
...@@ -638,7 +638,7 @@ static void client_recv(int fd) { ...@@ -638,7 +638,7 @@ static void client_recv(int fd) {
if (tracker == NULL) { if (tracker == NULL) {
char * dummy = TD_MAGIC " 1.0 2.0 3.0 4.0 5.0 6.0\n"; char * dummy = TD_MAGIC " 1.0 2.0 3.0 4.0 5.0 6.0\n";
write(fd, dummy, strlen(dummy)); write(fd, dummy, strlen(dummy));
}else if (!ucart_vrpn_tracker_getData(tracker, &td)) { }else if (ucart_vrpn_tracker_getData(tracker, &td)) {
write(fd, TD_MAGIC " ERROR\n", strlen(TD_MAGIC " ERROR\n")); write(fd, TD_MAGIC " ERROR\n", strlen(TD_MAGIC " ERROR\n"));
} else { } else {
/* more than sufficient buffer */ /* more than sufficient buffer */
...@@ -648,9 +648,9 @@ static void client_recv(int fd) { ...@@ -648,9 +648,9 @@ static void client_recv(int fd) {
if (snprintf(buffer, if (snprintf(buffer,
2048, 2048,
TD_MAGIC " %lf %lf %lf %lf %lf %lf\n", TD_MAGIC " %lf %lf %lf %lf %lf %lf\n",
td.x,
td.y,
td.z, td.z,
td.y,
td.x,
td.pitch, td.pitch,
td.roll, td.roll,
td.yaw) >= 2048) { td.yaw) >= 2048) {
...@@ -659,7 +659,7 @@ static void client_recv(int fd) { ...@@ -659,7 +659,7 @@ static void client_recv(int fd) {
warnx("Increase format buffer size, output was too long!"); warnx("Increase format buffer size, output was too long!");
write(fd, TD_MAGIC " ERROR\n", strlen(TD_MAGIC " ERROR\n")); write(fd, TD_MAGIC " ERROR\n", strlen(TD_MAGIC " ERROR\n"));
} }
write(fd, buffer, strlen(buffer));
} }
} }
......
...@@ -26,7 +26,7 @@ int frontend_track( ...@@ -26,7 +26,7 @@ int frontend_track(
} }
if (strncmp(line, MAGIC " ERROR", strlen(MAGIC " ERROR")) == 0) { if (strncmp(line, MAGIC " ERROR", strlen(MAGIC " ERROR")) == 0) {
warn("Backend returned an error"); warnx("Backend returned an error: %s", strstr(line, "ERROR"));
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment