From 88ee22900dd22dd7a6a86f2c2634ed4355cf4177 Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 25 Feb 2025 13:02:33 +0900 Subject: [PATCH 1/8] Fix for Arduino Uno R4 build error --- src/actuator.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/actuator.h b/src/actuator.h index ef22371..b448e40 100644 --- a/src/actuator.h +++ b/src/actuator.h @@ -7,6 +7,11 @@ #define DXL_TORQUE_ON 1 #define DXL_TORQUE_OFF 0 +#if defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_MINIMA) +#undef LED_RED +#undef LED_BLUE +#endif + // The reason for checking #ifndef here is to avoid conflict with Dynamixel SDK. #ifndef AX12A #define AX12A (uint16_t)12 From 022a601020e7dc4aafc89aaaec1d9b8767ce4c3e Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 25 Feb 2025 13:54:41 +0900 Subject: [PATCH 2/8] Fix for STM32 based arduino build error --- src/actuator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actuator.h b/src/actuator.h index b448e40..52f2a26 100644 --- a/src/actuator.h +++ b/src/actuator.h @@ -7,8 +7,9 @@ #define DXL_TORQUE_ON 1 #define DXL_TORQUE_OFF 0 -#if defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_MINIMA) +#if defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_MINIMA) || defined(ARDUINO_ARCH_STM32) #undef LED_RED +#undef LED_GREEN #undef LED_BLUE #endif From fd013614b1b85f4f028e463c5dd5f328c2b8731b Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 18 Mar 2025 16:12:08 +0900 Subject: [PATCH 3/8] Fixed build error on ARM Cortex-M based Arduino boards. --- src/Dynamixel2Arduino.cpp | 6 +++--- src/actuator.cpp | 12 ++++++------ src/actuator.h | 12 +++--------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/Dynamixel2Arduino.cpp b/src/Dynamixel2Arduino.cpp index 2592292..67ecfec 100644 --- a/src/Dynamixel2Arduino.cpp +++ b/src/Dynamixel2Arduino.cpp @@ -610,10 +610,10 @@ bool Dynamixel2Arduino::setLedState(uint8_t id, bool state) case PRO_M54P_040_S250_R: case PRO_M54P_060_S250_R: if (state == false) { - writeControlTableItem(ControlTableItem::LED_GREEN, id, state); - writeControlTableItem(ControlTableItem::LED_BLUE, id, state); + writeControlTableItem(ControlTableItem::DXL_LED_GREEN, id, state); + writeControlTableItem(ControlTableItem::DXL_LED_BLUE, id, state); } - ret = writeControlTableItem(ControlTableItem::LED_RED, id, state); + ret = writeControlTableItem(ControlTableItem::DXL_LED_RED, id, state); break; default: diff --git a/src/actuator.cpp b/src/actuator.cpp index 59a5319..6f3450b 100644 --- a/src/actuator.cpp +++ b/src/actuator.cpp @@ -319,9 +319,9 @@ const ModelControlTableInfo_t pro_r_control_table[] PROGMEM = { {ControlTableItem::SHUTDOWN, 48, 1}, {ControlTableItem::TORQUE_ENABLE, 562, 1}, - {ControlTableItem::LED_RED, 563, 1}, - {ControlTableItem::LED_GREEN, 564, 1}, - {ControlTableItem::LED_BLUE, 565, 1}, + {ControlTableItem::DXL_LED_RED, 563, 1}, + {ControlTableItem::DXL_LED_GREEN, 564, 1}, + {ControlTableItem::DXL_LED_BLUE, 565, 1}, {ControlTableItem::VELOCITY_I_GAIN, 586, 2}, {ControlTableItem::VELOCITY_P_GAIN, 588, 2}, {ControlTableItem::POSITION_P_GAIN, 594, 2}, @@ -377,9 +377,9 @@ const ModelControlTableInfo_t pro_ra_pro_plus_control_table[] PROGMEM = { {ControlTableItem::SHUTDOWN, 63, 1}, {ControlTableItem::TORQUE_ENABLE, 512, 1}, - {ControlTableItem::LED_RED, 513, 1}, - {ControlTableItem::LED_GREEN, 514, 1}, - {ControlTableItem::LED_BLUE, 515, 1}, + {ControlTableItem::DXL_LED_RED, 513, 1}, + {ControlTableItem::DXL_LED_GREEN, 514, 1}, + {ControlTableItem::DXL_LED_BLUE, 515, 1}, {ControlTableItem::STATUS_RETURN_LEVEL, 516, 1}, {ControlTableItem::REGISTERED_INSTRUCTION, 517, 1}, {ControlTableItem::HARDWARE_ERROR_STATUS, 518, 1}, diff --git a/src/actuator.h b/src/actuator.h index 52f2a26..83fdbbb 100644 --- a/src/actuator.h +++ b/src/actuator.h @@ -7,12 +7,6 @@ #define DXL_TORQUE_ON 1 #define DXL_TORQUE_OFF 0 -#if defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_MINIMA) || defined(ARDUINO_ARCH_STM32) -#undef LED_RED -#undef LED_GREEN -#undef LED_BLUE -#endif - // The reason for checking #ifndef here is to avoid conflict with Dynamixel SDK. #ifndef AX12A #define AX12A (uint16_t)12 @@ -338,9 +332,9 @@ namespace ControlTableItem{ TORQUE_ENABLE, LED, - LED_RED, - LED_GREEN, - LED_BLUE, + DXL_LED_RED, + DXL_LED_GREEN, + DXL_LED_BLUE, REGISTERED_INSTRUCTION, HARDWARE_ERROR_STATUS, VELOCITY_P_GAIN, From a5782fd09ddba79efad9a784f613d2631ae7c634 Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 18 Mar 2025 16:23:55 +0900 Subject: [PATCH 4/8] Fixed naming inconsistency between LED and DXL_LED_* items --- src/Dynamixel2Arduino.cpp | 2 +- src/actuator.cpp | 10 +++++----- src/actuator.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Dynamixel2Arduino.cpp b/src/Dynamixel2Arduino.cpp index 67ecfec..6222112 100644 --- a/src/Dynamixel2Arduino.cpp +++ b/src/Dynamixel2Arduino.cpp @@ -617,7 +617,7 @@ bool Dynamixel2Arduino::setLedState(uint8_t id, bool state) break; default: - ret = writeControlTableItem(ControlTableItem::LED, id, state); + ret = writeControlTableItem(ControlTableItem::DXL_LED, id, state); break; } diff --git a/src/actuator.cpp b/src/actuator.cpp index 6f3450b..7cd1dbc 100644 --- a/src/actuator.cpp +++ b/src/actuator.cpp @@ -33,7 +33,7 @@ const ModelControlTableInfo_t control_table_1_0[] PROGMEM = { {ControlTableItem::SHUTDOWN, 18, 1}, {ControlTableItem::TORQUE_ENABLE, 24, 1}, - {ControlTableItem::LED, 25, 1}, + {ControlTableItem::DXL_LED, 25, 1}, {ControlTableItem::CW_COMPLIANCE_MARGIN, 26, 1}, {ControlTableItem::CCW_COMPLIANCE_MARGIN, 27, 1}, {ControlTableItem::CW_COMPLIANCE_SLOPE, 28, 1}, @@ -85,7 +85,7 @@ const ModelControlTableInfo_t control_table_1_1[] PROGMEM = { {ControlTableItem::RESOLUTION_DIVIDER, 22, 1}, {ControlTableItem::TORQUE_ENABLE, 24, 1}, - {ControlTableItem::LED, 25, 1}, + {ControlTableItem::DXL_LED, 25, 1}, {ControlTableItem::D_GAIN, 26, 1}, {ControlTableItem::I_GAIN, 27, 1}, {ControlTableItem::P_GAIN, 28, 1}, @@ -144,7 +144,7 @@ const ModelControlTableInfo_t xl320_control_table[] PROGMEM = { {ControlTableItem::SHUTDOWN, 18, 1}, {ControlTableItem::TORQUE_ENABLE, 24, 1}, - {ControlTableItem::LED, 25, 1}, + {ControlTableItem::DXL_LED, 25, 1}, {ControlTableItem::D_GAIN, 27, 1}, {ControlTableItem::I_GAIN, 28, 1}, {ControlTableItem::P_GAIN, 29, 1}, @@ -197,7 +197,7 @@ const ModelControlTableInfo_t control_table_2_0[] PROGMEM = { {ControlTableItem::SHUTDOWN, 63, 1}, {ControlTableItem::TORQUE_ENABLE, 64, 1}, - {ControlTableItem::LED, 65, 1}, + {ControlTableItem::DXL_LED, 65, 1}, {ControlTableItem::STATUS_RETURN_LEVEL, 68, 1}, {ControlTableItem::REGISTERED_INSTRUCTION, 69, 1}, {ControlTableItem::HARDWARE_ERROR_STATUS, 70, 1}, @@ -475,7 +475,7 @@ const ModelControlTableInfo_t y_control_table[] PROGMEM = { {ControlTableItem::PROFILE_ACCELERATION_TIME, 248, 4}, {ControlTableItem::PROFIIE_TIME, 252, 4}, {ControlTableItem::TORQUE_ENABLE, 512, 1}, - {ControlTableItem::LED, 513, 1}, + {ControlTableItem::DXL_LED, 513, 1}, {ControlTableItem::PWM_OFFSET, 516, 2}, {ControlTableItem::CURRENT_OFFSET, 518, 2}, {ControlTableItem::VELOCITY_OFFSET, 520, 4}, diff --git a/src/actuator.h b/src/actuator.h index 83fdbbb..be37d48 100644 --- a/src/actuator.h +++ b/src/actuator.h @@ -331,7 +331,7 @@ namespace ControlTableItem{ SHUTDOWN, TORQUE_ENABLE, - LED, + DXL_LED, DXL_LED_RED, DXL_LED_GREEN, DXL_LED_BLUE, From 674c5fb0ff3fe9638feb2312146618d038bc2997 Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 15 Apr 2025 13:41:35 +0900 Subject: [PATCH 5/8] [Fix] Fixed DYNAMIXEL-Y PRESENT_MOTOR_TEMPERATURE ControlTableItem Width --- src/actuator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actuator.cpp b/src/actuator.cpp index 59a5319..3e70898 100644 --- a/src/actuator.cpp +++ b/src/actuator.cpp @@ -493,7 +493,7 @@ const ModelControlTableInfo_t y_control_table[] PROGMEM = { {ControlTableItem::VELOCITY_TRAJECTORY, 564, 4}, {ControlTableItem::PRESENT_INPUT_VOLTAGE, 568, 2}, {ControlTableItem::PRESENT_TEMPERATURE, 570, 1}, // Present Inverter Temperature - {ControlTableItem::PRESENT_MOTOR_TEMPERATURE, 571, 4}, + {ControlTableItem::PRESENT_MOTOR_TEMPERATURE, 571, 1}, #endif {ControlTableItem::LAST_DUMMY_ITEM, 0, 0} }; From 2ec236b5dc353c65018d252ef52904867167893a Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 15 Apr 2025 13:49:11 +0900 Subject: [PATCH 6/8] Revert "[Fix] Fixed DYNAMIXEL-Y PRESENT_MOTOR_TEMPERATURE ControlTableItem Width" This reverts commit 674c5fb0ff3fe9638feb2312146618d038bc2997. --- src/actuator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actuator.cpp b/src/actuator.cpp index 3e70898..59a5319 100644 --- a/src/actuator.cpp +++ b/src/actuator.cpp @@ -493,7 +493,7 @@ const ModelControlTableInfo_t y_control_table[] PROGMEM = { {ControlTableItem::VELOCITY_TRAJECTORY, 564, 4}, {ControlTableItem::PRESENT_INPUT_VOLTAGE, 568, 2}, {ControlTableItem::PRESENT_TEMPERATURE, 570, 1}, // Present Inverter Temperature - {ControlTableItem::PRESENT_MOTOR_TEMPERATURE, 571, 1}, + {ControlTableItem::PRESENT_MOTOR_TEMPERATURE, 571, 4}, #endif {ControlTableItem::LAST_DUMMY_ITEM, 0, 0} }; From f6aa9f4937c3fb8d265f114b314ad05dd0f34f65 Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Tue, 15 Apr 2025 13:49:51 +0900 Subject: [PATCH 7/8] [Fix] Fixed DYNAMIXEL-Y PRESENT_MOTOR_TEMPERATURE ControlTableItem Width Signed-off-by: Jonghee Son --- src/actuator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actuator.cpp b/src/actuator.cpp index 59a5319..3e70898 100644 --- a/src/actuator.cpp +++ b/src/actuator.cpp @@ -493,7 +493,7 @@ const ModelControlTableInfo_t y_control_table[] PROGMEM = { {ControlTableItem::VELOCITY_TRAJECTORY, 564, 4}, {ControlTableItem::PRESENT_INPUT_VOLTAGE, 568, 2}, {ControlTableItem::PRESENT_TEMPERATURE, 570, 1}, // Present Inverter Temperature - {ControlTableItem::PRESENT_MOTOR_TEMPERATURE, 571, 4}, + {ControlTableItem::PRESENT_MOTOR_TEMPERATURE, 571, 1}, #endif {ControlTableItem::LAST_DUMMY_ITEM, 0, 0} }; From 647aff6fac1ba7f756361606a37449086cbfc532 Mon Sep 17 00:00:00 2001 From: Jonghee Son Date: Fri, 30 May 2025 09:35:20 +0900 Subject: [PATCH 8/8] Prepare for 0.8.x version release Signed-off-by: Jonghee Son --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 43bf496..533833e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Dynamixel2Arduino -version=0.8.0 +version=0.8.1 author=ROBOTIS license=Apache-2.0 maintainer=Sookyung Son(sukaa@robotis.com)