stoduk / PingSerial

Arduino library for using serial enabled ultrasonic distance modules (eg. US-100)
MIT License
16 stars 9 forks source link

Fix compile error when max() is a template function #9

Open jakeru opened 4 years ago

jakeru commented 4 years ago

When max() is a template function instead of a macro the two arguments to it must be of same type.

The problem was raised in issue https://github.com/stoduk/PingSerial/issues/6 "Cant compile for nodemcu/ESP8266" and I had the same problem when trying to use the library.

This change is the same that Anthony Toole proposed as a fix for this issue. I have verified that with this change the library works also with ESP8266 core 2.6.3.