Skip to content

Commit 135386b

Browse files
author
Kei
authored
Merge pull request #7 from ROBOTIS-GIT/add_product_xc_series_2xl
Added XC430-W150, XC430-W240, 2XC430-W250, 2XL430-W250.
2 parents c318322 + 5778cf5 commit 135386b

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

src/Dynamixel2Arduino.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ const ModelDependencyFuncItemAndRangeInfo_t dependency_ctable_2_0_common[] PROGM
885885
#if (ENABLE_ACTUATOR_MX28_PROTOCOL2 \
886886
|| ENABLE_ACTUATOR_MX64_PROTOCOL2 \
887887
|| ENABLE_ACTUATOR_MX106_PROTOCOL2 \
888+
|| ENABLE_ACTUATOR_XC430 \
888889
|| ENABLE_ACTUATOR_XL430 \
889890
|| ENABLE_ACTUATOR_XM430 || ENABLE_ACTUATOR_XH430 \
890891
|| ENABLE_ACTUATOR_XM540 || ENABLE_ACTUATOR_XH540)
@@ -1182,7 +1183,11 @@ static ItemAndRangeInfo_t getModelDependencyFuncInfo(uint16_t model_num, uint8_t
11821183
break;
11831184

11841185
case MX28_2:
1186+
case XC430_W150:
1187+
case XC430_W240:
1188+
case XXC430_W250:
11851189
case XL430_W250:
1190+
case XXL430_W250:
11861191
p_common_ctable = dependency_ctable_2_0_common;
11871192
break;
11881193
case MX64_2:

src/actuator.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ const ModelControlTableInfo_t control_table_2_0[] PROGMEM = {
174174
|| ENABLE_ACTUATOR_MX64_PROTOCOL2 \
175175
|| ENABLE_ACTUATOR_MX106_PROTOCOL2 \
176176
|| ENABLE_ACTUATOR_XL430 \
177+
|| ENABLE_ACTUATOR_XC430 \
177178
|| ENABLE_ACTUATOR_XM430 || ENABLE_ACTUATOR_XH430 \
178179
|| ENABLE_ACTUATOR_XM540 || ENABLE_ACTUATOR_XH540)
179180
{ControlTableItem::MODEL_NUMBER, 0, 2},
@@ -248,8 +249,9 @@ const ModelControlTableInfo_t mx64_106_2_control_table[] PROGMEM = {
248249
{ControlTableItem::LAST_DUMMY_ITEM, 0, 0}
249250
};
250251

251-
const ModelControlTableInfo_t xl430_control_table[] PROGMEM = {
252-
#if (ENABLE_ACTUATOR_XL430)
252+
const ModelControlTableInfo_t xc430_xl430_control_table[] PROGMEM = {
253+
#if (ENABLE_ACTUATOR_XL430 \
254+
|| ENABLE_ACTUATOR_XC430)
253255
{ControlTableItem::PRESENT_LOAD, 126, 2},
254256
#endif
255257
{ControlTableItem::LAST_DUMMY_ITEM, 0, 0}
@@ -464,9 +466,13 @@ ControlTableItemInfo_t DYNAMIXEL::getControlTableItemInfo(uint16_t model_num, ui
464466
p_common_ctable = xl320_control_table;
465467
break;
466468

469+
case XC430_W150:
470+
case XC430_W240:
471+
case XXC430_W250:
467472
case XL430_W250:
473+
case XXL430_W250:
468474
p_common_ctable = control_table_2_0;
469-
p_dep_ctable = xl430_control_table;
475+
p_dep_ctable = xc430_xl430_control_table;
470476
break;
471477

472478
case XM430_W210:

src/actuator.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@
3131

3232
#define XL320 (uint16_t)350
3333

34+
#define XC430_W150 (uint16_t)1070
35+
#define XC430_W240 (uint16_t)1080
36+
#define XXC430_W250 (uint16_t)1160
37+
3438
#define XL430_W250 (uint16_t)1060
3539

40+
#define XXL430_W250 (uint16_t)1090
41+
3642
#define XM430_W210 (uint16_t)1030
3743
#define XM430_W350 (uint16_t)1020
3844

@@ -176,20 +182,15 @@ enum ControlTableItem{
176182
LAST_DUMMY_ITEM = 0xFF
177183
};
178184

179-
180-
181-
182185
namespace DYNAMIXEL{
183186

184187
typedef struct ControlTableItemInfo{
185188
uint16_t addr;
186189
uint8_t addr_length;
187190
} ControlTableItemInfo_t;
188191

189-
190192
ControlTableItemInfo_t getControlTableItemInfo(uint16_t model_num, uint8_t control_item);
191193

192-
193194
} // namespace DYNAMIXEL
194195

195196
#endif /* DYNAMIXEL_ACTUATOR_H_ */

0 commit comments

Comments
 (0)