Skip to content

[BUG] _round definition conflict with framework-arduinoespressif32 #207

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

Closed
winking324 opened this issue Aug 16, 2022 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@winking324
Copy link

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

@askuric
Copy link
Member

askuric commented Aug 16, 2022

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

@askuric askuric added bug Something isn't working and removed possible bug labels Aug 16, 2022
@askuric askuric added enhancement New feature or request and removed bug Something isn't working labels Oct 9, 2022
@askuric askuric closed this as completed Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants