Ви не увійшли.
Сторінки 1
Добрый день Установил на ESP8266 прошивку ESP-link https://github.com/jeelabs/esp-link. В Ардуино пытаюсь прошить пример из библиотеки ELClient - webserver_controls. До этого получилось установить этот пример в Ардуино, но сейчас пытаюсь компилировать, выдает ошибки. Уже не знаю куда копать. Есть подозрения, что из-за обновления IDE Arduino выдает ошибки на этапе компиляции. Может кто сможет подсказать куда копать. А то пытаюсь лопатить код библиотеки ELClient - https://github.com/jeelabs/el-client, но с шаблонами не сильно дружу, поэтому тяжело дается код.
Вот сообщения из компилятора об ошибках
J:\Documents\AVR\Project\ARDUINO\webserver_controls\LedPage.ino: In function 'void ledInit()':
LedPage:222:47: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
ledHandler->buttonCb.attach(ledButtonPressCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\LedPage.ino:222:47: note: candidate expects 2 arguments, 1 provided
ledHandler->buttonCb.attach(ledButtonPressCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
LedPage:223:46: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
ledHandler->setFieldCb.attach(ledSetFieldCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\LedPage.ino:223:46: note: candidate expects 2 arguments, 1 provided
ledHandler->setFieldCb.attach(ledSetFieldCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
LedPage:224:38: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
ledHandler->loadCb.attach(ledLoadCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\LedPage.ino:224:38: note: candidate expects 2 arguments, 1 provided
ledHandler->loadCb.attach(ledLoadCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
LedPage:225:44: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
ledHandler->refreshCb.attach(ledRefreshCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\LedPage.ino:225:44: note: candidate expects 2 arguments, 1 provided
ledHandler->refreshCb.attach(ledRefreshCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\UserPage.ino: In function 'void userInit()':
UserPage:93:52: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
userPageHandler->setFieldCb.attach(userSetFieldCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\UserPage.ino:93:52: note: candidate expects 2 arguments, 1 provided
userPageHandler->setFieldCb.attach(userSetFieldCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
UserPage:94:44: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
userPageHandler->loadCb.attach(userLoadCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\UserPage.ino:94:44: note: candidate expects 2 arguments, 1 provided
userPageHandler->loadCb.attach(userLoadCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\VoltagePage.ino: In function 'void voltageInit()':
VoltagePage:127:49: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
voltageHandler->loadCb.attach(voltageRefreshCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\VoltagePage.ino:127:49: note: candidate expects 2 arguments, 1 provided
voltageHandler->loadCb.attach(voltageRefreshCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
VoltagePage:128:52: error: no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
voltageHandler->refreshCb.attach(voltageRefreshCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: candidate: template<class T> void FP<retT, argT>::attach(T*, retT (T::*)(argT)) [with T = T; retT = void; argT = char*]
void attach(T *item, retT (T::*method)(argT))
^
C:\AVR\Arduino\libraries\ELClient/FP.h:147:10: note: template argument deduction/substitution failed:
J:\Documents\AVR\Project\ARDUINO\webserver_controls\VoltagePage.ino:128:52: note: candidate expects 2 arguments, 1 provided
voltageHandler->refreshCb.attach(voltageRefreshCb);
^
In file included from C:\AVR\Arduino\libraries\ELClient/ELClient.h:12:0,
from J:\Documents\AVR\Project\ARDUINO\webserver_controls\webserver_controls.ino:17:
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: candidate: void FP<retT, argT>::attach(retT (*)(argT)) [with retT = void; argT = char*] <near match>
void attach(retT (*function)(argT));
^
C:\AVR\Arduino\libraries\ELClient/FP.h:157:10: note: conversion of argument 1 would be ill-formed:
exit status 1
no matching function for call to 'FP<void, char*>::attach(void (&)(const char*))'
https://forum.arduino.ua/img/members/22 … alpha0.zip
https://forum.arduino.ua/img/members/22 … 3_2_47.rar
Остання редакція melandr (2018-12-30 10:07:42)
Неактивний
Короче, не знаю, правильно ли я сделал. Но я в местах реализации функций, которые выбивают ошибку убрал const
Было:
void ledButtonPressCb(const char * button)
Стало:
void ledButtonPressCb(char * button)
И все сообщения об ошибках пропали, и исходник нормально компилируется. Код залил в Ардуино, усе работает
Неактивний
Сторінки 1