Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stm32_libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
humanoides
tools
stm32_libraries
Commits
581a7059
Commit
581a7059
authored
5 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Added some type casts to avoid compilation errors in C++.
Renamed the delete variable to avoid problems in C++.
parent
160f7bf2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dynamixel_manager/src/dyn_manager.c
+10
-10
10 additions, 10 deletions
dynamixel_manager/src/dyn_manager.c
with
10 additions
and
10 deletions
dynamixel_manager/src/dyn_manager.c
+
10
−
10
View file @
581a7059
...
...
@@ -89,7 +89,7 @@ unsigned char dyn_manager_id_present(unsigned char num,unsigned char *ids,unsign
void
dyn_manager_delete_op_single_master
(
TDynManager
*
manager
,
unsigned
char
master_index
,
OP_HANDLE
*
op
)
{
unsigned
char
j
,
k
,
del
ete
;
unsigned
char
j
,
k
,
del
;
if
(
op
->
op_index
[
master_index
]
!=
0xFF
)
{
...
...
@@ -197,11 +197,11 @@ void dyn_manager_delete_op_single_master(TDynManager *manager,unsigned char mast
else
op
->
op_index
[
master_index
]
=
0xFF
;
// remove handles
del
ete
=
0x01
;
del
=
0x01
;
for
(
j
=
0
;
j
<
manager
->
num_masters
;
j
++
)
if
(
op
->
op_index
[
j
]
!=
0xFF
)
del
ete
=
0x00
;
if
(
del
ete
==
0x01
)
del
=
0x00
;
if
(
del
==
0x01
)
{
op
->
op_type
=
no_op
;
manager
->
num_ops
--
;
...
...
@@ -470,14 +470,14 @@ OP_HANDLE *dyn_manager_single_op_new(TDynManager *manager,unsigned char mode,uns
if
((
op_handle
=
dyn_manager_get_free_op_handle
(
manager
))
==
0x00000000
)
return
0x00000000
;
if
(
mode
==
DYN_MANAGER_READ
||
mode
==
DYN_MANAGER_WRITE
)
op_handle
->
op_type
=
DYN_MANAGER_SINGLE
|
mode
;
op_handle
->
op_type
=
(
op_type_t
)(
DYN_MANAGER_SINGLE
|
mode
)
;
else
return
0x00000000
;
current_op_index
=
manager
->
operations
[
master_index
].
num_single_op
;
if
(
current_op_index
<
DYN_MANAGER_MAX_NUM_SINGLE_OP
)
{
current_op
=&
manager
->
operations
[
master_index
].
single_op
[
current_op_index
];
current_op
->
common
.
operation
=
DYN_MANAGER_SINGLE
|
mode
;
current_op
->
common
.
operation
=
(
op_type_t
)(
DYN_MANAGER_SINGLE
|
mode
)
;
current_op
->
common
.
op_handle
=
op_handle
;
current_op
->
id
=
id
;
current_op
->
address
=
address
;
...
...
@@ -549,7 +549,7 @@ OP_HANDLE *dyn_manager_sync_op_new(TDynManager *manager,unsigned char mode,unsig
if
((
op_handle
=
dyn_manager_get_free_op_handle
(
manager
))
==
0x00000000
)
return
0x00000000
;
if
(
mode
==
DYN_MANAGER_READ
||
mode
==
DYN_MANAGER_WRITE
)
op_handle
->
op_type
=
DYN_MANAGER_SYNC
|
mode
;
op_handle
->
op_type
=
(
op_type_t
)(
DYN_MANAGER_SYNC
|
mode
)
;
else
return
0x00000000
;
for
(
i
=
0
;
i
<
num
;
i
++
)
...
...
@@ -568,7 +568,7 @@ OP_HANDLE *dyn_manager_sync_op_new(TDynManager *manager,unsigned char mode,unsig
if
(
dyn_manager_id_present
(
current_op
->
num_devices
,
current_op
->
ids
,
ids
[
i
])
==
0x00
)
{
op_handle
->
op_index
[
master_index
]
=
current_op_index
;
current_op
->
common
.
operation
=
DYN_MANAGER_SYNC
|
mode
;
current_op
->
common
.
operation
=
(
op_type_t
)(
DYN_MANAGER_SYNC
|
mode
)
;
current_op
->
common
.
op_handle
=
op_handle
;
current_op
->
address
=
address
;
current_op
->
length
=
length
;
...
...
@@ -713,7 +713,7 @@ OP_HANDLE *dyn_manager_bulk_op_new(TDynManager *manager,unsigned char mode,unsig
if
((
op_handle
=
dyn_manager_get_free_op_handle
(
manager
))
==
0x00000000
)
return
0x00000000
;
if
(
mode
==
DYN_MANAGER_READ
||
mode
==
DYN_MANAGER_WRITE
)
op_handle
->
op_type
=
DYN_MANAGER_BULK
|
mode
;
op_handle
->
op_type
=
(
op_type_t
)(
DYN_MANAGER_BULK
|
mode
)
;
else
return
0x00000000
;
for
(
i
=
0
;
i
<
num
;
i
++
)
...
...
@@ -732,7 +732,7 @@ OP_HANDLE *dyn_manager_bulk_op_new(TDynManager *manager,unsigned char mode,unsig
if
(
dyn_manager_id_present
(
current_op
->
num_devices
,
current_op
->
ids
,
ids
[
i
])
==
0x00
)
{
op_handle
->
op_index
[
master_index
]
=
current_op_index
;
current_op
->
common
.
operation
=
DYN_MANAGER_BULK
|
mode
;
current_op
->
common
.
operation
=
(
op_type_t
)(
DYN_MANAGER_BULK
|
mode
)
;
current_op
->
common
.
op_handle
=
op_handle
;
current_op
->
address
[
current_op
->
num_devices
]
=
address
[
i
];
current_op
->
length
[
current_op
->
num_devices
]
=
length
[
i
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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