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
Merge requests
!2
Used the specific new data event for the rx can ID.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Used the specific new data event for the rx can ID.
can_devel
into
master
Overview
0
Commits
5
Pipelines
0
Changes
10
Merged
Sergi Hernandez
requested to merge
can_devel
into
master
2 years ago
Overview
0
Commits
5
Pipelines
0
Changes
10
Expand
Checked that the number of data available if not 0 before reading to avoid an exception.
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
3a793d6b
5 commits,
2 years ago
10 files
+
1020
−
53
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
include/dynamixel.h
+
39
−
39
Options
#ifndef _DYNAMIXEL_H
#define _DYNAMIXEL_H
//
#include "dynamixelserver.h"
#include
"dynamixelserver.h"
#include
"dynamixel_common.h"
#include
"eventserver.h"
#include
"comm.h"
@@ -24,93 +24,93 @@ class CDynamixel
private:
friend
class
CDynamixelServer
;
/**
* \brief
*
* \brief
*
*/
CDynamixelServer
*
dyn_serv
er
;
unsigned
char
id_regist
er
;
/**
* \brief
Handle to the communications device
* \brief
*
*/
CComm
*
comm_dev
;
/**
* \brief
*
*/
unsigned
char
node_address
;
unsigned
char
baudrate_register
;
/**
* \brief
mutual exclusion mechanism to access the usb
* \brief
*
*/
CMutex
*
usb_access
;
void
set_baudrate
(
int
baudrate
);
protected:
/**
* \brief
Handle to the unique event server
* \brief
*
*/
CEventServer
*
event_server
;
virtual
void
send_instruction_packet_v1
(
dyn_inst_t
inst
,
unsigned
char
*
data
=
NULL
,
unsigned
char
len
=
0
)
;
/**
* \brief
data reception event
*
* \brief
*
*/
std
::
string
usb_rx_event_id
;
virtual
void
send_instruction_packet_v2
(
dyn_inst_t
inst
,
unsigned
char
*
data
=
NULL
,
unsigned
short
int
len
=
0
)
;
/**
* \brief
*
*/
unsigned
char
id_register
;
virtual
unsigned
char
receive_status_packet_v1
(
unsigned
char
**
data
,
unsigned
char
*
len
)
;
/**
* \brief
*
*/
unsigned
char
baudrate_register
;
virtual
unsigned
char
receive_status_packet_v2
(
unsigned
char
**
data
,
unsigned
short
int
*
len
)
;
/**
* \brief
*
*/
void
set_baudrate
(
int
baudrate
);
void
handle_error
(
unsigned
char
error
);
public:
/**
* \brief
*
*/
void
sync_packet_v
1
(
unsigned
char
*
data
,
unsigned
int
length
,
int
*
start
);
void
sync_packet_v
2
(
unsigned
char
*
data
,
unsigned
int
length
,
int
*
start
);
/**
* \brief
*
*/
void
sync_packet_v2
(
unsigned
char
*
data
,
unsigned
int
length
,
int
*
start
);
void
sync_packet_v1
(
unsigned
char
*
data
,
unsigned
int
length
,
int
*
start
);
/**
* \brief data reception event
*
*/
std
::
string
usb_rx_event_id
;
/**
* \brief
*
*/
dyn_version_t
version
;
protected:
/**
* \brief
*
* \brief
*
*/
void
send_instruction_packet_v1
(
dyn_inst_t
inst
,
unsigned
char
*
data
=
NULL
,
unsigned
char
len
=
0
)
;
unsigned
char
node_address
;
/**
* \brief
* \brief
mutual exclusion mechanism to access the usb
*
*/
void
send_instruction_packet_v2
(
dyn_inst_t
inst
,
unsigned
char
*
data
=
NULL
,
unsigned
short
int
len
=
0
);
CMutex
*
usb_access
;
/**
* \brief
*
* \brief
*
*/
unsigned
char
receive_status_packet_v1
(
unsigned
cha
r
*
*
d
ata
,
unsigned
char
*
len
)
;
CDynamixelServe
r
*
d
yn_server
;
/**
* \brief
* \brief
Handle to the communications device
*
*/
unsigned
char
receive_status_packet_v2
(
unsigned
char
**
data
,
unsigned
short
int
*
len
)
;
*/
CComm
*
comm_dev
;
/**
* \brief
* \brief
Handle to the unique event server
*
*/
void
handle_error
(
unsigned
char
error
);
public:
CEventServer
*
event_server
;
/**
* \brief
*
Loading