diff --git a/groundStation/src/microcart_cli.c b/groundStation/src/backend.c similarity index 98% rename from groundStation/src/microcart_cli.c rename to groundStation/src/backend.c index c9527e92e1841e5467f1511170008b4f91342beb..4d752c17cd4f3f91710dce7e8c1116d9f01c654a 100644 --- a/groundStation/src/microcart_cli.c +++ b/groundStation/src/backend.c @@ -334,7 +334,7 @@ void sendStartPacket() { } void sendVrpnPacket(struct ucart_vrpn_TrackerData *info) { - int pSize = sizeof(info) + 8; + int pSize = sizeof(ucart_vrpn_TrackerData) + 8; int n; unsigned char packet[pSize]; currMessageID++; @@ -344,9 +344,9 @@ void sendVrpnPacket(struct ucart_vrpn_TrackerData *info) { //TODO Figure out Packet ID with this new ucar_vrpn_TrackerData struct packet[3] = (currMessageID & 0x000000ff); // MSG ID(1) packet[4] = ((currMessageID >> 8) & 0x000000ff); // MSG ID(2) - packet[5] = (sizeof(info) & 0x000000ff); // DATALEN(1) - packet[6] = ((sizeof(info) >> 8) & 0x00000ff); // DATALEN(2) - memcpy(&packet[7], &info, sizeof(info)); + packet[5] = (sizeof(ucart_vrpn_TrackerData) & 0x000000ff); // DATALEN(1) + packet[6] = ((sizeof(ucart_vrpn_TrackerData) >> 8) & 0x00000ff); // DATALEN(2) + memcpy(&packet[7], &info, sizeof(ucart_vrpn_TrackerData)); char checksum = 0; int i;