Dynamixel servo controller. This program consists of 2 parts: "dynamixel_servo_controller.cpp/.h" and "main.cpp"( demo program ).
Fork of dynamixel_servo_controller by
Diff: dynamixel_servo_controller.cpp
- Revision:
- 3:51f72ee2d5c2
- Parent:
- 2:92f3aa5245dc
- Child:
- 4:ce4fef97e7e5
--- a/dynamixel_servo_controller.cpp Wed Jun 13 08:31:51 2018 +0000 +++ b/dynamixel_servo_controller.cpp Wed Jun 13 14:20:24 2018 +0000 @@ -205,21 +205,16 @@ */ bool XM430::Send_Bulk_Char(uint8_t *buf, const uint32_t buf_length) { - #ifdef MBED_ENVIRONMENT - // ユーザ関数 - - return true; - #else - for(uint32_t i = 0; i < buf_length; i ++) - { - //std::cout << tx_buf[i] << std::endl; - std::cout << std::hex << std::showbase << std::uppercase << (uint32_t)tx_buf[i] << std::endl; - } - - return true; - #endif - - return false; + for(uint32_t i = 0; i < buf_length; i ++) + { + #ifdef MBED_ENVIRONMENT + // ユーザ処理 + uart.putc(buf[i]); + #else + std::cout << std::hex << std::showbase << std::uppercase << (uint32_t)tx_buf[i] << std::endl; + #endif + } + return true; } /**