Motor Control library used by ETH boards is now compiled in C++ #397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The files of the motor control library used by the ETH boards are now compiled in C++ mode.
This library was originally developed to run in a C environment on the ETH boards (
ems
etc).Over the years, some of its .c files have been added C++ model generated code and so they have been compiled in C++ mode.
Now, we need some other files to contain C++ code, so I have moved all the files into C++ compilation.
To allow a correct compilation on the ETH boards where the functions w/ prefix
MController_*
are ued by both C and C++ modules, I have done a minor change to the .h files. In particular:Controller.h
which contains the public interface:Controller.h
an opaque struct for theMController
which is used only via it pointer. ```Joint.h
etc) that are used only in its internal implementation;Controller.h
an opaque struct for theMController
which is used only via it pointer.The files that use the library have been kept unchanged. Only the projects of the
ems
,mc4plus
andmc2plus
now compile the filesAbsEncoder.c
etc in C++ mode.There is no change in code that requires a new version of the binaries or tests.