Skip to content
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

Compilation error: no matching function for call #15

Open
andyclark41 opened this issue Feb 13, 2024 · 0 comments
Open

Compilation error: no matching function for call #15

andyclark41 opened this issue Feb 13, 2024 · 0 comments

Comments

@andyclark41
Copy link

HI,

I'm trying to get LaserGRBL running on a VigoTec LX-7 Engraver and I'm following instructions at the following link:

https://github.com/arkypita/Vigotech-VG-L7X/tree/main/CustomFirmware-VG-L7x

When I compile the code in Arduino I get the following error:

Compilation error: no matching function for call to 'onEvent(void (&)(arduino_event_id_t, system_event_info_t))'

Here's the full details:

C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino: In function 'void startWPS()':
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:219:25: error: no matching function for call to 'onEvent(void (&)(arduino_event_id_t, system_event_info_t))'
   WiFi.onEvent(WiFiEvent);
                         ^
In file included from C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFiSTA.h:28,
                 from C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFi.h:32,
                 from C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:2:
C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFiGeneric.h:159:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventCb, arduino_event_id_t)'
     wifi_event_id_t onEvent(WiFiEventCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX);
                     ^~~~~~~
C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFiGeneric.h:159:21: note:   conversion of argument 1 would be ill-formed:
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:219:16: error: invalid conversion from 'void ()(arduino_event_id_t, system_event_info_t)' to 'WiFiEventCb' {aka 'void ()(arduino_event_id_t)'} [-fpermissive]
   WiFi.onEvent(WiFiEvent);
                ^~~~~~~~~
In file included from C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFiSTA.h:28,
                 from C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFi.h:32,
                 from C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:2:
C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFiGeneric.h:161:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventSysCb, arduino_event_id_t)'
     wifi_event_id_t onEvent(WiFiEventSysCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX);
                     ^~~~~~~
C:\MyPath\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\libraries\WiFi\src/WiFiGeneric.h:161:21: note:   conversion of argument 1 would be ill-formed:
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:219:16: error: invalid conversion from 'void ()(arduino_event_id_t, system_event_info_t)' to 'WiFiEventSysCb' {aka 'void ()(arduino_event_t*)'} [-fpermissive]
   WiFi.onEvent(WiFiEvent);
                ^~~~~~~~~
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino: In function 'void wpsInitConfig()':
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:230:10: error: 'struct esp_wps_config_t' has no member named 'crypto_funcs'
   config.crypto_funcs = &g_wifi_default_wps_crypto_funcs;
          ^~~~~~~~~~~~
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:230:26: error: 'g_wifi_default_wps_crypto_funcs' was not declared in this scope
   config.crypto_funcs = &g_wifi_default_wps_crypto_funcs;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\MyPath\Downloads\CustomFirmware-VG-L7x\CustomFirmware-VG-L7x.ino:230:26: note: suggested alternative: 'g_wifi_default_wpa_crypto_funcs'
   config.crypto_funcs = &g_wifi_default_wps_crypto_funcs;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          g_wifi_default_wpa_crypto_funcs

exit status 1

Compilation error: no matching function for call to 'onEvent(void (&)(arduino_event_id_t, system_event_info_t))'

I'm very new with all of this so I can't really troubleshoot myself - has this error happened before? Is there anything I can do to fix it?

Many Thanks,

Andy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant