c5n / oh-ez-touch

OhEzTouch is a simple always-on touch control device for home automation systems driven by OpenHAB.
GNU General Public License v3.0
16 stars 3 forks source link

Compilation error 'PB_Chunk' was not declared in this scope #24

Closed sawh closed 1 year ago

sawh commented 2 years ago

Installation fails in Ubuntu 20.04 LTS and OSX (testet with Port py3.9-pip) both with the following error

...
In file included from .pio/libdeps/ArduiTouch28/AutoConnect/src/AutoConnect.h:35:0,
                 from src/ac_settings.hpp:4,
                 from src/ac_main.cpp:2:
.pio/libdeps/ArduiTouch28/AutoConnect/src/AutoConnectAux.h: In constructor 'AutoConnectAux::AutoConnectAux(const String&, const String&, bool, AutoConnectElementVT)':
.pio/libdeps/ArduiTouch28/AutoConnect/src/AutoConnectAux.h:51:11: error: 'PB_Chunk' was not declared in this scope
     chunk(PB_Chunk), _title(title), _menu(menu), _uriStr(String(uri)), _addonElm(addons), _handler(nullptr), _order(AC_EXIT_AHEAD), _uploadHandler(nullptr) { _uri = _uriStr.c_str(); }
           ^
Compiling .pio/build/ArduiTouch28/src/driver/beeper_control.cpp.o
In file included from src/ac_settings.hpp:4:0,
                 from src/ac_main.cpp:2:
.pio/libdeps/ArduiTouch28/AutoConnect/src/AutoConnect.h: At global scope:
.pio/libdeps/ArduiTouch28/AutoConnect/src/AutoConnect.h:389:11: error: 'TransferEncoding_t' does not name a type
     const TransferEncoding_t transMode;
           ^
*** [.pio/build/ArduiTouch28/src/ac_main.cpp.o] Error 1
============================================================= [FAILED] Took 6.54 seconds =============================================================

Environment    Status    Duration
-------------  --------  ------------
debug          FAILED    00:00:46.077
ArduiTouch     FAILED    00:00:06.548
ArduiTouch28   FAILED    00:00:06.540
======================================================= 3 failed, 0 succeeded in 00:00:59.165 =======================================================

Steps to reproduce in Ubuntu 20.04 LTS

sudo apt install python3-pip
sudo pip install -U platformio
git clone https://github.com/c5n/oh-ez-touch.git
cd oh-ez-touch/
pio run
sven-carstens commented 2 years ago

I resolved it with updating the AutoConnect library to the now current version 1.3.2 The constant PB_Chunk seem to be not supported anymore by the arduino lib.

sawh commented 2 years ago

Hi,

thanks, it works now with some additional changes in platform.ini:

[common]
lib_deps =
    lv_arduino @ 2.1.5
    Adafruit BME280 Library @ 2.1.2
    ArduinoJson @ 6.17.2
    AutoConnect @ 1.3.2
    yiannisbourkelis/Uptime Library @ ^1.0.0
    bodmer/TFT_eSPI @ 2.4.24
build_flags =
    -Os
    !echo '-DVERSION_GIT_HASH=\"'$(git log |head -1 |cut -c8-)'\"'
    -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO
    -DUSER_SETUP_LOADED=1
    -DLV_USE_DEBUG=0
    -DLV_CONF_INCLUDE_SIMPLE=1
    -DAUTOCONNECT_STARTUPTIME=10
    -DAUTOCONNECT_PSK='""'
    -DLODEPNG_NO_COMPILE_ANCILLARY_CHUNKS=1
    -DLODEPNG_NO_COMPILE_DISK=1
    -DLODEPNG_NO_COMPILE_ENCODER=1
    -DLODEPNG_NO_COMPILE_ALLOCATORS=1
    -DAC_DEBUG=0
    -I ./src/

In particular, the quotation marks for -DAUTOCONNECT_PSK are required.

JensHoRi commented 1 year ago

Should be solved now in main ==> Close