ekstrand / ESP8266wifi

ESP8266 Arduino library with built in reconnect functionality

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error compiling - missing "min"

gioreva opened this issue · comments

  1. Not Compile. See abore errors.
  2. Can I have one example of costructor, hardware serial and no reset connectet ?

Arduino:1.7.11 (Windows 7), Scheda:"Arduino M0"

D:\Documents\Arduino\libraries\ESP8266wifi-master\ESP8266wifi.cpp: In member function 'WifiMessage ESP8266wifi::listenForIncomingMessage(int)':

D:\Documents\Arduino\libraries\ESP8266wifi-master\ESP8266wifi.cpp:547:60: error: 'min' was not declared in this scope

     readBuffer(&msgIn[0], min(length, sizeof(msgIn) - 1));

                                                        ^

D:\Documents\Arduino\libraries\ESP8266wifi-master\ESP8266wifi.cpp: In member function 'WifiMessage ESP8266wifi::getIncomingMessage()':

D:\Documents\Arduino\libraries\ESP8266wifi-master\ESP8266wifi.cpp:584:60: error: 'min' was not declared in this scope

     readBuffer(&msgIn[0], min(length, sizeof(msgIn) - 1));

                                                        ^

Errore durante la compilazione

Questo report potrebbe essere più ricco
di informazioni con
"Mostra un output dettagliato durante la compilazione"
abilitato in "File > Impostazioni"

What kind of environment are you compiling in? The min function is part of the Arduino "language reference", so it should be available in all compatible environments. See https://www.arduino.cc/en/Reference/Min