Skip to content
Snippets Groups Projects
Commit 2264d6cf authored by leon's avatar leon
Browse files

Code Style modified into ROS C++ coding style

Function & File Names changed into underscored
parent 6fe64f48
No related branches found
No related tags found
No related merge requests found
Showing
with 122 additions and 1221 deletions
......@@ -48,15 +48,15 @@ LIBRARIES += -lrt
#---------------------------------------------------------------------
# SDK Files
#---------------------------------------------------------------------
SOURCES = src/dynamixel_sdk/GroupBulkRead.cpp \
src/dynamixel_sdk/GroupBulkWrite.cpp \
src/dynamixel_sdk/GroupSyncRead.cpp \
src/dynamixel_sdk/GroupSyncWrite.cpp \
src/dynamixel_sdk/PacketHandler.cpp \
src/dynamixel_sdk/PortHandler.cpp \
src/dynamixel_sdk/Protocol1PacketHandler.cpp \
src/dynamixel_sdk/Protocol2PacketHandler.cpp \
src/dynamixel_sdk_linux/PortHandlerLinux.cpp \
SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
src/dynamixel_sdk/group_bulk_write.cpp \
src/dynamixel_sdk/group_sync_read.cpp \
src/dynamixel_sdk/group_sync_write.cpp \
src/dynamixel_sdk/packet_handler.cpp \
src/dynamixel_sdk/port_handler.cpp \
src/dynamixel_sdk/protocol1_packet_handler.cpp \
src/dynamixel_sdk/protocol2_packet_handler.cpp \
src/dynamixel_sdk_linux/port_handler_linux.cpp \
OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES)))))
......@@ -94,7 +94,7 @@ uninstall:
$(RM) $(INSTALL_ROOT)/lib/$(TARGET2)
$(RM) $(INSTALL_ROOT)/lib/$(TARGET3)
$(RM) $(INSTALL_ROOT)/include/DynamixelSDK.h
$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk.h
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk*
reinstall: uninstall install
......
......@@ -48,15 +48,15 @@ LIBRARIES += -lrt
#---------------------------------------------------------------------
# SDK Files
#---------------------------------------------------------------------
SOURCES = src/dynamixel_sdk/GroupBulkRead.cpp \
src/dynamixel_sdk/GroupBulkWrite.cpp \
src/dynamixel_sdk/GroupSyncRead.cpp \
src/dynamixel_sdk/GroupSyncWrite.cpp \
src/dynamixel_sdk/PacketHandler.cpp \
src/dynamixel_sdk/PortHandler.cpp \
src/dynamixel_sdk/Protocol1PacketHandler.cpp \
src/dynamixel_sdk/Protocol2PacketHandler.cpp \
src/dynamixel_sdk_linux/PortHandlerLinux.cpp \
SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
src/dynamixel_sdk/group_bulk_write.cpp \
src/dynamixel_sdk/group_sync_read.cpp \
src/dynamixel_sdk/group_sync_write.cpp \
src/dynamixel_sdk/packet_handler.cpp \
src/dynamixel_sdk/port_handler.cpp \
src/dynamixel_sdk/protocol1_packet_handler.cpp \
src/dynamixel_sdk/protocol2_packet_handler.cpp \
src/dynamixel_sdk_linux/port_handler_linux.cpp \
OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES)))))
......@@ -94,7 +94,7 @@ uninstall:
$(RM) $(INSTALL_ROOT)/lib/$(TARGET2)
$(RM) $(INSTALL_ROOT)/lib/$(TARGET3)
$(RM) $(INSTALL_ROOT)/include/DynamixelSDK.h
$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk.h
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk*
reinstall: uninstall install
......
No preview for this file type
......@@ -145,28 +145,27 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkRead.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkWrite.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncRead.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncWrite.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\PacketHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\PortHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol1PacketHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol2PacketHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\PortHandlerWindows.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_read.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_write.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_read.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_write.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\packet_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\port_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol1_packet_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol2_packet_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\port_handler_windows.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\DynamixelSDK.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkRead.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkWrite.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncRead.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncWrite.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\PacketHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\PortHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol1PacketHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol2PacketHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\RobotisDef.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\PortHandlerWindows.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_read.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_write.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_read.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_write.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\packet_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\port_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol1_packet_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol2_packet_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\port_handler_windows.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
......
......@@ -27,67 +27,64 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkRead.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_read.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkWrite.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_write.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncRead.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_read.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncWrite.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_write.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\PacketHandler.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\packet_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\PortHandler.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\port_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol1PacketHandler.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol1_packet_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol2PacketHandler.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol2_packet_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\PortHandlerWindows.cpp">
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\port_handler_windows.cpp">
<Filter>Source Files\dynamixel_sdk_windows</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkRead.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\packet_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkWrite.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_read.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncRead.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_write.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncWrite.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_read.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\PacketHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_write.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\PortHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol1_packet_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol1PacketHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol2_packet_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol2PacketHandler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\RobotisDef.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\PortHandlerWindows.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\port_handler_windows.h">
<Filter>Header Files\dynamixel_sdk_windows</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\DynamixelSDK.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\port_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -18,6 +18,29 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\dynamixel_sdk.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_read.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_write.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_read.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_write.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\packet_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\port_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol1_packet_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol2_packet_handler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\port_handler_windows.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_read.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_write.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_read.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_write.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\packet_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\port_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol1_packet_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol2_packet_handler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\port_handler_windows.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BA6B6EF7-5702-4D45-83B1-F84598FA4264}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
......@@ -145,30 +168,6 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkRead.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkWrite.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncRead.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncWrite.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\PacketHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\PortHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol1PacketHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol2PacketHandler.cpp" />
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\PortHandlerWindows.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\DynamixelSDK.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkRead.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkWrite.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncRead.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncWrite.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\PacketHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\PortHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol1PacketHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol2PacketHandler.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk\RobotisDef.h" />
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\PortHandlerWindows.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
......
......@@ -27,67 +27,64 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkRead.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupBulkWrite.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncRead.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\GroupSyncWrite.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\PacketHandler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\PortHandler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol1PacketHandler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\Protocol2PacketHandler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\PortHandlerWindows.cpp">
<Filter>Source Files\dynamixel_sdk_windows</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkRead.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupBulkWrite.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_read.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncRead.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_bulk_write.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\GroupSyncWrite.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_read.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\PacketHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\group_sync_write.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\PortHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\packet_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol1PacketHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\port_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\Protocol2PacketHandler.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol1_packet_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk\RobotisDef.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk\protocol2_packet_handler.h">
<Filter>Header Files\dynamixel_sdk</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\PortHandlerWindows.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk_windows\port_handler_windows.h">
<Filter>Header Files\dynamixel_sdk_windows</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\DynamixelSDK.h">
<ClInclude Include="..\..\..\include\dynamixel_sdk.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_read.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_bulk_write.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_read.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\group_sync_write.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\packet_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\port_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol1_packet_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk\protocol2_packet_handler.cpp">
<Filter>Source Files\dynamixel_sdk</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dynamixel_sdk_windows\port_handler_windows.cpp">
<Filter>Source Files\dynamixel_sdk_windows</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
No preview for this file type
No preview for this file type
This diff is collapsed.
File deleted
File deleted
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\DXLMonitor.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4116F568-2D5C-413D-B36B-FA7E8AFC75FA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DXLMonitor</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86;..\..\..\..\build\windows\dynamixel_win32\Release</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86;..\..\..\..\build\dynamixel_win32</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;..\..\..\..\build\win64\output</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\..\..\..\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>dynamixel_win32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\..\..\..\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>dynamixel_win32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\..\..\..\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>dxl_x64_cpp.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerEnvironment>PATH=%PATH%;..\..\..\..\build\windows\dynamixel_win32\Release;</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerEnvironment>PATH=%PATH%;..\..\..\..\build\dynamixel_win32;</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerEnvironment>PATH=%PATH%;..\..\..\..\build\win64\output;</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
/*
* BulkRead.cpp
*
* Created on: 2016. 2. 21.
* Author: leon
*/
//
// ********* Bulk Read Example *********
//
//
// Available Dynamixel model on this example : MX or X series set to Protocol 1.0
// This example is tested with two Dynamixel MX-28, and an USB2DYNAMIXEL
// Be sure that Dynamixel MX properties are already set as %% ID : 1 / Baudnum : 1 (Baudrate : 1000000)
//
#ifdef __linux__
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
#elif defined(_WIN32) || defined(_WIN64)
#include <conio.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include "DynamixelSDK.h" // Uses Dynamixel SDK library
// Control table address
#define ADDR_MX_TORQUE_ENABLE 24 // Control table address is different in Dynamixel model
#define ADDR_MX_GOAL_POSITION 30
#define ADDR_MX_PRESENT_POSITION 36
#define ADDR_MX_MOVING 46
// Data Byte Length
#define LEN_MX_GOAL_POSITION 2
#define LEN_MX_PRESENT_POSITION 2
#define LEN_MX_MOVING 1
// Protocol version
#define PROTOCOL_VERSION 1.0 // See which protocol version is used in the Dynamixel
// Default setting
#define DXL1_ID 1 // Dynamixel#1 ID: 1
#define DXL2_ID 2 // Dynamixel#2 ID: 2
#define BAUDRATE 1000000
#define DEVICENAME "/dev/ttyUSB0" // Check which port is being used on your controller
// ex) Windows: "COM1" Linux: "/dev/ttyUSB0"
#define TORQUE_ENABLE 1 // Value for enabling the torque
#define TORQUE_DISABLE 0 // Value for disabling the torque
#define DXL_MINIMUM_POSITION_VALUE 100 // Dynamixel will rotate between this value
#define DXL_MAXIMUM_POSITION_VALUE 4000 // and this value (note that the Dynamixel would not move when the position value is out of movable range. Check e-manual about the range of the Dynamixel you use.)
#define DXL_MOVING_STATUS_THRESHOLD 10 // Dynamixel moving status threshold
#define ESC_ASCII_VALUE 0x1b
using namespace ROBOTIS; // Uses functions defined in ROBOTIS namespace
#ifdef __linux__
int _getch()
{
struct termios oldt, newt;
int ch;
tcgetattr( STDIN_FILENO, &oldt );
newt = oldt;
newt.c_lflag &= ~(ICANON | ECHO);
tcsetattr( STDIN_FILENO, TCSANOW, &newt );
ch = getchar();
tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
return ch;
}
int _kbhit(void)
{
struct termios oldt, newt;
int ch;
int oldf;
tcgetattr(STDIN_FILENO, &oldt);
newt = oldt;
newt.c_lflag &= ~(ICANON | ECHO);
tcsetattr(STDIN_FILENO, TCSANOW, &newt);
oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);
ch = getchar();
tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
fcntl(STDIN_FILENO, F_SETFL, oldf);
if(ch != EOF)
{
ungetc(ch, stdin);
return 1;
}
return 0;
}
#endif
int main()
{
// Initialize PortHandler instance
// Set the port path
// Get methods and members of PortHandlerLinux or PortHandlerWindows
PortHandler *portHandler = PortHandler::GetPortHandler(DEVICENAME);
// Initialize Packethandler instance
// Set the protocol version
// Get methods and members of Protocol1PacketHandler or Protocol2PacketHandler
PacketHandler *packetHandler = PacketHandler::GetPacketHandler(PROTOCOL_VERSION);
// Initialize Groupbulkread instance
GroupBulkRead groupBulkRead(portHandler, packetHandler);
int index = 0;
int dxl_comm_result = COMM_TX_FAIL; // Communication result
bool dxl_addparam_result = false; // AddParam result
bool dxl_getdata_result = false; // GetParam result
int dxl_goal_position[2] = {DXL_MINIMUM_POSITION_VALUE, DXL_MAXIMUM_POSITION_VALUE}; // Goal position
UINT8_T dxl_error = 0; // Dynamixel error
UINT16_T dxl1_present_position = 0; // Present position
UINT8_T dxl2_moving = 0; // Dynamixel moving status
// Open port
if( portHandler->OpenPort() )
{
printf( "Succeeded to open the port!\n" );
}
else
{
printf( "Failed to open the port!\n" );
printf( "Press any key to terminate...\n" );
_getch();
return 0;
}
// Set port baudrate
if( portHandler->SetBaudRate(BAUDRATE) )
{
printf( "Succeeded to change the baudrate!\n" );
}
else
{
printf( "Failed to change the baudrate!\n" );
printf( "Press any key to terminate...\n" );
_getch();
return 0;
}
// Enable Dynamixel#1 Torque
dxl_comm_result = packetHandler->Write1ByteTxRx(portHandler, DXL1_ID, ADDR_MX_TORQUE_ENABLE, TORQUE_ENABLE, &dxl_error);
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
else if(dxl_error != 0)
packetHandler->PrintRxPacketError(dxl_error);
else
printf("Dynamixel#%d has been successfully connected \n", DXL1_ID);
// Enable Dynamixel#2 Torque
dxl_comm_result = packetHandler->Write1ByteTxRx(portHandler, DXL2_ID, ADDR_MX_TORQUE_ENABLE, TORQUE_ENABLE, &dxl_error);
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
else if(dxl_error != 0)
packetHandler->PrintRxPacketError(dxl_error);
else
printf("Dynamixel#%d has been successfully connected \n", DXL2_ID);
// Add parameter storage for Dynamixel#1 present position value
dxl_addparam_result = groupBulkRead.AddParam(DXL1_ID, ADDR_MX_PRESENT_POSITION, LEN_MX_PRESENT_POSITION);
if( dxl_addparam_result != true )
{
fprintf(stderr, "[ID:%03d] grouBulkRead addparam failed", DXL1_ID);
return 0;
}
// Add parameter storage for Dynamixel#2 present moving value
dxl_addparam_result = groupBulkRead.AddParam(DXL2_ID, ADDR_MX_MOVING, LEN_MX_MOVING);
if( dxl_addparam_result != true )
{
fprintf(stderr, "[ID:%03d] grouBulkRead addparam failed", DXL2_ID);
return 0;
}
while(1)
{
printf("Press any key to continue! (or press ESC to quit!)\n");
if(_getch() == ESC_ASCII_VALUE)
break;
// Write Dynamixel#1 goal position
dxl_comm_result = packetHandler->Write2ByteTxRx(portHandler, DXL1_ID, ADDR_MX_GOAL_POSITION, dxl_goal_position[index], &dxl_error);
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
else if(dxl_error != 0)
packetHandler->PrintRxPacketError(dxl_error);
// Write Dynamixel#2 goal position
dxl_comm_result = packetHandler->Write2ByteTxRx(portHandler, DXL2_ID, ADDR_MX_GOAL_POSITION, dxl_goal_position[index], &dxl_error);
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
else if(dxl_error != 0)
packetHandler->PrintRxPacketError(dxl_error);
do
{
// Bulkread present position and moving status
dxl_comm_result = groupBulkRead.TxRxPacket();
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
dxl_getdata_result = groupBulkRead.IsAvailable(DXL1_ID, ADDR_MX_PRESENT_POSITION, LEN_MX_PRESENT_POSITION);
if (dxl_getdata_result != true)
{
fprintf(stderr, "[ID:%03d] groupBulkRead getdata failed", DXL1_ID);
return 0;
}
dxl_getdata_result = groupBulkRead.IsAvailable(DXL2_ID, ADDR_MX_MOVING, LEN_MX_MOVING);
if (dxl_getdata_result != true)
{
fprintf(stderr, "[ID:%03d] groupBulkRead getdata failed", DXL2_ID);
return 0;
}
// Get Dynamixel#1 present position value
dxl1_present_position = groupBulkRead.GetData(DXL1_ID, ADDR_MX_PRESENT_POSITION, LEN_MX_PRESENT_POSITION);
// Get Dynamixel#2 moving status value
dxl2_moving = groupBulkRead.GetData(DXL2_ID, ADDR_MX_MOVING, LEN_MX_MOVING);
printf("[ID:%03d] Present Position : %d \t [ID:%03d] Is Moving : %d\n", DXL1_ID, dxl1_present_position, DXL2_ID, dxl2_moving);
}while(abs(dxl_goal_position[index] - dxl1_present_position) > DXL_MOVING_STATUS_THRESHOLD);
// Change goal position
if( index == 0 )
index = 1;
else
index = 0;
}
// Disable Dynamixel#1 Torque
dxl_comm_result = packetHandler->Write1ByteTxRx(portHandler, DXL1_ID, ADDR_MX_TORQUE_ENABLE, TORQUE_DISABLE, &dxl_error);
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
else if(dxl_error != 0)
packetHandler->PrintRxPacketError(dxl_error);
// Disable Dynamixel#2 Torque
dxl_comm_result = packetHandler->Write1ByteTxRx(portHandler, DXL2_ID, ADDR_MX_TORQUE_ENABLE, TORQUE_DISABLE, &dxl_error);
if(dxl_comm_result != COMM_SUCCESS)
packetHandler->PrintTxRxResult(dxl_comm_result);
else if(dxl_error != 0)
packetHandler->PrintRxPacketError(dxl_error);
// Close port
portHandler->ClosePort();
return 0;
}
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment