Cześć, pochylcie się proszę nad moim problemem.
Próbuję wgrać na ESP kod do obsługi mojej pralki:
Projekt na githubie: GitHub - tailsu/miele-brain
Dodałem nowe urządzenie do Esphome
dodałem do katalogu Esphome include: MotorolaLedDriverSniffer.h
i przy próbie kompliacji otrzymuję takie błędy:
INFO Reading configuration /config/esphome/miele-brain.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing miele-novotronic (board: d1_mini; framework: arduino; platform: platformio/espressif8266 @ 2.6.3)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 160MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <AsyncMqttClient-esphome> 0.8.6
| |-- <ESPAsyncTCP-esphome> 1.2.3
| | |-- <ESP8266WiFi> 1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266mDNS> 1.2
| |-- <ESP8266WiFi> 1.0
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/src/main.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/WiFiClient.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/WiFiServer.cpp.o
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h:65:13: error: cannot declare field 'esphome::MC14489::_data' to be of abstract type 'esphome::GPIOPin'
GPIOPin _data;
^
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: because the following virtual functions are pure within 'esphome::GPIOPin':
class GPIOPin {
^
src/esphome/core/gpio.h:52:16: note: virtual void esphome::GPIOPin::setup()
virtual void setup() = 0;
^
src/esphome/core/gpio.h:54:16: note: virtual void esphome::GPIOPin::pin_mode(esphome::gpio::Flags)
virtual void pin_mode(gpio::Flags flags) = 0;
^
src/esphome/core/gpio.h:56:16: note: virtual bool esphome::GPIOPin::digital_read()
virtual bool digital_read() = 0;
^
src/esphome/core/gpio.h:58:16: note: virtual void esphome::GPIOPin::digital_write(bool)
virtual void digital_write(bool value) = 0;
^
src/esphome/core/gpio.h:60:23: note: virtual std::string esphome::GPIOPin::dump_summary() const
virtual std::string dump_summary() const = 0;
^
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h:66:13: error: cannot declare field 'esphome::MC14489::_cs' to be of abstract type 'esphome::GPIOPin'
GPIOPin _cs;
^
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: since type 'esphome::GPIOPin' has pure virtual functions
class GPIOPin {
^
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h: In constructor 'esphome::MC14489::MC14489(uint8_t, esphome::GPIOPin*)':
src/MotorolaLedDriverSniffer.h:10:81: error: no matching function for call to 'esphome::GPIOPin::GPIOPin(uint8_t&, int, bool)'
MC14489(uint8_t csPin, GPIOPin* data) : _data(*data), _cs(csPin, INPUT, true) {
^
src/MotorolaLedDriverSniffer.h:10:81: note: candidates are:
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin()
class GPIOPin {
^
src/esphome/core/gpio.h:50:7: note: candidate expects 0 arguments, 3 provided
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin(const esphome::GPIOPin&)
src/esphome/core/gpio.h:50:7: note: candidate expects 1 argument, 3 provided
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin(esphome::GPIOPin&&)
src/esphome/core/gpio.h:50:7: note: candidate expects 1 argument, 3 provided
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h: In member function 'void esphome::MC14489::setup()':
src/MotorolaLedDriverSniffer.h:18:13: error: 'class esphome::GPIOPin' has no member named 'attach_interrupt'
_cs.attach_interrupt(&handleChipSelect, this, CHANGE);
^
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h: At global scope:
src/MotorolaLedDriverSniffer.h:224:13: error: cannot declare field 'esphome::MotorolaLedDriverSniffer::_data' to be of abstract type 'esphome::GPIOPin'
GPIOPin _data, _clk;
^
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: since type 'esphome::GPIOPin' has pure virtual functions
class GPIOPin {
^
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h:224:20: error: cannot declare field 'esphome::MotorolaLedDriverSniffer::_clk' to be of abstract type 'esphome::GPIOPin'
GPIOPin _data, _clk;
^
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: since type 'esphome::GPIOPin' has pure virtual functions
class GPIOPin {
^
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h: In constructor 'esphome::MotorolaLedDriverSniffer::MotorolaLedDriverSniffer(esphome::text_sensor::TextSensor*, esphome::text_sensor::TextSensor*)':
src/MotorolaLedDriverSniffer.h:87:35: error: no matching function for call to 'esphome::GPIOPin::GPIOPin(int, int)'
, _stateOutput(stateOutput)
^
src/MotorolaLedDriverSniffer.h:87:35: note: candidates are:
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin()
class GPIOPin {
^
src/esphome/core/gpio.h:50:7: note: candidate expects 0 arguments, 2 provided
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin(const esphome::GPIOPin&)
src/esphome/core/gpio.h:50:7: note: candidate expects 1 argument, 2 provided
Compiling /data/miele-novotronic/.pioenvs/miele-novotronic/lib67b/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin(esphome::GPIOPin&&)
src/esphome/core/gpio.h:50:7: note: candidate expects 1 argument, 2 provided
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h:87:35: error: no matching function for call to 'esphome::GPIOPin::GPIOPin(int, int)'
, _stateOutput(stateOutput)
^
src/MotorolaLedDriverSniffer.h:87:35: note: candidates are:
In file included from src/esphome/core/hal.h:4:0,
from src/esphome/components/esp8266/gpio.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin()
class GPIOPin {
^
src/esphome/core/gpio.h:50:7: note: candidate expects 0 arguments, 2 provided
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin(const esphome::GPIOPin&)
src/esphome/core/gpio.h:50:7: note: candidate expects 1 argument, 2 provided
src/esphome/core/gpio.h:50:7: note: constexpr esphome::GPIOPin::GPIOPin(esphome::GPIOPin&&)
src/esphome/core/gpio.h:50:7: note: candidate expects 1 argument, 2 provided
In file included from src/main.cpp:29:0:
src/MotorolaLedDriverSniffer.h: In member function 'virtual void esphome::MotorolaLedDriverSniffer::setup()':
src/MotorolaLedDriverSniffer.h:112:14: error: 'class esphome::GPIOPin' has no member named 'attach_interrupt'
_clk.attach_interrupt(&handleClk, this, RISING);
^
*** [/data/miele-novotronic/.pioenvs/miele-novotronic/src/main.cpp.o] Error 1
========================== [FAILED] Took 7.92 seconds ==========================