Closed benoittgt closed 2 years ago
You have a syntax error in your copy of the code, did you copy and paste from a browser? Start from the top of the error log to see where the issue started. Alternatively go to the very last } and hover on that and it will highlight the start { which should be the immediate function, if so, move up to the next function } and check that, eventually you will find the missing { or error.
There are no code errors.
Hello
I am successfully flashing my ESP32. I have simply one issue:
Full logs!
``` /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void setup()': Waveshare_4_2:113:7: error: 'StartWiFi' was not declared in this scope if (StartWiFi() == WL_CONNECTED && SetupTime() == true) { ^~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:113:7: note: suggested alternative: 'StartTime' if (StartWiFi() == WL_CONNECTED && SetupTime() == true) { ^~~~~~~~~ StartTime Waveshare_4_2:113:38: error: 'SetupTime' was not declared in this scope if (StartWiFi() == WL_CONNECTED && SetupTime() == true) { ^~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:113:38: note: suggested alternative: 'SleepTime' if (StartWiFi() == WL_CONNECTED && SetupTime() == true) { ^~~~~~~~~ SleepTime Waveshare_4_2:115:7: error: 'InitialiseDisplay' was not declared in this scope InitialiseDisplay(); // Give screen time to initialise by getting weather data! ^~~~~~~~~~~~~~~~~ Waveshare_4_2:125:9: error: 'StopWiFi' was not declared in this scope StopWiFi(); // Reduces power consumption ^~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:125:9: note: suggested alternative: 'WiFi' StopWiFi(); // Reduces power consumption ^~~~~~~~ WiFi Waveshare_4_2:126:9: error: 'DisplayWeather' was not declared in this scope DisplayWeather(); ^~~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:126:9: note: suggested alternative: 'DecodeWeather' DisplayWeather(); ^~~~~~~~~~~~~~ DecodeWeather Waveshare_4_2:131:3: error: 'BeginSleep' was not declared in this scope BeginSleep(); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DisplayWeather()': Waveshare_4_2:152:3: error: 'DrawHeadingSection' was not declared in this scope DrawHeadingSection(); // Top line of the display ^~~~~~~~~~~~~~~~~~ Waveshare_4_2:153:3: error: 'DrawMainWeatherSection' was not declared in this scope DrawMainWeatherSection(172, 70); // Centre section of display for Location, temperature, Weather report, current Wx Symbol and wind direction ^~~~~~~~~~~~~~~~~~~~~~ Waveshare_4_2:154:3: error: 'DrawForecastSection' was not declared in this scope DrawForecastSection(233, 15); // 3hr forecast boxes ^~~~~~~~~~~~~~~~~~~ Waveshare_4_2:155:3: error: 'DisplayPrecipitationSection' was not declared in this scope DisplayPrecipitationSection(233, 82); // Precipitation sectio ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Waveshare_4_2:156:39: error: 'Visibility' was not declared in this scope if (WxConditions[0].Visibility > 0) Visibility(335, 100, String(WxConditions[0].Visibility) + "M"); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:156:39: note: suggested alternative: 'isDigit' if (WxConditions[0].Visibility > 0) Visibility(335, 100, String(WxConditions[0].Visibility) + "M"); ^~~~~~~~~~ isDigit Waveshare_4_2:157:39: error: 'CloudCover' was not declared in this scope if (WxConditions[0].Cloudcover > 0) CloudCover(350, 125, WxConditions[0].Cloudcover); ^~~~~~~~~~ Waveshare_4_2:158:3: error: 'DrawAstronomySection' was not declared in this scope DrawAstronomySection(233, 74); // Astronomy section Sun rise/set, Moon phase and Moon icon ^~~~~~~~~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawHeadingSection()': Waveshare_4_2:163:3: error: 'drawString' was not declared in this scope drawString(SCREEN_WIDTH / 2, 0, City, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:163:3: note: suggested alternative: 'String' drawString(SCREEN_WIDTH / 2, 0, City, CENTER); ^~~~~~~~~~ String Waveshare_4_2:166:3: error: 'DrawBattery' was not declared in this scope DrawBattery(65, 12); ^~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawMainWeatherSection(int, int)': Waveshare_4_2:171:3: error: 'DisplayDisplayWindSection' was not declared in this scope DisplayDisplayWindSection(x - 115, y - 3, WxConditions[0].Winddir, WxConditions[0].Windspeed, 40); ^~~~~~~~~~~~~~~~~~~~~~~~~ Waveshare_4_2:172:3: error: 'DisplayWXicon' was not declared in this scope DisplayWXicon(x + 5, y - 5, WxConditions[0].Icon, LargeIcon); ^~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:172:3: note: suggested alternative: 'DisplayWeather' DisplayWXicon(x + 5, y - 5, WxConditions[0].Icon, LargeIcon); ^~~~~~~~~~~~~ DisplayWeather Waveshare_4_2:174:3: error: 'DrawPressureAndTrend' was not declared in this scope DrawPressureAndTrend(x - 120, y + 58, WxConditions[0].Pressure, WxConditions[0].Trend); ^~~~~~~~~~~~~~~~~~~~ Waveshare_4_2:179:3: error: 'drawStringMaxWidth' was not declared in this scope drawStringMaxWidth(x - 170, y + 83, 28, TitleCase(Wx_Description), LEFT); ^~~~~~~~~~~~~~~~~~ Waveshare_4_2:180:3: error: 'DrawMainWx' was not declared in this scope DrawMainWx(x, y + 60); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawForecastSection(int, int)': Waveshare_4_2:186:3: error: 'DrawForecastWeather' was not declared in this scope DrawForecastWeather(x, y, 0); ^~~~~~~~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:186:3: note: suggested alternative: 'DrawForecastSection' DrawForecastWeather(x, y, 0); ^~~~~~~~~~~~~~~~~~~ DrawForecastSection Waveshare_4_2:203:3: error: 'drawString' was not declared in this scope drawString(SCREEN_WIDTH / 2, y + 180, TXT_FORECAST_VALUES, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:203:3: note: suggested alternative: 'String' drawString(SCREEN_WIDTH / 2, y + 180, TXT_FORECAST_VALUES, CENTER); ^~~~~~~~~~ String Waveshare_4_2:205:3: error: 'DrawGraph' was not declared in this scope DrawGraph(SCREEN_WIDTH / 400 * 30, SCREEN_HEIGHT / 300 * 221, SCREEN_WIDTH / 4, SCREEN_HEIGHT / 5, 900, 1050, Units == "M" ? TXT_PRESSURE_HPA : TXT_PRESSURE_IN, pressure_readings, max_readings, autoscale_on, barchart_off); ^~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:205:3: note: suggested alternative: 'isGraph' DrawGraph(SCREEN_WIDTH / 400 * 30, SCREEN_HEIGHT / 300 * 221, SCREEN_WIDTH / 4, SCREEN_HEIGHT / 5, 900, 1050, Units == "M" ? TXT_PRESSURE_HPA : TXT_PRESSURE_IN, pressure_readings, max_readings, autoscale_on, barchart_off); ^~~~~~~~~ isGraph /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawForecastWeather(int, int, int)': Waveshare_4_2:214:3: error: 'DisplayWXicon' was not declared in this scope DisplayWXicon(x + 28, y + 35, WxForecast[index].Icon, SmallIcon); ^~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:214:3: note: suggested alternative: 'DisplayWeather' DisplayWXicon(x + 28, y + 35, WxForecast[index].Icon, SmallIcon); ^~~~~~~~~~~~~ DisplayWeather Waveshare_4_2:215:3: error: 'drawString' was not declared in this scope drawString(x + 31, y + 3, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:215:3: note: suggested alternative: 'String' drawString(x + 31, y + 3, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER); ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawMainWx(int, int)': Waveshare_4_2:221:3: error: 'drawString' was not declared in this scope drawString(x - 25, y - 22, String(WxConditions[0].Temperature, 1) + "°" + (Units == "M" ? "C" : "F"), CENTER); // Show current Temperature ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:221:3: note: suggested alternative: 'String' drawString(x - 25, y - 22, String(WxConditions[0].Temperature, 1) + "°" + (Units == "M" ? "C" : "F"), CENTER); // Show current Temperature ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DisplayDisplayWindSection(int, int, float, float, int)': Waveshare_4_2:230:3: error: 'arrow' was not declared in this scope arrow(x, y, Cradius - 7, angle, 12, 18); // Show wind direction on outer circle of width and length ^~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:230:3: note: suggested alternative: 'perror' arrow(x, y, Cradius - 7, angle, 12, 18); // Show wind direction on outer circle of width and length ^~~~~ perror Waveshare_4_2:240:19: error: 'drawString' was not declared in this scope if (a == 45) drawString(dxo + x + 10, dyo + y - 10, TXT_NE, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:240:19: note: suggested alternative: 'String' if (a == 45) drawString(dxo + x + 10, dyo + y - 10, TXT_NE, CENTER); ^~~~~~~~~~ String Waveshare_4_2:241:19: error: 'drawString' was not declared in this scope if (a == 135) drawString(dxo + x + 7, dyo + y + 5, TXT_SE, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:241:19: note: suggested alternative: 'String' if (a == 135) drawString(dxo + x + 7, dyo + y + 5, TXT_SE, CENTER); ^~~~~~~~~~ String Waveshare_4_2:242:19: error: 'drawString' was not declared in this scope if (a == 225) drawString(dxo + x - 15, dyo + y, TXT_SW, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:242:19: note: suggested alternative: 'String' if (a == 225) drawString(dxo + x - 15, dyo + y, TXT_SW, CENTER); ^~~~~~~~~~ String Waveshare_4_2:243:19: error: 'drawString' was not declared in this scope if (a == 315) drawString(dxo + x - 15, dyo + y - 10, TXT_NW, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:243:19: note: suggested alternative: 'String' if (a == 315) drawString(dxo + x - 15, dyo + y - 10, TXT_NW, CENTER); ^~~~~~~~~~ String Waveshare_4_2:253:3: error: 'drawString' was not declared in this scope drawString(x, y - Cradius - 10, TXT_N, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:253:3: note: suggested alternative: 'String' drawString(x, y - Cradius - 10, TXT_N, CENTER); ^~~~~~~~~~ String Waveshare_4_2:257:29: error: 'WindDegToDirection' was not declared in this scope drawString(x - 2, y - 20, WindDegToDirection(angle), CENTER); ^~~~~~~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:257:29: note: suggested alternative: 'gpio_set_direction' drawString(x - 2, y - 20, WindDegToDirection(angle), CENTER); ^~~~~~~~~~~~~~~~~~ gpio_set_direction /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawPressureAndTrend(int, int, float, String)': Waveshare_4_2:283:3: error: 'drawString' was not declared in this scope drawString(x, y, String(pressure, (Units == "M" ? 0 : 1)) + (Units == "M" ? "mb" : "in"), CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:283:3: note: suggested alternative: 'String' drawString(x, y, String(pressure, (Units == "M" ? 0 : 1)) + (Units == "M" ? "mb" : "in"), CENTER); ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DisplayPrecipitationSection(int, int)': Waveshare_4_2:303:5: error: 'drawString' was not declared in this scope drawString(x + 5, y + 15, String(WxForecast[1].Rainfall, 2) + (Units == "M" ? "mm" : "in"), LEFT); // Only display rainfall total today if > 0 ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:303:5: note: suggested alternative: 'String' drawString(x + 5, y + 15, String(WxForecast[1].Rainfall, 2) + (Units == "M" ? "mm" : "in"), LEFT); // Only display rainfall total today if > 0 ^~~~~~~~~~ String Waveshare_4_2:304:5: error: 'addraindrop' was not declared in this scope addraindrop(x + 65 - (Units == "I" ? 10 : 0), y + 16, 7); ^~~~~~~~~~~ Waveshare_4_2:307:5: error: 'drawString' was not declared in this scope drawString(x + 5, y + 35, String(WxForecast[1].Snowfall, 2) + (Units == "M" ? "mm" : "in") + " * *", LEFT); // Only display snowfall total today if > 0 ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:307:5: note: suggested alternative: 'String' drawString(x + 5, y + 35, String(WxForecast[1].Snowfall, 2) + (Units == "M" ? "mm" : "in") + " * *", LEFT); // Only display snowfall total today if > 0 ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawAstronomySection(int, int)': Waveshare_4_2:313:3: error: 'drawString' was not declared in this scope drawString(x + 7, y + 70, ConvertUnixTime(WxConditions[0].Sunrise + WxConditions[0].Timezone).substring(0, (Units == "M" ? 5 : 7)) + " " + TXT_SUNRISE, LEFT); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:313:3: note: suggested alternative: 'String' drawString(x + 7, y + 70, ConvertUnixTime(WxConditions[0].Sunrise + WxConditions[0].Timezone).substring(0, (Units == "M" ? 5 : 7)) + " " + TXT_SUNRISE, LEFT); ^~~~~~~~~~ String Waveshare_4_2:320:30: error: 'MoonPhase' was not declared in this scope drawString(x + 7, y + 100, MoonPhase(day_utc, month_utc, year_utc), LEFT); ^~~~~~~~~ Waveshare_4_2:321:3: error: 'DrawMoon' was not declared in this scope DrawMoon(x + 105, y + 50, day_utc, month_utc, year_utc, Hemisphere); ^~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:321:3: note: suggested alternative: 'DrawMainWx' DrawMoon(x + 105, y + 50, day_utc, month_utc, year_utc, Hemisphere); ^~~~~~~~ DrawMainWx /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DisplayWXicon(int, int, String, bool)': Waveshare_4_2:408:53: error: 'Sunny' was not declared in this scope if (IconName == "01d" || IconName == "01n") Sunny(x, y, IconSize, IconName); ^~~~~ Waveshare_4_2:409:53: error: 'MostlySunny' was not declared in this scope else if (IconName == "02d" || IconName == "02n") MostlySunny(x, y, IconSize, IconName); ^~~~~~~~~~~ Waveshare_4_2:410:53: error: 'Cloudy' was not declared in this scope else if (IconName == "03d" || IconName == "03n") Cloudy(x, y, IconSize, IconName); ^~~~~~ Waveshare_4_2:411:53: error: 'MostlySunny' was not declared in this scope else if (IconName == "04d" || IconName == "04n") MostlySunny(x, y, IconSize, IconName); ^~~~~~~~~~~ Waveshare_4_2:412:53: error: 'ChanceRain' was not declared in this scope else if (IconName == "09d" || IconName == "09n") ChanceRain(x, y, IconSize, IconName); ^~~~~~~~~~ Waveshare_4_2:413:53: error: 'Rain' was not declared in this scope else if (IconName == "10d" || IconName == "10n") Rain(x, y, IconSize, IconName); ^~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:413:53: note: suggested alternative: 'tan' else if (IconName == "10d" || IconName == "10n") Rain(x, y, IconSize, IconName); ^~~~ tan Waveshare_4_2:414:53: error: 'Tstorms' was not declared in this scope else if (IconName == "11d" || IconName == "11n") Tstorms(x, y, IconSize, IconName); ^~~~~~~ Waveshare_4_2:415:53: error: 'Snow' was not declared in this scope else if (IconName == "13d" || IconName == "13n") Snow(x, y, IconSize, IconName); ^~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:415:53: note: suggested alternative: 'pow' else if (IconName == "13d" || IconName == "13n") Snow(x, y, IconSize, IconName); ^~~~ pow Waveshare_4_2:416:53: error: 'Haze' was not declared in this scope else if (IconName == "50d") Haze(x, y, IconSize, IconName); ^~~~ Waveshare_4_2:417:53: error: 'Fog' was not declared in this scope else if (IconName == "50n") Fog(x, y, IconSize, IconName); ^~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:417:53: note: suggested alternative: 'log' else if (IconName == "50n") Fog(x, y, IconSize, IconName); ^~~ log Waveshare_4_2:418:53: error: 'Nodata' was not declared in this scope else Nodata(x, y, IconSize, IconName); ^~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'boolean SetupTime()': Waveshare_4_2:460:21: error: 'UpdateLocalTime' was not declared in this scope bool TimeStatus = UpdateLocalTime(); ^~~~~~~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:460:21: note: suggested alternative: 'getLocalTime' bool TimeStatus = UpdateLocalTime(); ^~~~~~~~~~~~~~~ getLocalTime /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Sunny(int, int, bool, String)': Waveshare_4_2:600:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y + offset, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:600:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y + offset, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void MostlySunny(int, int, bool, String)': Waveshare_4_2:611:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y + offset, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:611:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y + offset, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void MostlyCloudy(int, int, bool, String)': Waveshare_4_2:622:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:622:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Cloudy(int, int, bool, String)': Waveshare_4_2:632:33: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:632:33: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog Waveshare_4_2:638:33: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:638:33: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Rain(int, int, bool, String)': Waveshare_4_2:651:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y + 10, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:651:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y + 10, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void ExpectRain(int, int, bool, String)': Waveshare_4_2:662:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:662:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void ChanceRain(int, int, bool, String)': Waveshare_4_2:674:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:674:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Tstorms(int, int, bool, String)': Waveshare_4_2:686:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:686:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Snow(int, int, bool, String)': Waveshare_4_2:697:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y + 15, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:697:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y + 15, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Fog(int, int, bool, String)': Waveshare_4_2:708:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:708:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Haze(int, int, bool, String)': Waveshare_4_2:719:31: error: 'addmoon' was not declared in this scope if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:719:31: note: suggested alternative: 'addfog' if (IconName.endsWith("n")) addmoon(x, y, scale, IconSize); ^~~~~~~ addfog /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void CloudCover(int, int, int)': Waveshare_4_2:729:3: error: 'drawString' was not declared in this scope drawString(x + 15, y - 5, String(CCover) + "%", LEFT); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:729:3: note: suggested alternative: 'String' drawString(x + 15, y - 5, String(CCover) + "%", LEFT); ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Visibility(int, int, String)': Waveshare_4_2:747:3: error: 'drawString' was not declared in this scope drawString(x + 12, y - 3, Visi, LEFT); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:747:3: note: suggested alternative: 'String' drawString(x + 12, y - 3, Visi, LEFT); ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void Nodata(int, int, bool, String)': Waveshare_4_2:765:3: error: 'drawString' was not declared in this scope drawString(x - 3, y - 8, "?", CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:765:3: note: suggested alternative: 'String' drawString(x - 3, y - 8, "?", CENTER); ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawBattery(int, int)': Waveshare_4_2:780:5: error: 'drawString' was not declared in this scope drawString(x + 65, y - 11, String(percentage) + "%", RIGHT); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:780:5: note: suggested alternative: 'String' drawString(x + 65, y - 11, String(percentage) + "%", RIGHT); ^~~~~~~~~~ String /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino: In function 'void DrawGraph(int, int, int, int, float, float, String, float*, int, boolean, boolean)': Waveshare_4_2:822:3: error: 'drawString' was not declared in this scope drawString(x_pos + gwidth / 2, y_pos - 12, title, CENTER); ^~~~~~~~~~ /Users/bti/Downloads/Waveshare_4_2/Waveshare_4_2.ino:822:3: note: suggested alternative: 'String' drawString(x_pos + gwidth / 2, y_pos - 12, title, CENTER); ^~~~~~~~~~ String Plusieurs bibliothèque trouvées pour "WiFi.h" Utilisé : /Users/bti/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi Non utilisé : /Applications/Arduino.app/Contents/Java/libraries/WiFi exit status 1 'StartWiFi' was not declared in this scope ```Last error I have is
'StartWiFi' was not declared in this scope
.If I move the function definition before the
setup()
it works... but it means I have to reorganise all functions like this https://github.com/G6EJD/ESP32-e-Paper-Weather-Display/compare/master...benoittgt:reorder-function?expand=1 to make it compile.