Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dynamixel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
labrobotica
drivers
dynamixel
Commits
78fd21c2
Commit
78fd21c2
authored
2 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Called the function to set the serial port in the low latency mode.
parent
57cc9583
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
src/dynamixelserver_serial.cpp
+8
-0
8 additions, 0 deletions
src/dynamixelserver_serial.cpp
with
8 additions
and
0 deletions
src/dynamixelserver_serial.cpp
+
8
−
0
View file @
78fd21c2
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#ifdef _HAVE_XSD
#ifdef _HAVE_XSD
#include
"xml/dyn_server_serial_cfg_file.hxx"
#include
"xml/dyn_server_serial_cfg_file.hxx"
#endif
#endif
#include
<iostream>
CDynamixelServerSerial
*
CDynamixelServerSerial
::
pinstance
=
NULL
;
CDynamixelServerSerial
*
CDynamixelServerSerial
::
pinstance
=
NULL
;
...
@@ -41,6 +42,7 @@ void CDynamixelServerSerial::config_bus(const std::string &device, int baudrate)
...
@@ -41,6 +42,7 @@ void CDynamixelServerSerial::config_bus(const std::string &device, int baudrate)
{
{
TRS232_config
serial_config
;
TRS232_config
serial_config
;
this
->
dynamixel_access
.
enter
();
if
(
this
->
comm_dev
!=
NULL
)
if
(
this
->
comm_dev
!=
NULL
)
{
{
delete
this
->
comm_dev
;
delete
this
->
comm_dev
;
...
@@ -54,6 +56,10 @@ void CDynamixelServerSerial::config_bus(const std::string &device, int baudrate)
...
@@ -54,6 +56,10 @@ void CDynamixelServerSerial::config_bus(const std::string &device, int baudrate)
this
->
comm_dev
=
new
CRS232
(
device
);
this
->
comm_dev
=
new
CRS232
(
device
);
this
->
comm_dev
->
open
((
void
*
)
&
device
);
this
->
comm_dev
->
open
((
void
*
)
&
device
);
this
->
comm_dev
->
config
(
&
serial_config
);
this
->
comm_dev
->
config
(
&
serial_config
);
try
{
((
CRS232
*
)
this
->
comm_dev
)
->
set_low_latency
();
}
catch
(
CException
&
e
){
}
this
->
bus_info
.
baud_rate
=
baudrate
;
this
->
bus_info
.
baud_rate
=
baudrate
;
this
->
bus_info
.
device
=
device
;
this
->
bus_info
.
device
=
device
;
}
catch
(
CException
&
e
){
}
catch
(
CException
&
e
){
...
@@ -62,8 +68,10 @@ void CDynamixelServerSerial::config_bus(const std::string &device, int baudrate)
...
@@ -62,8 +68,10 @@ void CDynamixelServerSerial::config_bus(const std::string &device, int baudrate)
delete
this
->
comm_dev
;
delete
this
->
comm_dev
;
this
->
comm_dev
=
NULL
;
this
->
comm_dev
=
NULL
;
}
}
this
->
dynamixel_access
.
exit
();
throw
e
;
throw
e
;
}
}
this
->
dynamixel_access
.
exit
();
}
}
#ifdef _HAVE_XSD
#ifdef _HAVE_XSD
...
...
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