nekromant / esphome-lctech-4chanel-modules

ESPHome configs for LC-tech 4 channel modules.
12 stars 6 forks source link

error #4

Open iulianhlc opened 4 years ago

iulianhlc commented 4 years ago

src/main.cpp:219:3: warning: multi-line comment [-Wcomment] // lambda: !lambda "auto r1 = new LCRelay(id(uart0), 1);\nauto r2 = new LCRelay(id(uart0),\ ^ Compiling /data/4channel/.pioenvs/4channel/lib4d9/ESP8266WiFi/ESP8266WiFiSTA.cpp.o Compiling /data/4channel/.pioenvs/4channel/lib4d9/ESP8266WiFi/ESP8266WiFiScan.cpp.o In file included from src/main.cpp:29:0: src/lccomponent.h:14:3: error: 'binary_sensor' does not name a type binary_sensor::BinarySensor buttons[2]; ^ src/lccomponent.h: In member function 'void LCButtons::update_button(uint8_t)': src/lccomponent.h:32:5: error: 'buttons' was not declared in this scope buttons[button - 1].publish_state(!value); ^ src/lccomponent.h: At global scope: src/lccomponent.h:42:67: error: 'output' has not been declared class LCFloatOutput : public Component, public UARTDevice, public output::FloatOutput { ^ src/lccomponent.h:42:75: error: expected '{' before 'FloatOutput' class LCFloatOutput : public Component, public UARTDevice, public output::FloatOutput { ^ src/lccomponent.h:42:87: error: invalid type in declaration before '{' token class LCFloatOutput : public Component, public UARTDevice, public output::FloatOutput { ^ src/lccomponent.h:43:2: error: expected primary-expression before 'public' public: ^ src/lccomponent.h:43:2: error: expected '}' before 'public' src/lccomponent.h:43:2: error: expected ',' or ';' before 'public' src/lccomponent.h:48:31: error: expected ')' before '' token LCFloatOutput(UARTComponent parent, const char prefix) ^ src/lccomponent.h:53:16: error: virt-specifiers in 'setup' not allowed outside a class definition void setup() override { ^ src/lccomponent.h:56:33: error: virt-specifiers in 'write_state' not allowed outside a class definition void write_state(float state) override { ^ src/lccomponent.h: In function 'void write_state(float)': src/lccomponent.h:58:26: error: invalid use of 'this' in non-member function LCRelay::send_packet(this, pre, v); ^ src/lccomponent.h:58:32: error: 'pre' was not declared in this scope LCRelay::send_packet(this, pre, v); ^ src/lccomponent.h: At global scope: src/lccomponent.h:60:1: error: expected declaration before '}' token }; ^ *** [/data/4channel/.pioenvs/4channel/src/main.cpp.o] Error 1

iulianhlc commented 4 years ago

Can you please help me?

nekromant commented 4 years ago

Please post your esphome version and what example you are compiling

iulianhlc commented 4 years ago

ESPHome Current version: 1.14.4

The files from your github

nekromant commented 4 years ago

It looks like yet another esphome API change. I'll have a look some time later.