Skip to content

Dynamixel2Arduino does not compile for STM32 #86

@Duffmann

Description

@Duffmann

Issue
Any Ardunio sketch for STM32 CPUs/Boards that tries to #include <Dynamixel2Arduino.h> fails to compile/build.

Reason
actuator.h defines the enum "ControlTableItemIndex" which uses the keyword "LED_GREEN".
For Arduino boards using the STM32 core "LED_GREEN" is defined as macro for the Arduino pin number of the onboard LED. In case of Nucleo-64 / Nucleo F446RE it simply evaluates to 200 and hence cannot be (re)used as a keyword in an enum.

Solution

  • Adding #undef LED_GREEN right in front of the definition of ControlTableItemIndex in actuator.h (might have side effects)
  • Or rename keyword to e.g. "LED_GREE" in actuator.h, actuator.cpp and keywords.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions