limengdu / MR24HPC1_ESPHome_external_components

MIT License
12 stars 12 forks source link

ESPHome fails to compile #2

Closed DConcord closed 9 months ago

DConcord commented 9 months ago

Hi, I'm trying to deploy directly via ESPHome using this the example conifg yaml (overwriting the initial/default config) https://github.com/limengdu/mmwave-kit-external-components/blob/main/example/mr24hpc1.yaml

but when I go to deploy, I get the following:

NFO ESPHome 2023.11.6
INFO Reading configuration /config/esphome/office-seedstudio-mmwave.yaml...
INFO Updating https://github.com/limengdu/mmwave-kit-external-components.git@main
INFO Generating C++ source...
INFO Compiling app...
Processing seeedstudio-mmwave-kit (board: esp32-c3-devkitm-1; framework: espidf; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40405.230623 (4.4.5) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Dependency Graph
|-- Improv @ 1.2.3
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/seeed_mr24hpc1/switch/underlyFuc_switch.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/select/select.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/select/select_call.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/select/select_traits.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/sensor/automation.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/sensor/filter.o
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/sensor/sensor.o
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: In member function 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_existence_boundary(const string&)':
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:923:45: error: invalid operands of types 'float' and 'std::nullptr_t' to binary 'operator!='
   if ((this->custom_mode_num_sensor_->state != nullptr) && (this->custom_mode_num_sensor_->state == 0))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:925:29: error: 'class esphome::seeed_mr24hpc1::MR24HPC1Component' has no member named 'index_of'
   uint8_t cmd_value = this->index_of(value) + 1;
                             ^~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: In member function 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_motion_boundary(const string&)':
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:934:45: error: invalid operands of types 'float' and 'std::nullptr_t' to binary 'operator!='
   if ((this->custom_mode_num_sensor_->state != nullptr) && (this->custom_mode_num_sensor_->state == 0))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:936:29: error: 'class esphome::seeed_mr24hpc1::MR24HPC1Component' has no member named 'index_of'
   uint8_t cmd_value = this->index_of(value) + 1;
                             ^~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: At global scope:
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:944:6: error: no declaration matches 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_existence_threshold(int)'
 void MR24HPC1Component::set_existence_threshold(int value) {
      ^~~~~~~~~~~~~~~~~
In file included from src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:2:
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.h:226:8: note: candidate is: 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_existence_threshold(uint8_t)'
   void set_existence_threshold(uint8_t value);
        ^~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.h:113:7: note: 'class esphome::seeed_mr24hpc1::MR24HPC1Component' defined here
 class MR24HPC1Component : public PollingComponent,
       ^~~~~~~~~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: In member function 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_motion_threshold(int)':
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:955:45: error: invalid operands of types 'float' and 'std::nullptr_t' to binary 'operator!='
   if ((this->custom_mode_num_sensor_->state != nullptr) && (this->custom_mode_num_sensor_->state == 0))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: In member function 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_motion_trigger_time(int)':
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:965:45: error: invalid operands of types 'float' and 'std::nullptr_t' to binary 'operator!='
   if ((this->custom_mode_num_sensor_->state != nullptr) && (this->custom_mode_num_sensor_->state == 0))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: In member function 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_motion_to_rest_time(int)':
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:981:45: error: invalid operands of types 'float' and 'std::nullptr_t' to binary 'operator!='
   if ((this->custom_mode_num_sensor_->state != nullptr) && (this->custom_mode_num_sensor_->state == 0))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp: In member function 'void esphome::seeed_mr24hpc1::MR24HPC1Component::set_custom_unman_time(int)':
src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp:997:45: error: invalid operands of types 'float' and 'std::nullptr_t' to binary 'operator!='
   if ((this->custom_mode_num_sensor_->state != nullptr) && (this->custom_mode_num_sensor_->state == 0))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/socket/bsd_sockets_impl.o
*** [.pioenvs/seeedstudio-mmwave-kit/src/esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.o] Error 1
Compiling .pioenvs/seeedstudio-mmwave-kit/src/esphome/components/socket/lwip_raw_tcp_impl.o
========================== [FAILED] Took 6.59 seconds ==========================

Please advise, thanks

ddijak commented 9 months ago

I have the same problem

limengdu commented 9 months ago

Sorry about that, I was still working on some revisions based on official requirements a couple of days ago. This has now been revised.