Skip to content

Commit

Permalink
Merge pull request #7 from ROBOTIS-GIT/add_product_xc_series_2xl
Browse files Browse the repository at this point in the history
Added XC430-W150, XC430-W240, 2XC430-W250, 2XL430-W250.
  • Loading branch information
Kei authored Jun 7, 2019
2 parents c318322 + 5778cf5 commit 135386b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/Dynamixel2Arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ const ModelDependencyFuncItemAndRangeInfo_t dependency_ctable_2_0_common[] PROGM
#if (ENABLE_ACTUATOR_MX28_PROTOCOL2 \
|| ENABLE_ACTUATOR_MX64_PROTOCOL2 \
|| ENABLE_ACTUATOR_MX106_PROTOCOL2 \
|| ENABLE_ACTUATOR_XC430 \
|| ENABLE_ACTUATOR_XL430 \
|| ENABLE_ACTUATOR_XM430 || ENABLE_ACTUATOR_XH430 \
|| ENABLE_ACTUATOR_XM540 || ENABLE_ACTUATOR_XH540)
Expand Down Expand Up @@ -1182,7 +1183,11 @@ static ItemAndRangeInfo_t getModelDependencyFuncInfo(uint16_t model_num, uint8_t
break;

case MX28_2:
case XC430_W150:
case XC430_W240:
case XXC430_W250:
case XL430_W250:
case XXL430_W250:
p_common_ctable = dependency_ctable_2_0_common;
break;
case MX64_2:
Expand Down
12 changes: 9 additions & 3 deletions src/actuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ const ModelControlTableInfo_t control_table_2_0[] PROGMEM = {
|| ENABLE_ACTUATOR_MX64_PROTOCOL2 \
|| ENABLE_ACTUATOR_MX106_PROTOCOL2 \
|| ENABLE_ACTUATOR_XL430 \
|| ENABLE_ACTUATOR_XC430 \
|| ENABLE_ACTUATOR_XM430 || ENABLE_ACTUATOR_XH430 \
|| ENABLE_ACTUATOR_XM540 || ENABLE_ACTUATOR_XH540)
{ControlTableItem::MODEL_NUMBER, 0, 2},
Expand Down Expand Up @@ -248,8 +249,9 @@ const ModelControlTableInfo_t mx64_106_2_control_table[] PROGMEM = {
{ControlTableItem::LAST_DUMMY_ITEM, 0, 0}
};

const ModelControlTableInfo_t xl430_control_table[] PROGMEM = {
#if (ENABLE_ACTUATOR_XL430)
const ModelControlTableInfo_t xc430_xl430_control_table[] PROGMEM = {
#if (ENABLE_ACTUATOR_XL430 \
|| ENABLE_ACTUATOR_XC430)
{ControlTableItem::PRESENT_LOAD, 126, 2},
#endif
{ControlTableItem::LAST_DUMMY_ITEM, 0, 0}
Expand Down Expand Up @@ -464,9 +466,13 @@ ControlTableItemInfo_t DYNAMIXEL::getControlTableItemInfo(uint16_t model_num, ui
p_common_ctable = xl320_control_table;
break;

case XC430_W150:
case XC430_W240:
case XXC430_W250:
case XL430_W250:
case XXL430_W250:
p_common_ctable = control_table_2_0;
p_dep_ctable = xl430_control_table;
p_dep_ctable = xc430_xl430_control_table;
break;

case XM430_W210:
Expand Down
11 changes: 6 additions & 5 deletions src/actuator.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@

#define XL320 (uint16_t)350

#define XC430_W150 (uint16_t)1070
#define XC430_W240 (uint16_t)1080
#define XXC430_W250 (uint16_t)1160

#define XL430_W250 (uint16_t)1060

#define XXL430_W250 (uint16_t)1090

#define XM430_W210 (uint16_t)1030
#define XM430_W350 (uint16_t)1020

Expand Down Expand Up @@ -176,20 +182,15 @@ enum ControlTableItem{
LAST_DUMMY_ITEM = 0xFF
};




namespace DYNAMIXEL{

typedef struct ControlTableItemInfo{
uint16_t addr;
uint8_t addr_length;
} ControlTableItemInfo_t;


ControlTableItemInfo_t getControlTableItemInfo(uint16_t model_num, uint8_t control_item);


} // namespace DYNAMIXEL

#endif /* DYNAMIXEL_ACTUATOR_H_ */

0 comments on commit 135386b

Please sign in to comment.