Skip to content

Commit

Permalink
Merge pull request #368 from ROBOTIS-GIT/develop
Browse files Browse the repository at this point in the history
- fixed "conflicting types for 'reboot'" error in mac OS.
  • Loading branch information
ROBOTIS-zerom authored Jan 7, 2020
2 parents 3ae73bf + 8a53309 commit 7920e24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions c/include/dynamixel_sdk/packet_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
#include "robotis_def.h"
#include "port_handler.h"

#if defined(__APPLE__)
#undef reboot
#define reboot rebootDXL
#endif

#define BROADCAST_ID 0xFE // 254
#define MAX_ID 0xFC // 252

Expand Down Expand Up @@ -101,7 +106,11 @@ WINDECLSPEC uint16_t pingGetModelNum (int port_num, int protocol_version,
WINDECLSPEC void broadcastPing (int port_num, int protocol_version);
WINDECLSPEC uint8_t getBroadcastPingResult (int port_num, int protocol_version, int id);

#if defined(__APPLE__)
WINDECLSPEC void rebootDXL (int port_num, int protocol_version, uint8_t id);
#else
WINDECLSPEC void reboot (int port_num, int protocol_version, uint8_t id);
#endif

WINDECLSPEC void clearMultiTurn (int port_num, int protocol_version, uint8_t id);

Expand Down
4 changes: 4 additions & 0 deletions c/src/dynamixel_sdk/packet_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ uint8_t getBroadcastPingResult(int port_num, int protocol_version, int id)
}
}

#if defined(__APPLE__)
void rebootDXL(int port_num, int protocol_version, uint8_t id)
#else
void reboot(int port_num, int protocol_version, uint8_t id)
#endif
{
if (protocol_version == 1)
{
Expand Down

0 comments on commit 7920e24

Please sign in to comment.