kmaximv / Wi-Fi-Sensor

GNU General Public License v3.0
71 stars 26 forks source link

ошибка при компиляции #16

Closed edgiru closed 7 years ago

edgiru commented 7 years ago

esp_sensor:45: error: 'PZEM004T' does not name a type

esp_sensor:129: error: no matching function for call to 'NTPClient::NTPClient()'

F:\Clouds\Mega\arduino\esp8266\firmware\wifi-sensor\Новая папка\esp_sensor\esp_sensor.ino:129:11: note: candidates are:

In file included from F:\Clouds\Mega\arduino\esp8266\firmware\wifi-sensor\Новая папка\esp_sensor\esp_sensor.ino:12:0:

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:34:5: note: NTPClient::NTPClient(UDP&, const char*, int, int)

 NTPClient(UDP& udp, const char* poolServerName, int timeOffset, int updateInterval);

 ^

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:34:5: note: candidate expects 4 arguments, 0 provided

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:33:5: note: NTPClient::NTPClient(UDP&, const char*, int)

 NTPClient(UDP& udp, const char* poolServerName, int timeOffset);

 ^

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:33:5: note: candidate expects 3 arguments, 0 provided

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:32:5: note: NTPClient::NTPClient(UDP&, const char*)

 NTPClient(UDP& udp, const char* poolServerName);

 ^

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:32:5: note: candidate expects 2 arguments, 0 provided

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:31:5: note: NTPClient::NTPClient(UDP&, int)

 NTPClient(UDP& udp, int timeOffset);

 ^

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:31:5: note: candidate expects 2 arguments, 0 provided

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:30:5: note: NTPClient::NTPClient(UDP&)

 NTPClient(UDP& udp);

 ^

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:30:5: note: candidate expects 1 argument, 0 provided

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:11:7: note: constexpr NTPClient::NTPClient(const NTPClient&)

class NTPClient {

   ^

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:11:7: note: candidate expects 1 argument, 0 provided

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:11:7: note: constexpr NTPClient::NTPClient(NTPClient&&)

C:\Users\edgi\Documents\Arduino\libraries\NTPClient/NTPClient.h:11:7: note: candidate expects 1 argument, 0 provided

F:\Clouds\Mega\arduino\esp8266\firmware\wifi-sensor\Новая папка\esp_sensor\esp_sensor.ino: In function 'void GetPzemSensorData()':

esp_sensor:1126: error: 'pzem' was not declared in this scope

esp_sensor:1142: error: 'pzem' was not declared in this scope

esp_sensor:1160: error: 'pzem' was not declared in this scope

esp_sensor:1178: error: 'pzem' was not declared in this scope

F:\Clouds\Mega\arduino\esp8266\firmware\wifi-sensor\Новая папка\esp_sensor\esp_sensor.ino: In function 'void WebFileUpload()':

esp_sensor:1998: error: 'WiFiUDP' has not been declared

F:\Clouds\Mega\arduino\esp8266\firmware\wifi-sensor\Новая папка\esp_sensor\esp_sensor.ino: In function 'void setup()':

esp_sensor:3466: error: 'pzem' was not declared in this scope

esp_sensor:3554: error: 'class NTPClient' has no member named 'reconfigure'

exit status 1 'PZEM004T' does not name a type

kmaximv commented 7 years ago

Недавно добавил поддержку PZEM 004T. Поэтому нужно либо добавить для него библиотеку, либо закомментировать строчку в конфиге если не нужна его поддержка.

Ссылка на строку для отключения поддержки PZEM 004T - #define PZEM_ON

edgiru commented 7 years ago

пробовал и закоментировать, пробовал и библиотеку добавлять, пробовал менять версию arduino ide 1.6.8 и как у вас 1.6.5. Не помогает постоянно валятся ошибки при компиляции.

сейчас 1.6.8 и выходит следующее:

Плата nodemcuv2 (платформа esp8266, пакет esp8266) неизвестна

Ошибка компиляции для платы NodeMCU 1.0 (ESP-12E Module).

kmaximv commented 7 years ago

Плата nodemcuv2 (платформа esp8266, пакет esp8266) неизвестна

Похоже неправильно установился Arduino core for ESP8266 Staging version

UPD: Попробуйте не Arduino core for ESP8266 Staging version а Stable version

Проверил сейчас на 1.6.8 и 1.6.9 компилируется без ошибок esp_sensor arduino 1 6 8_003 _004

kmaximv commented 7 years ago

Обновил информацию по библиотекам Wiki

edgiru commented 7 years ago

все удалил заново все поставил. спасибо большое теперь компилируется но выходит такое инфо сообщение: ВНИМАНИЕ: Категория '' в библиотеке PZEM004T не является действительной. Установка на 'Uncategorized'

библиотеку поставил по Вашей ссылке.

kmaximv commented 7 years ago

Это сообщение выходит из-за того, что файл настроек этой библиотеки не полностью описан. На работу библиотеки это никак не влияет.

Можно заменить содержимое файла library.properties на:

name=PZEM004T
version=1.0
author=Oleg Sokolov
maintainer=
sentence=Enables communication Peacefair PZEM-004T Energy monitor
paragraph=Enables communication Peacefair PZEM-004T Energy monitor
category=Sensors
url=https://github.com/olehs/PZEM004T
architectures=*

После этого сообщение перестанет выводиться.

edgiru commented 7 years ago

огромное спасибо! теперь все четко.