Skip to content

Commit df01ba0

Browse files
Merge pull request #65 from ROBOTIS-GIT/feature_xc330
Feature xc330
2 parents 941ca89 + 6f9a40c commit df01ba0

5 files changed

Lines changed: 70 additions & 2 deletions

File tree

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Dynamixel2Arduino
2-
version=0.4.7
2+
version=0.4.8
33
author=ROBOTIS
44
license=Apache-2.0
55
maintainer=Will Son(willson@robotis.com)

src/Dynamixel2Arduino.cpp

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const uint16_t model_number_table[] PROGMEM = {
3333
XL320,
3434
XL330_M288,
3535
XL330_M077,
36+
XC330_M181,
37+
XC330_M288,
38+
XC330_T181,
39+
XC330_T288,
3640
XL430_W250,
3741
XXL430_W250,
3842
XC430_W150, XC430_W240,
@@ -298,7 +302,10 @@ bool Dynamixel2Arduino::setBaudrate(uint8_t id, uint32_t baudrate)
298302
return false;
299303
}
300304
break;
301-
305+
case XC330_M288:
306+
case XC330_M181:
307+
case XC330_T288:
308+
case XC330_T181:
302309
case XL330_M288:
303310
case XL330_M077:
304311
switch(baudrate)
@@ -652,6 +659,10 @@ bool Dynamixel2Arduino::setOperatingMode(uint8_t id, uint8_t mode)
652659
case MX106_2:
653660
case XL330_M288:
654661
case XL330_M077:
662+
case XC330_M288:
663+
case XC330_M181:
664+
case XC330_T181:
665+
case XC330_T288:
655666
case XM430_W210:
656667
case XM430_W350:
657668
case XH430_V210:
@@ -1088,6 +1099,7 @@ const ModelDependencyFuncItemAndRangeInfo_t dependency_ctable_2_0_common[] PROGM
10881099
|| ENABLE_ACTUATOR_MX64_PROTOCOL2 \
10891100
|| ENABLE_ACTUATOR_MX106_PROTOCOL2 \
10901101
|| ENABLE_ACTUATOR_XL330 \
1102+
|| ENABLE_ACTUATOR_XC330 \
10911103
|| ENABLE_ACTUATOR_XC430 \
10921104
|| ENABLE_ACTUATOR_XL430 \
10931105
|| ENABLE_ACTUATOR_XM430 || ENABLE_ACTUATOR_XH430 \
@@ -1131,6 +1143,29 @@ const ModelDependencyFuncItemAndRangeInfo_t dependency_xl330_M288_M077[] PROGMEM
11311143
{LAST_DUMMY_FUNC, ControlTableItem::LAST_DUMMY_ITEM, UNIT_RAW, 0, 0, 0}
11321144
};
11331145

1146+
const ModelDependencyFuncItemAndRangeInfo_t dependency_xc330_m181_m288[] PROGMEM = {
1147+
#if (ENABLE_ACTUATOR_XC330)
1148+
{SET_CURRENT, GOAL_CURRENT, UNIT_MILLI_AMPERE, -2352, 2352, 1},
1149+
{GET_CURRENT, PRESENT_CURRENT, UNIT_MILLI_AMPERE, -2352, 2352, 1},
1150+
1151+
{SET_VELOCITY, GOAL_VELOCITY, UNIT_RPM, -2047, 2047, 0.229},
1152+
{GET_VELOCITY, PRESENT_VELOCITY, UNIT_RPM, -2047, 2047, 0.229},
1153+
#endif
1154+
{LAST_DUMMY_FUNC, ControlTableItem::LAST_DUMMY_ITEM, UNIT_RAW, 0, 0, 0}
1155+
};
1156+
1157+
const ModelDependencyFuncItemAndRangeInfo_t dependency_xc330_t181_t288[] PROGMEM = {
1158+
#if (ENABLE_ACTUATOR_XC330)
1159+
{SET_CURRENT, GOAL_CURRENT, UNIT_MILLI_AMPERE, -910, 910, 1},
1160+
{GET_CURRENT, PRESENT_CURRENT, UNIT_MILLI_AMPERE, -910, 910, 1},
1161+
1162+
{SET_VELOCITY, GOAL_VELOCITY, UNIT_RPM, -2047, 2047, 0.229},
1163+
{GET_VELOCITY, PRESENT_VELOCITY, UNIT_RPM, -2047, 2047, 0.229},
1164+
#endif
1165+
{LAST_DUMMY_FUNC, ControlTableItem::LAST_DUMMY_ITEM, UNIT_RAW, 0, 0, 0}
1166+
};
1167+
1168+
11341169
const ModelDependencyFuncItemAndRangeInfo_t dependency_xm430_w210_w350[] PROGMEM = {
11351170
#if (ENABLE_ACTUATOR_XM430)
11361171
{SET_CURRENT, GOAL_CURRENT, UNIT_MILLI_AMPERE, -1193, 1193, 2.69},
@@ -1426,6 +1461,18 @@ static ItemAndRangeInfo_t getModelDependencyFuncInfo(uint16_t model_num, uint8_t
14261461
p_dep_ctable = dependency_xl330_M288_M077;
14271462
break;
14281463

1464+
case XC330_M181:
1465+
case XC330_M288:
1466+
p_common_ctable = dependency_ctable_2_0_common;
1467+
p_dep_ctable = dependency_xc330_m181_m288;
1468+
break;
1469+
1470+
case XC330_T181:
1471+
case XC330_T288:
1472+
p_common_ctable = dependency_ctable_2_0_common;
1473+
p_dep_ctable = dependency_xc330_t181_t288;
1474+
break;
1475+
14291476
case XM430_W210:
14301477
case XM430_W350:
14311478
p_common_ctable = dependency_ctable_2_0_common;

src/actuator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ const ModelControlTableInfo_t control_table_2_0[] PROGMEM = {
169169
|| ENABLE_ACTUATOR_MX64_PROTOCOL2 \
170170
|| ENABLE_ACTUATOR_MX106_PROTOCOL2 \
171171
|| ENABLE_ACTUATOR_XL330 \
172+
|| ENABLE_ACTUATOR_XC330 \
172173
|| ENABLE_ACTUATOR_XL430 \
173174
|| ENABLE_ACTUATOR_XC430 \
174175
|| ENABLE_ACTUATOR_XM430 || ENABLE_ACTUATOR_XH430 \
@@ -256,6 +257,7 @@ const ModelControlTableInfo_t xc430_xl430_control_table[] PROGMEM = {
256257

257258
const ModelControlTableInfo_t xmh430_xl330_control_table[] PROGMEM = {
258259
#if (ENABLE_ACTUATOR_XL330 \
260+
|| ENABLE_ACTUATOR_XC330 \
259261
|| ENABLE_ACTUATOR_XM430 \
260262
|| ENABLE_ACTUATOR_XH430)
261263
{ControlTableItem::CURRENT_LIMIT, 38, 2},
@@ -484,6 +486,10 @@ ControlTableItemInfo_t DYNAMIXEL::getControlTableItemInfo(uint16_t model_num, ui
484486

485487
case XL330_M288:
486488
case XL330_M077:
489+
case XC330_M181:
490+
case XC330_M288:
491+
case XC330_T181:
492+
case XC330_T288:
487493
case XM430_W210:
488494
case XM430_W350:
489495
case XH430_V210:

src/actuator.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@
7979
#define XL330_M288 (uint16_t)1200
8080
#endif
8181

82+
#ifndef XC330_M181
83+
#define XC330_M181 (uint16_t)1230
84+
#endif
85+
#ifndef XC330_M288
86+
#define XC330_M288 (uint16_t)1240
87+
#endif
88+
89+
#ifndef XC330_T181
90+
#define XC330_T181 (uint16_t)1210
91+
#endif
92+
#ifndef XC330_T288
93+
#define XC330_T288 (uint16_t)1220
94+
#endif
95+
8296
#ifndef XC430_W150
8397
#define XC430_W150 (uint16_t)1070
8498
#endif

src/utility/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#define ENABLE_ACTUATOR_XL320 1
1919
#define ENABLE_ACTUATOR_XL330 1
20+
#define ENABLE_ACTUATOR_XC330 1
2021
#define ENABLE_ACTUATOR_XL430 1 //Includes 2XL430
2122
#define ENABLE_ACTUATOR_XC430 1 //Includes 2XC430
2223
#define ENABLE_ACTUATOR_XM430 1

0 commit comments

Comments
 (0)