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
63899c73
Commit
63899c73
authored
Dec 04, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr: trivial: remove duplicate variable
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
4dae1e34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
wrs-ipcserver.c
arch-wrs/wrs-ipcserver.c
+3
-7
wr-servo.c
proto-ext-whiterabbit/wr-servo.c
+1
-4
No files found.
arch-wrs/wrs-ipcserver.c
View file @
63899c73
...
...
@@ -10,7 +10,6 @@
#include <hal_exports.h>
#include <wr-api.h>
extern
int
servo_state_valid
;
extern
ptpdexp_sync_state_t
cur_servo_state
;
/* minipc Encoding of the supported commands */
...
...
@@ -39,12 +38,9 @@ static struct minipc_pd __rpcdef_cmd = {
/* Fill struct ptpdexp_sync_state_t with current servo state */
static
int
wrsipc_get_sync_state
(
ptpdexp_sync_state_t
*
state
)
{
if
(
BUILT_WITH_WHITERABBIT
&&
servo_state_valid
)
{
memcpy
(
state
,
&
cur_servo_state
,
sizeof
(
ptpdexp_sync_state_t
));
state
->
valid
=
1
;
}
else
state
->
valid
=
0
;
if
(
!
BUILT_WITH_WHITERABBIT
)
cur_servo_state
.
valid
=
0
;
/* unneeded, likely */
memcpy
(
state
,
&
cur_servo_state
,
sizeof
(
*
state
));
return
0
;
}
...
...
proto-ext-whiterabbit/wr-servo.c
View file @
63899c73
...
...
@@ -21,8 +21,7 @@ const char *servo_state_str[] = {
[
WR_WAIT_OFFSET_STABLE
]
=
"OFFSET_STABLE"
,
};
int
servo_state_valid
=
0
;
/* FIXME: why? */
ptpdexp_sync_state_t
cur_servo_state
;
/* FIXME: why? */
ptpdexp_sync_state_t
cur_servo_state
;
/* Exported with mini-rpc */
static
int
tracking_enabled
=
1
;
/* FIXME: why? */
...
...
@@ -141,7 +140,6 @@ static int got_sync = 0;
void
wr_servo_reset
()
{
cur_servo_state
.
valid
=
0
;
servo_state_valid
=
0
;
}
int
wr_servo_init
(
struct
pp_instance
*
ppi
)
...
...
@@ -183,7 +181,6 @@ int wr_servo_init(struct pp_instance *ppi)
strcpy
(
cur_servo_state
.
slave_servo_state
,
"Uninitialized"
);
servo_state_valid
=
1
;
cur_servo_state
.
valid
=
1
;
cur_servo_state
.
update_count
=
0
;
...
...
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