Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
85
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
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
Projects
White Rabbit Switch - Software
Commits
88c053bd
Commit
88c053bd
authored
1 year ago
by
Adam Wujek
Browse files
Options
Downloads
Patches
Plain Diff
userspace/tools/wr_mon: add key command to refresh or freeze the output
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
8cce704c
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
userspace/tools/wr_mon.c
+16
-2
16 additions, 2 deletions
userspace/tools/wr_mon.c
with
16 additions
and
2 deletions
userspace/tools/wr_mon.c
+
16
−
2
View file @
88c053bd
...
...
@@ -1351,7 +1351,7 @@ void show_all(void)
term_clear
();
term_pcprintf
(
1
,
1
,
C_BLUE
,
"WR Switch Sync Monitor "
);
term_cprintf
(
C_WHITE
,
"%s"
,
__GIT_VER__
);
term_cprintf
(
C_BLUE
,
" [q
=
quit,
t =
toggle servo,
c =
extra ppsi params]
\n\n
"
);
term_cprintf
(
C_BLUE
,
" [q
=
quit,
r=refresh,f=freeze,t=
toggle servo,
c=
extra ppsi params]
\n\n
"
);
}
hal_alive
=
(
hal_head
->
pid
&&
(
kill
(
hal_head
->
pid
,
0
)
==
0
))
...
...
@@ -1403,6 +1403,7 @@ int main(int argc, char *argv[])
{
int
opt
;
int
usecolor
=
1
;
int
gui_freeze
=
0
;
/* freeze the GUI */
/* try a pps_gen based approach */
uint64_t
last_seconds
=
0
;
...
...
@@ -1488,9 +1489,22 @@ int main(int argc, char *argv[])
last_seconds
=
0
;
break
;
case
'f'
:
gui_freeze
=
!
gui_freeze
;
if
(
gui_freeze
)
{
term_cprintf
(
C_RED
,
"GUI Frozen!
\n
"
);
fflush
(
stdout
);
}
last_seconds
=
0
;
break
;
case
'q'
:
goto
quit
;
case
'r'
:
/* force refresh */
last_seconds
=
0
;
break
;
case
't'
:
toggle_tracking
();
/* Force refresh */
...
...
@@ -1500,7 +1514,7 @@ int main(int argc, char *argv[])
}
shw_pps_gen_read_time
(
&
seconds
,
&
nanoseconds
);
if
(
seconds
!=
last_seconds
)
{
if
(
!
gui_freeze
&&
seconds
!=
last_seconds
)
{
read_servo
();
read_gm_info
();
read_hal
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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