mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1048] Dev - ESP32 - too many initializers for 'const wifi_country_t' #892
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#892
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Craigzyc on GitHub (May 11, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1048
I get this error even in a completely empty sketch with only #include <WiFiManager.h>
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
ESP32 1.0.4
Description
too many initializers for 'const wifi_country_t'
Settings in IDE
Module: ESP32 Dev Module
Additional libraries:
Sketch
Debug Messages
Arduino: 1.8.12 (Mac OS X), Board: "ESP32 Dev Module, QIO, 80MHz, 4MB (32Mb), 921600, None"
In file included from /Documents/Arduino/libraries/WiFiManager/WiFiManager.h:94:0,
from /Documents/Arduino/sketch_may11a/sketch_may11a.ino:1:
/Documents/Arduino/libraries/WiFiManager/strings_en.h:348:100: error: too many initializers for 'const wifi_country_t'
const wifi_country_t WM_COUNTRY_US{"US",1,11,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^
/Documents/Arduino/libraries/WiFiManager/strings_en.h:348:100: error: invalid conversion from 'int' to 'wifi_country_policy_t' [-fpermissive]
/Documents/Arduino/libraries/WiFiManager/strings_en.h:349:100: error: too many initializers for 'const wifi_country_t'
const wifi_country_t WM_COUNTRY_CN{"CN",1,13,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^
/Documents/Arduino/libraries/WiFiManager/strings_en.h:349:100: error: invalid conversion from 'int' to 'wifi_country_policy_t' [-fpermissive]
/Documents/Arduino/libraries/WiFiManager/strings_en.h:350:100: error: too many initializers for 'const wifi_country_t'
const wifi_country_t WM_COUNTRY_JP{"JP",1,14,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
^
/Documents/Arduino/libraries/WiFiManager/strings_en.h:350:100: error: invalid conversion from 'int' to 'wifi_country_policy_t' [-fpermissive]
exit status 1
Error compiling for board ESP32 Dev Module.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
@tablatronix commented on GitHub (May 11, 2020):
When was the last time you pulled?
@CraigZych commented on GitHub (May 11, 2020):
Yesterday
@tablatronix commented on GitHub (May 11, 2020):
Are you sure cause this was fixed a while back, what esp32 version you using ?
Working for me on stable.
@tablatronix commented on GitHub (May 11, 2020):
github.com/espressif/arduino-esp32@d5e2bb12ca/tools/sdk/include/esp32/esp_wifi_types.h (L46)@CraigZych commented on GitHub (May 11, 2020):
I will give it another try tonight with a fresh pull
@tablatronix commented on GitHub (May 11, 2020):
Sounds more like you are on an old esp32 version, this was changed in 2.5.2 I think
@CraigZych commented on GitHub (May 11, 2020):
How does that versioning relate to the esp32? I tried it on 1.0.4 and 1.0.3 of the arduino core for esp32
@tablatronix commented on GitHub (May 11, 2020):
oh my bad, let me check, should be latest 1.0.4
Was changed since 1.0.3
@CraigZych commented on GitHub (May 11, 2020):
I just tried.
Esp8266 on 2.7.1, no issues
Esp32 on 1.0.4 shows that issue
So is this an issue with the arduino core then?
@tablatronix commented on GitHub (May 11, 2020):
not sure you said you are using develop branch of wm and its up to date ?
I will try to reproduce on arduino , I only use platformio.
can you look in strings.h and make sure it matches the struct ?
@Craigzyc commented on GitHub (May 12, 2020):
if we are talking about strings_en.h yes it matches that.
Interestingly though, if I comment out the if statement so that both the esp8266 and esp32 use the version intended for the ESP8266 it doesn't throw that error.
const wifi_country_t WM_COUNTRY_US{"US",1,11,WIFI_COUNTRY_POLICY_AUTO};After that I'm only left with the error:
Documents/Arduino/libraries/WiFiManager/WiFiManager.h:357:5: error: 'wifi_event_id_t' does not name a type wifi_event_id_t wm_event_id; ^@tablatronix commented on GitHub (May 12, 2020):
you are missing the same argument count
CONFIG_ESP32_PHY_MAX_TX_POWER
so esp ver must be old, are you sure you do not have a boards url set in prefs?
@tablatronix commented on GitHub (May 12, 2020):
i just added that last one uh oh
@Craigzyc commented on GitHub (May 12, 2020):
ok, my bad. I get it now. I didn't understand what it meant with esp32 with staging. I manually reinstalled the esp32 into arduino using the manual method on the development branch, and it works.
Sorry to waste your time.
@tablatronix commented on GitHub (May 12, 2020):
Yeah if you use staging you have to manually update it via git or download. Its bleeding edge unstable code