Closed furyfire closed 8 years ago
It's not Homie' fault.
The min() you're using when you call the min()
function is not the std
one, but the one defined by a #define there. The problem is ESP8266WiFi.h undefines both min and max. You can try:
#include <ESP8266WiFi.h>
void setup() {
min(2,3);
}
void loop() {
delay(100);
}
It won't work either. The issue is tracked at esp8266/Arduino#398
As a workaround, you can use _min and _max.
After including Homie.h any code that uses the min() function will fail to compile unless you give it a namespace. This is unlike other Arduino libs and causes confusion.
include
include
void setup() { std::min(2,3); }
void loop() { }