Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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 Switch - Software
Commits
d4c55017
Commit
d4c55017
authored
May 04, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/wr_mon: bugfixes, added servo iteration counter
parent
a3345b52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
+9
-13
Makefile
userspace/wr_mon/Makefile
+4
-4
wr_mon.c
userspace/wr_mon/wr_mon.c
+5
-9
No files found.
userspace/wr_mon/Makefile
View file @
d4c55017
...
...
@@ -10,13 +10,13 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP
=
$(CROSS_COMPILE)
objdump
MON_OBJS
=
wr_mon.o term.o
MON_OBJS
=
wr_mon.o term.o
../ptp-noposix/libptpnetif/hal_client.o
CFLAGS
+=
-O2
-DDEBUG
-I
$(LINUX)
/include
-I
../include
\
-I
../
libptpnetif
-I
..
/wrsw_hal
-I
../mini-rpc
-I
../
ptp-noposix/libptpnetif
-I
../ptp-noposix
/wrsw_hal
-I
../mini-rpc
LDFLAGS
=
-L
$(WR_INSTALL_ROOT)
/lib
-L
../mini-rpc
-L
../libptpnetif
\
-lptpnetif
-lminipc
LDFLAGS
=
-L
$(WR_INSTALL_ROOT)
/lib
-L
../mini-rpc
-L
../
ptp-noposix/
libptpnetif
\
-lminipc
BINARY
=
wr_mon
...
...
userspace/wr_mon/wr_mon.c
View file @
d4c55017
...
...
@@ -26,6 +26,7 @@ void init()
exit
(
-
1
);
}
term_init
();
halexp_query_ports
(
&
port_list
);
}
...
...
@@ -74,7 +75,7 @@ void show_servo()
{
ptpdexp_sync_state_t
ss
;
minipc_call
(
ptp_ch
,
200
,
&
__rpcdef_get_sync_state
,
0
,
&
ss
);
minipc_call
(
ptp_ch
,
200
0
,
&
__rpcdef_get_sync_state
,
&
ss
);
term_cprintf
(
C_BLUE
,
"
\n\n
Synchronization status:
\n\n
"
);
...
...
@@ -132,11 +133,9 @@ void show_servo()
term_cprintf
(
C_GREY
,
"Skew: "
);
term_cprintf
(
C_WHITE
,
"%.2f nsec
\n
"
,
ss
.
cur_skew
/
1000
.
0
);
}
void
show_menu
()
{
term_pcprintf
(
30
,
1
,
C_BLUE
,
"q = quit, t = toggle tracking"
);
term_cprintf
(
C_GREY
,
"Servo update counter: "
);
term_cprintf
(
C_WHITE
,
"%lld times
\n
"
,
ss
.
update_count
);
}
int
track_onoff
=
1
;
...
...
@@ -144,13 +143,10 @@ int track_onoff = 1;
void
show_screen
()
{
term_clear
();
term_pcprintf
(
1
,
1
,
C_BLUE
,
"WR Switch Sync Monitor v
0.1
"
);
term_pcprintf
(
1
,
1
,
C_BLUE
,
"WR Switch Sync Monitor v
1.0 [q = quit]
"
);
show_ports
();
show_servo
();
show_menu
();
// handle_toggle();
}
main
()
...
...
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