Skip to content
Snippets Groups Projects
Commit 4da4b1e7 authored by MicroCART's avatar MicroCART
Browse files

finished log end command testing

parent 75f3c300
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
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