Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

[BUG] _round definition conflict with framework-arduinoespressif32

Open winking324 opened this issue 3 years ago • 1 comments

Describe the bug

In file included from .pio/libdeps/debug/Simple FOC/src/drivers/BLDCDriver3PWM.h:5,
                 from .pio/libdeps/debug/Simple FOC/src/drivers/BLDCDriver3PWM.cpp:1:
.pio/libdeps/debug/Simple FOC/src/drivers/../common/foc_utils.h:8: warning: "_round" redefined
 #define _round(x) ((x)>=0?(long)((x)+0.5f):(long)((x)-0.5f))
 
In file included from .pio/libdeps/debug/Simple FOC/src/drivers/../common/base_classes/BLDCDriver.h:4,
                 from .pio/libdeps/debug/Simple FOC/src/drivers/BLDCDriver3PWM.h:4,
                 from .pio/libdeps/debug/Simple FOC/src/drivers/BLDCDriver3PWM.cpp:1:
/Users/xxxx/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:77: note: this is the location of the previous definition
 #define _round(x)     ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))  // round() comes from STL

IDE you are using

  • Platformio

framework-arduinoespressif32 is version 2.0.4 Simple FOC is version 2.2.2

winking324 avatar Aug 16 '22 11:08 winking324

Huh, we will fix this in the next release. For now you can comment the _round definition in the simplefoc library. :smile:

askuric avatar Aug 16 '22 15:08 askuric