evert-arias / EasyBuzzer

The Beep Library For Arduino

Home Page:https://evert-arias.github.io/EasyBuzzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Request BugFix] error: no matching function for call to 'max(int, const unsigned int&)'

LuckyLuzz opened this issue · comments

Hey,
recently the ESP32 Core for Arduino has been updated and now it is not possible to Build the Library.

The compiler error message is:

C:\Users\XXX.platformio\lib\EasyBuzzer_ID1883\src\EasyBuzzer.cpp: In member function 'void EasyBuzzerClass::beep(unsigned int, unsigned int, unsigned int, byte, unsigned int, unsigned int)':
C:\Users\XXX\.platformio\lib\EasyBuzzer_ID1883\src\EasyBuzzer.cpp:33:61: error: no matching function for call to 'max(int, const unsigned int&)'
mOnDuration = onDuration ? max(MINIMUM_INTERVAL, onDuration) : 0;
^

Environment:
Win10, VS Code (V1.30.2)
PlattformIO (V3.6.3)
Plattform Espressif 32(V1.6.0) with ESP-IDF 3.1.2

@shoteff Hi,
I already found a solution to this issue and I will be updating the code as soon as possible. Thanks for reporting the issue.

This issue has been solved. 58ab24d

This issue is consider to be solved

there are still many missing max function errors in other boards. I am using a stm32 board

fixed by adding #define MAX(X, Y) (((X) < (Y)) ? (Y) : (X))