Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Trigger Distribution
Commits
4a86a4f6
Commit
4a86a4f6
authored
Oct 25, 2018
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd: improve log display
parent
db22eee3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
wrtd-rt-fd.c
software/firmware/fd/wrtd-rt-fd.c
+2
-1
wrtd-logging.c
software/tools/wrtd-logging.c
+24
-4
No files found.
software/firmware/fd/wrtd-rt-fd.c
View file @
4a86a4f6
...
...
@@ -359,7 +359,8 @@ static void do_output (struct wrtd_fd_channel *out)
}
}
else
{
/* Has been triggered. */
wrtd_log
(
WRTD_LOG_MSG_EV_CONSUMED
,
0
,
wrtd_log
(
WRTD_LOG_MSG_EV_CONSUMED
,
WRTD_LOG_CONSUMED_DONE
,
&
pq_ent
->
ev
,
NULL
);
pulse_queue_pop
(
q
);
...
...
software/tools/wrtd-logging.c
View file @
4a86a4f6
...
...
@@ -63,12 +63,33 @@ static void print_logging (struct wrtd_dev *wrtd, int n_read)
break
;
case
WRTD_LOG_MSG_EV_CONSUMED
:
printf
(
"consumed "
);
switch
(
log
.
reason
)
{
case
WRTD_LOG_CONSUMED_START
:
printf
(
"start "
);
break
;
case
WRTD_LOG_CONSUMED_DONE
:
printf
(
"done "
);
break
;
default:
printf
(
"%-5u "
,
log
.
reason
);
break
;
}
break
;
case
WRTD_LOG_MSG_EV_DISCARDED
:
printf
(
"discarded"
);
break
;
case
WRTD_LOG_MSG_EV_NETWORK
:
printf
(
"network "
);
switch
(
log
.
reason
)
{
case
WRTD_LOG_NETWORK_TX
:
printf
(
"network tx "
);
break
;
case
WRTD_LOG_NETWORK_RX
:
printf
(
"network rx "
);
break
;
default:
printf
(
"network %-7u"
,
log
.
reason
);
break
;
}
break
;
case
WRTD_LOG_MSG_LINK
:
printf
(
"link "
);
...
...
@@ -77,9 +98,8 @@ static void print_logging (struct wrtd_dev *wrtd, int n_read)
printf
(
"?%d"
,
log
.
type
);
break
;
}
printf
(
", reason: %2d"
,
log
.
reason
);
printf
(
", id: %.*s"
,
WRTD_ID_LEN
,
log
.
event
.
id
);
printf
(
", ev ts: "
);
printf
(
" id: %-8.*s"
,
WRTD_ID_LEN
,
log
.
event
.
id
);
printf
(
" ev ts: "
);
print_ts
(
&
log
.
event
.
ts
);
printf
(
"
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment