Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
Software for White Rabbit PTP Core
Commits
9a1ef51f
Commit
9a1ef51f
authored
Jun 29, 2023
by
Adam Wujek
Committed by
Tristan Gingold
Jul 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/task-stats: add extra servo stats to stat command if CONFIG_MONITOR_SERVO_ERR
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
56a7d702
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
task-stats.c
lib/task-stats.c
+13
-1
monitor_ppsi.c
monitor/monitor_ppsi.c
+13
-9
No files found.
lib/task-stats.c
View file @
9a1ef51f
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2021 CERN
* Copyright (C) 2021
-2023
CERN
* Author: Wesley W. Terpstra <w.terpstra@gsi.de>
*
* Released according to the GNU GPL, version 2 or any later version.
...
...
@@ -21,6 +21,13 @@
#include "wrc_global.h"
#include "shell.h"
#ifdef CONFIG_CMD_MONITOR_SERVO_ERR
#define HAS_MONITOR_SERVO_ERR 1
#else
#define HAS_MONITOR_SERVO_ERR 0
#endif
/* internal "last", exported to shell command */
uint32_t
wrc_stats_last
;
...
...
@@ -119,6 +126,11 @@ int wrc_log_stats(void)
pp_printf
(
"setp:%d "
,
(
int
)
wrh_servo
->
cur_setpoint_ps
);
pp_printf
(
"ucnt:%d "
,
(
int
)
s
->
update_count
);
pp_printf
(
"bslide:%d "
,
ep_get_bitslide
(
&
wrc_endpoint_dev
));
if
(
HAS_MONITOR_SERVO_ERR
)
{
pp_printf
(
"ses:%u "
,
wrh_servo
->
n_err_state
);
pp_printf
(
"seo:%u "
,
wrh_servo
->
n_err_offset
);
pp_printf
(
"sedr:%u "
,
wrh_servo
->
n_err_delta_rtt
);
}
}
pp_printf
(
"hd:%d md:%d ad:%d "
,
spll_get_dac
(
-
1
),
spll_get_dac
(
0
),
...
...
monitor/monitor_ppsi.c
View file @
9a1ef51f
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2021 CERN
* Copyright (C) 2021
-2023
CERN
* Author: Adam Wujek
*
* Released according to the GNU GPL, version 2 or any later version.
...
...
@@ -33,6 +33,11 @@
#error ("WRPC monitor requires full version of pp_printf implementation")
#endif
#ifdef CONFIG_CMD_MONITOR_SERVO_ERR
#define HAS_MONITOR_SERVO_ERR 1
#else
#define HAS_MONITOR_SERVO_ERR 0
#endif
#define WRC_MONITOR_REFRESH_PERIOD (1 * TICS_PER_SECOND)
...
...
@@ -467,11 +472,12 @@ static void print_aux_data(void)
static
void
print_servo_description
(
void
)
{
#if CONFIG_MONITOR_SERVO_ERR
pcprintf
(
19
,
45
,
C_BLUE
,
"err state:"
);
pprintf
(
20
,
45
,
"err offset:"
);
pprintf
(
21
,
45
,
"err delta:"
);
#endif
if
(
HAS_MONITOR_SERVO_ERR
)
{
pcprintf
(
19
,
45
,
C_BLUE
,
"err state:"
);
pprintf
(
20
,
45
,
"err offset:"
);
pprintf
(
21
,
45
,
"err delta:"
);
}
pcprintf
(
16
,
1
,
C_BLUE
,
"Servo state:
\n
"
);
...
...
@@ -552,13 +558,11 @@ static void print_servo_data(struct pp_instance *ppi)
if
(
wrh_servo
&&
!
wrh_servo
->
tracking_enabled
)
cprintf
(
C_RED
,
"Tracking forcibly disabled
\n
"
);
#if CONFIG_MONITOR_SERVO_ERR
if
(
wrh_servo
)
{
if
(
HAS_MONITOR_SERVO_ERR
&&
wrh_servo
)
{
pcprintf
(
19
,
60
,
C_WHITE
,
" %u "
,
wrh_servo
->
n_err_state
);
pprintf
(
20
,
60
,
" %u "
,
wrh_servo
->
n_err_offset
);
pprintf
(
21
,
60
,
" %u "
,
wrh_servo
->
n_err_delta_rtt
);
}
#endif
/* +- Timing parameters --------------------------------------------------------- */
...
...
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