Bonsoir
une réponse un peu tardive suite à une absence
en premier leu je vous présente mes meilleurs voeux pour 2017
je persiste dans l'utilisation de l'EDI d'arduino
je retire bien la puce pour programmer
j'ai installer dans les répertoire"librairies" toutes les librairies fournies avec la version r147
par contre lorsque je lance la compilation j'ai une erreur au niveau de la ligne 218 de l'onglet "webserver (dernière ligne de lacopie d'écran
Code : Tout sélectionner
//********************************************************************************
// Web Interface init
//********************************************************************************
void WebServerInit()
{
// Prepare webserver pages
WebServer.on("/", handle_root);
WebServer.on("/config", handle_config);
WebServer.on("/hardware", handle_hardware);
WebServer.on("/devices", handle_devices);
WebServer.on("/log", handle_log);
WebServer.on("/tools", handle_tools);
WebServer.on("/i2cscanner", handle_i2cscanner);
WebServer.on("/wifiscanner", handle_wifiscanner);
WebServer.on("/login", handle_login);
WebServer.on("/control", handle_control);
WebServer.on("/download", handle_download);
WebServer.on("/upload", HTTP_GET, handle_upload);
WebServer.on("/upload", HTTP_POST, handle_upload_post, handleFileUpload);
WebServer.onNotFound(handleNotFound);
#if FEATURE_SPIFFS
WebServer.on("/filelist", handle_filelist);
#else
WebServer.on("/esp.css", handle_css);
#endif
WebServer.on("/advanced", handle_advanced);
WebServer.on("/setup", handle_setup);
WebServer.on("/json", handle_json);
WebServer.on("/rules", handle_rules);
if (ESP.getFlashChipRealSize() > 524288)
httpUpdater.setup(&WebServer);
#if FEATURE_SSDP
if (Settings.UseSSDP)
{
WebServer.on("/ssdp.xml", HTTP_GET, []() {
SSDP_schema(WebServer.client());
});
SSDP_begin();
}
#endif
WebServer.begin();
}
//********************************************************************************
// Add top menu
//********************************************************************************
void addHeader(boolean showMenu, String& str)
{
boolean cssfile = false;
str += F("<script language=\"javascript\"><!--\n");
str += F("function dept_onchange(frmselect) {frmselect.submit();}\n");
str += F("//--></script>");
str += F("<head><title>");
str += Settings.Name;
str += F("</title>");
#if FEATURE_SPIFFS
File f = SPIFFS.open("esp.css", "r");
if (f)
{
cssfile = true;
f.close();
}
#else
if (Settings.CustomCSS)
cssfile = true;
#endif
if (!cssfile)
{
str += F("<style>");
str += F("* {font-family:sans-serif; font-size:12pt;}");
str += F("h1 {font-size:16pt; color:black;}");
str += F("h6 {font-size:10pt; color:black; text-align:center;}");
str += F(".button-menu {background-color:#ffffff; color:blue; margin: 10px; text-decoration:none}");
str += F(".button-link {padding:5px 15px; background-color:#0077dd; color:#fff; border:solid 1px #fff; text-decoration:none}");
str += F(".button-menu:hover {background:#ddddff;}");
str += F(".button-link:hover {background:#369;}");
str += F("th {padding:10px; background-color:black; color:#ffffff;}");
str += F("td {padding:7px;}");
str += F("table {color:black;}");
str += F(".div_l {float: left;}");
str += F(".div_r {float: right; margin: 2px; padding: 1px 10px; border-radius: 7px; background-color:#080; color:white;}");
str += F(".div_br {clear: both;}");
str += F("</style>");
}
else
str += F("<link rel=\"stylesheet\" type=\"text/css\" href=\"esp.css\">");
str += F("</head>");
str += F("<h1>Welcome to ESP Easy: ");
str += Settings.Name;
#if FEATURE_SPIFFS
f = SPIFFS.open("esp.png", "r");
if (f)
{
str += F("<img src=\"esp.png\" width=50 height=50 align=right >");
f.close();
}
#endif
str += F("</h1>");
if (showMenu)
{
str += F("<BR><a class=\"button-menu\" href=\".\">Main</a>");
str += F("<a class=\"button-menu\" href=\"config\">Config</a>");
str += F("<a class=\"button-menu\" href=\"hardware\">Hardware</a>");
str += F("<a class=\"button-menu\" href=\"devices\">Devices</a>");
if (Settings.UseRules)
str += F("<a class=\"button-menu\" href=\"rules\">Rules</a>");
str += F("<a class=\"button-menu\" href=\"tools\">Tools</a><BR><BR>");
}
}
//********************************************************************************
// Add footer to web page
//********************************************************************************
void addFooter(String& str)
{
str += F("<h6>Powered by www.letscontrolit.com</h6></body>");
}
//********************************************************************************
// Web Interface root page
//********************************************************************************
void handle_root() {
// if Wifi setup, launch setup wizard
if (wifiSetup)
{
WebServer.send(200, "text/html", "<meta HTTP-EQUIV='REFRESH' content='0; url=http://192.168.4.1/setup'>");
return;
}
if (!isLoggedIn()) return;
int freeMem = ESP.getFreeHeap();
String sCommand = WebServer.arg("cmd");
if ((strcasecmp_P(sCommand.c_str(), PSTR("wifidisconnect")) != 0) && (strcasecmp_P(sCommand.c_str(), PSTR("reboot")) != 0))
{
String reply = "";
addHeader(true, reply);
printToWeb = true;
printWebString = "";
if (sCommand.length() > 0)
ExecuteCommand(VALUE_SOURCE_HTTP, sCommand.c_str());
IPAddress ip = WiFi.localIP();
IPAddress gw = WiFi.gatewayIP();
reply += printWebString;
reply += F("<form>");
reply += F("<table><TH>System Info<TH><TH>");
#if FEATURE_TIME
if (Settings.UseNTP)
{
reply += F("<TR><TD>System Time:<TD>");
reply += hour();
reply += ":";
if (minute() < 10)
reply += "0";
reply += minute();
}
#endif
reply += F("<TR><TD>Load:<TD>");
if (wdcounter > 0)
{
reply += 100 - (100 * loopCounterLast / loopCounterMax);
reply += F("% (LC=");
reply += int(loopCounterLast / 30);
reply += F(")");
}
reply += F("<TR><TD>Uptime:<TD>");
reply += wdcounter / 2;
reply += F(" minutes");
if (WiFi.status() == WL_CONNECTED)
{
reply += F("<TR><TD>Wifi RSSI:<TD>");
reply += WiFi.RSSI();
reply += F(" dB");
}
char str[20];
sprintf_P(str, PSTR("%u.%u.%u.%u"), ip[0], ip[1], ip[2], ip[3]);
reply += F("<TR><TD>IP:<TD>");
reply += str;
sprintf_P(str, PSTR("%u.%u.%u.%u"), gw[0], gw[1], gw[2], gw[3]);
reply += F("<TR><TD>GW:<TD>");
reply += str;
reply += F("<TR><TD>Build:<TD>");
reply += BUILD;
reply += F(" ");
reply += F(BUILD_NOTES);
reply += F("<TR><TD>Core Version:<TD>");
reply += ESP.getCoreVersion();
le message qui s'affiche est les suivant
Code : Tout sélectionner
WebServer.ino: In function 'void handle_root()':
WebServer.ino:214:18: error: 'class EspClass' has no member named 'getCoreVersion'
'class EspClass' has no member named 'getCoreVersion'
si je supprime cette ligne la compilation et le chargement fr l'esp8266 se passe correctement
Je n'arrive pas à identifier mon erreur
je compte donc sur votre aide
par avance merci