Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #17 and "default argument on the declaration, not the definition" #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/DynamixelInterfaceArduinoImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ void DynamixelInterfaceImpl<T>::readMode()
if(mDirectionPin!=NO_DIR_PORT)
{
digitalWrite(mDirectionPin, LOW);
//enable listen() here:
setReadMode(mStream, mTxPin)
}
else
{
Expand All @@ -35,6 +37,8 @@ void DynamixelInterfaceImpl<T>::writeMode()
if(mDirectionPin!=NO_DIR_PORT)
{
digitalWrite(mDirectionPin, HIGH);
//disable listen() here:
setWriteMode(mStream, mTxPin);
}
else
{
Expand All @@ -43,7 +47,7 @@ void DynamixelInterfaceImpl<T>::writeMode()
}

template<class T>
DynamixelInterfaceImpl<T>::DynamixelInterfaceImpl(T &aStream, uint8_t aTxPin, uint8_t aDirectionPin=NO_DIR_PORT):
DynamixelInterfaceImpl<T>::DynamixelInterfaceImpl(T &aStream, uint8_t aTxPin, uint8_t aDirectionPin):
mStream(aStream), mDirectionPin(aDirectionPin), mTxPin(aTxPin)
{
if(mDirectionPin!=NO_DIR_PORT)
Expand Down
2 changes: 1 addition & 1 deletion src/DynamixelInterfaceArduinoImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DynamixelInterfaceImpl:public DynamixelInterface
* \param[in] aTxPin : pin number of the tx pin
* \param[in] aDirectionPin : direction pin, use NO_DIR_PORT if you do not use one (default)
*/
DynamixelInterfaceImpl(T &aStream, uint8_t aTxPin, uint8_t aDirectionPin);
DynamixelInterfaceImpl(T &aStream, uint8_t aTxPin, uint8_t aDirectionPin=NO_DIR_PORT);

/**
* \brief Destructor
Expand Down