cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

src/irqhandler.cpp:95:43: error: too few arguments to function #697

Closed danielhalbe closed 3 years ago

danielhalbe commented 3 years ago

Hi folks,

I am using Visual Studio Code with platform.io to build paxcounters for a Lopy4 and a TTGO2.1.

My builds for both devices are breaking for the following same reason:

Compiling .pio/build/usb/src/reset.cpp.o src/irqhandler.cpp: In function 'void irqHandler(void)': src/irqhandler.cpp:95:43: error: too few arguments to function 'void enter_deepsleep(uint64_t, gpio_num_t)' enter_deepsleep(cfg.sleepcycle 2); ^ In file included from include/power.h:9:0, from include/irqhandler.h:21, from src/irqhandler.cpp:1: include/reset.h:14:6: note: declared here void enter_deepsleep(const uint64_t wakeup_sec, const gpio_num_t wakeup_gpio); ^ *** [.pio/build/usb/src/irqhandler.cpp.o] Error 1

Any advise?

For me it seems that a second argument is missing when enter_deepsleep is called in the else condition, but I have no idea what argument is missing and if it is a general bug or I configures something wrong.

#ifdef HAS_BUTTON
        enter_deepsleep(cfg.sleepcycle * 2, (gpio_num_t)HAS_BUTTON);
#else
        enter_deepsleep(cfg.sleepcycle * 2);
#33

Best regards, Daniel

cyberman54 commented 3 years ago

This is a bug, affecting (only) boards without button. It came in with release 2.1.0, introducing deep sleep. Thanks for spotting this bug. I fixed it, please see current v2.1.1 maintenance release. Sorry that you had trouble building the software.