diff --git a/groundStation/src/backend/backend.c b/groundStation/src/backend/backend.c index 068544d2ed16e68d62989f16ab6274ab6b357c07..f025c009da060244c223012b1e253575344884f7 100644 --- a/groundStation/src/backend/backend.c +++ b/groundStation/src/backend/backend.c @@ -751,13 +751,13 @@ static void quad_recv() { return; } respBufLen += respLen; - +/* printf("packetFromQuad = '"); for(int i = 0; i < (int)respBufLen; ++i) { printf(" %.2x ", respBuf[i]); } printf("'\n"); - +*/ while(respBufLen){ datalen = DecodePacket(&m, data, CMD_MAX_LENGTH, respBuf, respBufLen); if (datalen == -1) { @@ -802,7 +802,8 @@ static void quad_recv() { create_log_name(log_file, 256); printf("New log file created: '%s'\n", log_file); quadlog_file = fopen(log_file, "a"); - } + quadlog_file_open = 1; + } /* something like this */ printf("(Quad) : Log found\n"); fwrite((char *) data, sizeof(char), m.data_len, quadlog_file); @@ -820,6 +821,7 @@ static void quad_recv() { fclose(quadlog_file); quadlog_file_open = 0; } + printf("(Quad) : Log End found\n"); break; default: printf("(Backend): message type %d ignored from quad\n", m.msg_type); @@ -926,4 +928,4 @@ char * create_log_name(char * buffer, size_t max) { } return buffer; -} \ No newline at end of file +}