Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

human-sensor-2a-stable-github.yaml can't compile with esp-idf #13

Open
MStapelfeldt opened this issue Mar 8, 2024 · 5 comments
Open

Comments

@MStapelfeldt
Copy link

I wanted to add microWakeWord to a device which runs on human-sensor-2a firmware and noticed there are several compile errors:


/config/esphome/human-sensor-2a-stable-github.yaml: In lambda function:
/config/esphome/human-sensor-2a-stable-github.yaml:531:32: error: left operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone1_x_begin).state == 0, id(zone1_x_end).state == 0, id(zone1_y_begin).state == 0, id(zone1_y_end).state == 0){
           ~~~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml:531:57: error: right operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone1_x_begin).state == 0, id(zone1_x_end).state == 0, id(zone1_y_begin).state == 0, id(zone1_y_end).state == 0){
                                      ~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml:531:84: error: right operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone1_x_begin).state == 0, id(zone1_x_end).state == 0, id(zone1_y_begin).state == 0, id(zone1_y_end).state == 0){
                                                               ~~~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml: In lambda function:
/config/esphome/human-sensor-2a-stable-github.yaml:553:32: error: left operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone2_x_begin).state == 0, id(zone2_x_end).state == 0, id(zone2_y_begin).state == 0, id(zone2_y_end).state == 0){
           ~~~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml:553:57: error: right operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone2_x_begin).state == 0, id(zone2_x_end).state == 0, id(zone2_y_begin).state == 0, id(zone2_y_end).state == 0){
                                      ~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml:553:84: error: right operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone2_x_begin).state == 0, id(zone2_x_end).state == 0, id(zone2_y_begin).state == 0, id(zone2_y_end).state == 0){
                                                               ~~~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml: In lambda function:
/config/esphome/human-sensor-2a-stable-github.yaml:575:32: error: left operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone3_x_begin).state == 0, id(zone3_x_end).state == 0, id(zone3_y_begin).state == 0, id(zone3_y_end).state == 0){
           ~~~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml:575:57: error: right operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone3_x_begin).state == 0, id(zone3_x_end).state == 0, id(zone3_y_begin).state == 0, id(zone3_y_end).state == 0){
                                      ~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml:575:84: error: right operand of comma operator has no effect [-Werror=unused-value]
           if (id(zone3_x_begin).state == 0, id(zone3_x_end).state == 0, id(zone3_y_begin).state == 0, id(zone3_y_end).state == 0){
                                                               ~~~~~~~~~~~~~~~~~~~~~^~~~
/config/esphome/human-sensor-2a-stable-github.yaml: In lambda function:
/config/esphome/human-sensor-2a-stable-github.yaml:614:14: error: 'temperatureRead' was not declared in this scope
     unit_of_measurement: °C
              ^~~~~~~~~~~~~~~
Compiling .pioenvs/screek-human-sensor-2a/cbor/tinycbor/src/cborencoder_close_container_checked.o
/config/esphome/human-sensor-2a-stable-github.yaml: In lambda function:
/config/esphome/human-sensor-2a-stable-github.yaml:19:28: error: 'ESP' was not declared in this scope
           id(cpu_speed) = ESP.getCpuFreqMHz();
                            ^~~

some stuff like ESP.getCpuFreqMHz() or temperatureRead() could just be commented out, but the main lambda function and validation of zones is an issue. You can reproduce the issue by changing to

esp32:
  board: lolin_c3_mini
  framework:
    type: esp-idf
    version: recommended
@screekworkshop
Copy link
Owner

Hi, we'll investigate support for the esp-idf framework, which may be a bit more time consuming since we rarely use this framework.
Our bp1 is using the esp-idf framework and it has good bluetooth-wifi concurrency. But in general we will prioritize the arduino framework, which has better compatibility.

@nliviu
Copy link

nliviu commented May 15, 2024

Replace the comma with the and operand && and it will compile with both arduino and esp-idf frameworks.

It looks like it has been fixed in the beta, but didn't make it in the stable.

if (id(zone1_x_begin).state == 0 && id(zone1_x_end).state == 0 && id(zone1_y_begin).state == 0 && id(zone1_y_end).state == 0){

@MStapelfeldt
Copy link
Author

Fixing it locally for me is easy, I know. But next one will face same issues so I hope it will be merged into stable soon.

@screekworkshop
Copy link
Owner

We will update this issue immediately in the next 24 hours! Thanks for the feedback.

@SLboat
Copy link

SLboat commented May 16, 2024

Fixing it locally for me is easy, I know. But next one will face same issues so I hope it will be merged into stable soon.

We Sync the beta's current content to stable, considering they've been running for over 7 months.
and now it should fix the proble now.

bad4dca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants