diff --git a/groundStation/src/backend/backend.c b/groundStation/src/backend/backend.c index 15e08b2b87f373c6600736d4915d1b3aa318c0fc..f56b7669825039c8dd38f53a0e2e4a33c81fcba0 100644 --- a/groundStation/src/backend/backend.c +++ b/groundStation/src/backend/backend.c @@ -671,12 +671,16 @@ static void client_recv(int fd) { write(fd, buffer, strlen(buffer)); } } - } else { if(clientAddPendResponses(fd, packet) == -1) { warnx("Ran out of room! Consider increasing CLIENT_MAX_PENDING_RESPONSES!\n"); } else { int datalen = (packet[6] << 8) | (packet[5]); + printf("sending %lf '", getFloat(packet, 7)); + for(int i = 0; i < datalen + 8; ++i) { + printf(" 0x%x", (signed) packet[i]); + } + printf("'\n"); writeQuad((char *) packet, datalen +8); } } diff --git a/groundStation/src/backend/commands.c b/groundStation/src/backend/commands.c index 11e68405ce9ad3f6a72d52e5d26f9522f17eec24..d1efa7e38e551784baca1124158b768b06b2ec90 100644 --- a/groundStation/src/backend/commands.c +++ b/groundStation/src/backend/commands.c @@ -440,7 +440,6 @@ struct MessageType MessageTypes[MAX_TYPE] = // Function pointer &resprollangle }, - // resp yaw setpoint subtype { // ID diff --git a/groundStation/src/cli/cli_setpid.c b/groundStation/src/cli/cli_setpid.c index 7347ab72d574a52d4de4b3778c90967f69ce089a..b0ed03cf1b31b0652c5b617a342cebb422250274 100644 --- a/groundStation/src/cli/cli_setpid.c +++ b/groundStation/src/cli/cli_setpid.c @@ -18,10 +18,10 @@ int cli_setpid(struct backend_conn * conn, int argc, char **argv) { {"roll", no_argument, &setRoll, 1}, {"pitch", no_argument, &setPitch, 1}, {"yaw", no_argument, &setYaw, 1}, - {"rollv", no_argument, &setYawV, 1}, - {"pitchv", no_argument, &setYawV, 1}, + {"rollv", no_argument, &setRollV, 1}, + {"pitchv", no_argument, &setPitchV, 1}, {"yawv", no_argument, &setYawV, 1}, - {"height", no_argument, &setHeight, 1}, + {"height", no_argument, &setHeight, 1}, {"lat", no_argument, &setLat, 1}, {"long", no_argument, &setLong, 1}, {0, 0, 0, 0} @@ -62,9 +62,20 @@ int cli_setpid(struct backend_conn * conn, int argc, char **argv) { pid_data.controller = PID_YAW; } else if (setPitch) { pid_data.controller = PID_PITCH; + } else if (setRollV) { + pid_data.controller = PID_ROLL_VELOCITY; + } else if (setPitchV) { + pid_data.controller = PID_PITCH_VELOCITY; + } else if (setYawV) { + pid_data.controller = PID_YAW_VELOCITY; + } else if (setHeight) { + pid_data.controller = PID_HEIGHT; + } else if (setLong) { + pid_data.controller = PID_LONG; + } else if (setLat) { + pid_data.controller = PID_LAT; } - frontend_setpid(conn, &pid_data, mask); return 0; } \ No newline at end of file