Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
41cc2ac8
Commit
41cc2ac8
authored
7 years ago
by
ucart
Browse files
Options
Downloads
Patches
Plain Diff
added prints so we know when we are in the middle of logging
parent
1ffc89e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
groundStation/src/backend/backend.c
+11
-3
11 additions, 3 deletions
groundStation/src/backend/backend.c
with
11 additions
and
3 deletions
groundStation/src/backend/backend.c
+
11
−
3
View file @
41cc2ac8
...
...
@@ -764,6 +764,7 @@ static void client_recv(int fd) {
static
void
quad_recv
()
{
static
unsigned
char
respBuf
[
CMD_MAX_LENGTH
];
static
size_t
respBufLen
;
static
int
receiving_logs
;
struct
metadata
m
;
uint8_t
data
[
CMD_MAX_LENGTH
];
...
...
@@ -836,7 +837,13 @@ static void quad_recv() {
quadlog_file
=
fopen
(
log_file
,
"a"
);
quadlog_file_open
=
1
;
}
//printf("(Quad) : Log found\n");
if
(
!
receiving_logs
)
{
printf
(
"(Quad) : Log found
\n
"
);
receiving_logs
=
1
;
}
else
{
printf
(
"."
);
fflush
(
0
);
}
fwrite
((
char
*
)
data
,
sizeof
(
char
),
m
.
data_len
,
quadlog_file
);
break
;
case
RESPPARAM_ID
:
...
...
@@ -851,7 +858,8 @@ static void quad_recv() {
fclose
(
quadlog_file
);
quadlog_file_open
=
0
;
}
printf
(
"(Quad) : Log End found
\n
"
);
printf
(
"
\n
(Quad) : Log End found
\n
"
);
receiving_logs
=
0
;
break
;
default:
printf
(
"(Backend): message type %d ignored from quad
\n
"
,
m
.
msg_type
);
...
...
@@ -953,7 +961,7 @@ void findTimeDiff(int respID) {
char
*
create_log_name
(
char
*
buffer
,
size_t
max
)
{
static
const
char
*
prefix
=
"logs"
;
static
size_t
num_logs
=
0
;
static
const
char
*
format_string
=
"%
Y-%m-%e
_%-l:%M"
;
static
const
char
*
format_string
=
"%
F
_%-l:%M"
;
time_t
curr_time
;
char
c_time_string
[
256
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment