-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vriable or field 'onStationDisconnected' declared void #1
Comments
Hi, I'm sorry, but the code is written for ESP32. To use it on an ESP8266, it would have to be adjusted extensively... Why not use one of the many different ESP32 models? You can also create a fork of my repository and convert it to ESP8266. Maybe you'll find what you need here: But be warned, these programs only work for Hero8 and older models. |
No problem, I thought that was the case. I will try and get hold of an esp32 and give it a go.
Many thanks
Yours
Rodrigo
…________________________________
From: sepp89117 ***@***.***>
Sent: Friday, April 5, 2024 5:45:24 AM
To: sepp89117/GoPro_ESP32_TFT_Touch-Control ***@***.***>
Cc: jovovich82 ***@***.***>; Author ***@***.***>
Subject: Re: [sepp89117/GoPro_ESP32_TFT_Touch-Control] Vriable or field 'onStationDisconnected' declared void (Issue #1)
Hi, I'm sorry, but the code is written for ESP32. To use it on an ESP8266, it would have to be adjusted extensively... Why not use one of the many different ESP32 models? You can also create a fork of my repository and convert it to ESP8266.
—
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARJDBQCJSK26B35DIDRG3UTY3YT6JAVCNFSM6AAAAABFYAVAJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZYHEYTONBYGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hello! trying esp32, but not recognising esp_wifi.h. Keeps throwing "esp_wifi.h: No such file or directory" Any help would be great! |
Hello, it look like I had a duplicate of the esp_wifi.h file. However, the 'Variable or field 'onStationDisconnected' declared void is still appearing. Any ideas? `Arduino: 1.8.16 (Windows 10), Board: "ESP32S2 Dev Module, Disabled, Disabled, Disabled, Disabled, UART0, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi), QIO, 80MHz, 4MB (32Mb), 921600, None, Disabled" GoPro_TFT_RC:358:28: error: variable or field 'onStationDisconnected' declared void void onStationDisconnected(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:358:28: error: 'WiFiEvent_t' was not declared in this scope C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:358:28: note: suggested alternative: 'ip_event_t' void onStationDisconnected(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:358:45: error: 'WiFiEventInfo_t' was not declared in this scope void onStationDisconnected(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:375:17: error: variable or field 'onIpAssign' declared void void onIpAssign(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:375:17: error: 'WiFiEvent_t' was not declared in this scope C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:375:17: note: suggested alternative: 'ip_event_t' void onIpAssign(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:375:34: error: 'WiFiEventInfo_t' was not declared in this scope void onIpAssign(WiFiEvent_t evt, WiFiEventInfo_t info) {
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino: In function 'void setup()': GoPro_TFT_RC:80:8: error: 'class WiFiClass' has no member named 'mode' WiFi.mode(WIFI_AP); // Set WiFi in AP mode
GoPro_TFT_RC:80:13: error: 'WIFI_AP' was not declared in this scope WiFi.mode(WIFI_AP); // Set WiFi in AP mode
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:80:13: note: suggested alternative: 'WIFI_IF_AP' WiFi.mode(WIFI_AP); // Set WiFi in AP mode
GoPro_TFT_RC:82:45: error: cannot convert 'esp_interface_t' to 'wifi_interface_t' esp_wifi_set_mac(ESP_IF_WIFI_AP, &rcMac[0]);
In file included from C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:2: C:\Users\Rodrigo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h:679:45: note: initializing argument 1 of 'esp_err_t esp_wifi_set_mac(wifi_interface_t, const uint8_t*)' esp_err_t esp_wifi_set_mac(wifi_interface_t ifx, const uint8_t mac[6]);
GoPro_TFT_RC:84:8: error: 'class WiFiClass' has no member named 'onEvent' WiFi.onEvent(onIpAssign, WiFiEvent_t::SYSTEM_EVENT_AP_STAIPASSIGNED);
GoPro_TFT_RC:84:16: error: 'onIpAssign' was not declared in this scope WiFi.onEvent(onIpAssign, WiFiEvent_t::SYSTEM_EVENT_AP_STAIPASSIGNED);
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:84:16: note: suggested alternative: 'copysign' WiFi.onEvent(onIpAssign, WiFiEvent_t::SYSTEM_EVENT_AP_STAIPASSIGNED);
GoPro_TFT_RC:84:28: error: 'WiFiEvent_t' has not been declared WiFi.onEvent(onIpAssign, WiFiEvent_t::SYSTEM_EVENT_AP_STAIPASSIGNED);
GoPro_TFT_RC:85:8: error: 'class WiFiClass' has no member named 'onEvent' WiFi.onEvent(onStationDisconnected, WiFiEvent_t::SYSTEM_EVENT_AP_STADISCONNECTED);
GoPro_TFT_RC:85:16: error: 'onStationDisconnected' was not declared in this scope WiFi.onEvent(onStationDisconnected, WiFiEvent_t::SYSTEM_EVENT_AP_STADISCONNECTED);
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:85:16: note: suggested alternative: 'esp_netif_action_disconnected' WiFi.onEvent(onStationDisconnected, WiFiEvent_t::SYSTEM_EVENT_AP_STADISCONNECTED);
GoPro_TFT_RC:85:39: error: 'WiFiEvent_t' has not been declared WiFi.onEvent(onStationDisconnected, WiFiEvent_t::SYSTEM_EVENT_AP_STADISCONNECTED);
GoPro_TFT_RC:87:23: error: no matching function for call to 'WiFiClass::disconnect(bool)' WiFi.disconnect(true);
In file included from C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:1: C:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:130:9: note: candidate: 'int WiFiClass::disconnect()'
C:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:130:9: note: candidate expects 0 arguments, 1 provided GoPro_TFT_RC:88:8: error: 'class WiFiClass' has no member named 'softAPdisconnect'; did you mean 'disconnect'? WiFi.softAPdisconnect(true);
GoPro_TFT_RC:94:7: error: 'class TFT_eSPI' has no member named 'setTouch' tft.setTouch(calData); //comment for touch calibration
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino: In function 'void checkTouch()': GoPro_TFT_RC:135:7: error: 'class TFT_eSPI' has no member named 'getTouch'; did you mean 'getColor'? tft.getTouch(&x, &y);
GoPro_TFT_RC:137:22: error: 'class TFT_eSPI' has no member named 'getTouchRawZ' if (y > 208 && tft.getTouchRawZ() >= 800) { //is in buttons hight
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino: In function 'void calibrateTouch()': GoPro_TFT_RC:198:7: error: 'class TFT_eSPI' has no member named 'calibrateTouch' tft.calibrateTouch(calData, TFT_MAGENTA, TFT_BLACK, 15);
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino: In function 'void startAP()': GoPro_TFT_RC:320:8: error: 'class WiFiClass' has no member named 'mode' WiFi.mode(WIFI_AP); // Set WiFi in AP mode
GoPro_TFT_RC:320:13: error: 'WIFI_AP' was not declared in this scope WiFi.mode(WIFI_AP); // Set WiFi in AP mode
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:320:13: note: suggested alternative: 'WIFI_IF_AP' WiFi.mode(WIFI_AP); // Set WiFi in AP mode
GoPro_TFT_RC:327:8: error: 'class WiFiClass' has no member named 'softAPConfig' WiFi.softAPConfig(rcIp, gateway, subnet);
GoPro_TFT_RC:330:8: error: 'class WiFiClass' has no member named 'softAP' WiFi.softAP(ssid, NULL, wifiChannel, 0, maxCams ); //.softAP(const char* ssid, const char* password, int channel, int ssid_hidden, int max_connection)
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino: In function 'void stopAP()': GoPro_TFT_RC:342:8: error: 'class WiFiClass' has no member named 'softAPdisconnect'; did you mean 'disconnect'? WiFi.softAPdisconnect(true);
C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino: At global scope: GoPro_TFT_RC:358:28: error: variable or field 'onStationDisconnected' declared void void onStationDisconnected(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:358:28: error: 'WiFiEvent_t' was not declared in this scope C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:358:28: note: suggested alternative: 'ip_event_t' void onStationDisconnected(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:358:45: error: 'WiFiEventInfo_t' was not declared in this scope void onStationDisconnected(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:375:17: error: variable or field 'onIpAssign' declared void void onIpAssign(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:375:17: error: 'WiFiEvent_t' was not declared in this scope C:\Users\Rodrigo\Downloads\GoPro_ESP32_TFT_Touch-Control-main\GoPro_ESP32_TFT_Touch-Control-main\GoPro_TFT_RC\GoPro_TFT_RC.ino:375:17: note: suggested alternative: 'ip_event_t' void onIpAssign(WiFiEvent_t evt, WiFiEventInfo_t info) {
GoPro_TFT_RC:375:34: error: 'WiFiEventInfo_t' was not declared in this scope void onIpAssign(WiFiEvent_t evt, WiFiEventInfo_t info) {
exit status 1 variable or field 'onStationDisconnected' declared void This report would have more information with |
Hi @jovovich82, |
Fantastic! Thanks a lot. |
You're welcome. Does it work for you? |
Hi,
I ' ve been trying following your instructions, but it is not working yet. I'm not sure what I'm doing wrong. The same message is still showing. Does it matter what type of esp32 I have? Or it needs to be a specific one?
…________________________________
From: sepp89117 ***@***.***>
Sent: Friday, April 12, 2024 5:09:10 AM
To: sepp89117/GoPro_ESP32_TFT_Touch-Control ***@***.***>
Cc: jovovich82 ***@***.***>; Mention ***@***.***>
Subject: Re: [sepp89117/GoPro_ESP32_TFT_Touch-Control] Vriable or field 'onStationDisconnected' declared void (Issue #1)
You're welcome. Does it work for you?
—
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARJDBQDCIZNUBUJKZF6OYATY45M6NAVCNFSM6AAAAABFYAVAJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQHEZTKMJTGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi I am not being successful. I have followed your instructions carefully, but I am afraud I might be missing something. It still errors when compiling at 'onStationDisconnected' declared void Any thoughts? |
I'm sorry, I can't reproduce the issue. Are you sure you have the latest version of ESP32 installed? |
Is there an easy way of checking esp32 version? I'm not too sure my compiling is working |
Check https://randomnerdtutorials.com/installing-esp32-arduino-ide-2-0/ |
Hi i am trying your code on an esp8266, but keep getting this error. 'Variable or field 'onStationDisconnected' declared void'. Any ideas?
Also, I cannot find esp_wifi.h
any help would be great
Thanks
The text was updated successfully, but these errors were encountered: