Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
e142b2b7
Commit
e142b2b7
authored
Jul 21, 2023
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEMP: some link_sweep debugging and (commented out) test lines
parent
168f5e44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
wrh-servo.c
proto-ext-common/wrh-servo.c
+11
-0
No files found.
proto-ext-common/wrh-servo.c
View file @
e142b2b7
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <ppsi/ppsi.h>
#include <ppsi/ppsi.h>
// #include "wrs-constants.h"
// #include "wrs-constants.h"
#include "../proto-standard/common-fun.h"
#include "../proto-standard/common-fun.h"
#include "board.h"
#if CONFIG_ARCH_IS_WRS
#if CONFIG_ARCH_IS_WRS
#include <libwr/shmem.h>
#include <libwr/shmem.h>
...
@@ -53,6 +54,8 @@ int wrh_servo_init(struct pp_instance *ppi)
...
@@ -53,6 +54,8 @@ int wrh_servo_init(struct pp_instance *ppi)
pp_servo_init
(
ppi
);
// Initialize the standard servo data
pp_servo_init
(
ppi
);
// Initialize the standard servo data
pp_printf
(
"lock sweep: %d
\n
"
,
lock_sweep
());
/* shmem lock */
/* shmem lock */
wrs_shm_write
(
ppsi_head
,
WRS_SHM_WRITE_BEGIN
);
wrs_shm_write
(
ppsi_head
,
WRS_SHM_WRITE_BEGIN
);
...
@@ -274,6 +277,14 @@ static int __wrh_servo_update(struct pp_instance *ppi)
...
@@ -274,6 +277,14 @@ static int __wrh_servo_update(struct pp_instance *ppi)
break
;
break
;
case
WRH_SYNC_NSEC
:
case
WRH_SYNC_NSEC
:
// if (lock_sweep()) {
// WRH_OPER()->adjust_counters(0, offset_ticks + s->clock_period_ps);
// setState(ppi,WRH_SYNC_NSEC);
// pp_printf("ls: %d %d\n", offset_ticks, s->clock_period_ps);
// } else {
// WRH_OPER()->adjust_counters(0, offset_ticks);
// setState(ppi,WRH_SYNC_PHASE);
// }
WRH_OPER
()
->
adjust_counters
(
0
,
offset_ticks
);
WRH_OPER
()
->
adjust_counters
(
0
,
offset_ticks
);
gs
->
flags
|=
PP_SERVO_FLAG_WAIT_HW
;
gs
->
flags
|=
PP_SERVO_FLAG_WAIT_HW
;
setState
(
ppi
,
WRH_SYNC_PHASE
);
setState
(
ppi
,
WRH_SYNC_PHASE
);
...
...
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