cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards

Home Page:https://cyberman54.github.io/ESP32-Paxcounter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?

joaquinpolom opened this issue · comments

Error at compile with PlatformIO
include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
extern ONE_BIT_DISPLAY *dp;

src/display.cpp:62:3: error: 'dp' was not declared in this scope
dp = new ONE_BIT_DISPLAY;

In platform.ini
halfile = ttgov21new.h

@joaquinpolom please post your compiler build output, i.e. library dependencies / removal notes.

I have clean and build with the same problem.
I have delete the .pio directory. I have build the proyect with this error.

Executing task: C:\Users\joaqu.platformio\penv\Scripts\platformio.exe run <

Can not remove temporary directory C:\Users\joaqu\OneDrive\Documentos_de_Joaquin\Proyects_IoT\GitHub\ESP32-Paxcounter\.pio\build. Please remove it manually to avoid build issues
Processing usb (framework: arduino; board: esp32dev; platform: espressif32@4.4.0)

Library Manager: Installing git+https://github.com/dbSuS/libpax.git
git version 2.35.3.windows.1
Cloning into 'C:\Users\joaqu.platformio.cache\tmp\pkg-installing-ygutzp9d'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 29 (delta 1), reused 9 (delta 0), pack-reused 0
Receiving objects: 100% (29/29), 32.83 KiB | 111.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.
Library Manager: libpax@1.1.0+sha.fe98131 has been installed!
Library Manager: Installing git+https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
git version 2.35.3.windows.1
Cloning into 'C:\Users\joaqu.platformio.cache\tmp\pkg-installing-1ezgcf7o'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 16 (delta 1), reused 10 (delta 0), pack-reused 0
Receiving objects: 100% (16/16), 5.74 KiB | 1.91 MiB/s, done.
Resolving deltas: 100% (1/1), done.
Library Manager: RokkitHash@20151212.0.0+sha.8500494 has been installed!
Library Manager: Installing bblanchon/ArduinoJson @ ^6
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: ArduinoJson@6.20.0 has been installed!
Library Manager: Installing makuna/RTC @ ^2.3.5
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: RTC@2.3.5 has been installed!
Library Manager: Installing spacehuhn/SimpleButton
Unpacking [####################################] 100%
Library Manager: SimpleButton@0.0.0-alpha+sha.026bc1e41a has been installed!
Library Manager: Installing 256dpi/MQTT @ ^2.4.8
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: MQTT@2.5.0 has been installed!
Library Manager: Installing mathertel/OneButton @ ^2.0.3
Unpacking [####################################] 100%
Library Manager: OneButton@2.0.3 has been installed!
Library Manager: Installing git+https://github.com/cyberman54/sds-dust-sensors-arduino-library.git
git version 2.35.3.windows.1
Cloning into 'C:\Users\joaqu.platformio.cache\tmp\pkg-installing-3q68umit'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (18/18), done.
Receiving objects: 100% (23/23)sed 10 (delta 3), pack-reused 0
Receiving objects: 100% (23/23), 11.74 KiB | 5.87 MiB/s, done.
Resolving deltas: 100% (4/4), done.
Library Manager: Nova Fitness Sds dust sensors library@1.5.1+sha.47bc356 has been installed!
Library Manager: Installing seeed-studio/Ultrathin_LED_Matrix @ ^1.0.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: Ultrathin_LED_Matrix@1.0.0 has been installed!
Verbose mode can be enabled via -v, --verbose option
Parsing hardware configuration from C:\Users\joaqu\OneDrive\Documentos_de_Joaquin\Proyects_IoT\GitHub\ESP32-Paxcounter\src\hal\ttgov21new.h
Parsing LMIC configuration from C:\Users\joaqu\OneDrive\Documentos_de_Joaquin\Proyects_IoT\GitHub\ESP32-Paxcounter\src\lmic_config.h
Parsing LORAWAN keys from C:\Users\joaqu\OneDrive\Documentos_de_Joaquin\Proyects_IoT\GitHub\ESP32-Paxcounter\src\loraconf.h
Parsing OTA keys from C:\Users\joaqu\OneDrive\Documentos_de_Joaquin\Proyects_IoT\GitHub\ESP32-Paxcounter\src\ota.conf
Target board: esp32dev @ 921600bps
Partition table: min_spiffs.csv
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (4.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-arduinoespressif32 @ 3.20003.220626 (2.0.3)
  • tool-esptoolpy @ 1.30300.0 (3.3.0)
  • tool-openocd-esp32 @ 2.1100.20220706 (11.0)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 55 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- libpax @ 1.1.0+sha.fe98131
    |-- RokkitHash @ 20151212.0.0+sha.8500494
    |-- ArduinoJson @ 6.20.0
    |-- RTC @ 2.3.5
    |-- SimpleButton @ 0.0.0-alpha+sha.026bc1e41a
    | |-- Wire @ 2.0.0
    |-- AXP202X_Library @ 1.1.3
    | |-- Wire @ 2.0.0
    |-- MQTT @ 2.5.0
    |-- OneButton @ 2.0.3
    |-- MCCI LoRaWAN LMIC library @ 4.1.1
    | |-- SPI @ 2.0.0
    |-- OneBitDisplay @ 1.11.0
    | |-- BitBang_I2C @ 2.2.1
    | | |-- Wire @ 2.0.0
    | |-- SPI @ 2.0.0
    |-- QRCode @ 0.0.1
    |-- TFT_eSPI @ 2.4.79
    | |-- SPI @ 2.0.0
    | |-- FS @ 2.0.0
    |-- SmartLeds @ 1.2.1+sha.d546c82
    |-- TinyGPSPlus @ 1.0.3
    |-- Adafruit Unified Sensor @ 1.1.7
    |-- Adafruit BME280 Library @ 2.2.2
    | |-- Adafruit BusIO @ 1.14.1
    | | |-- Wire @ 2.0.0
    | | |-- SPI @ 2.0.0
    | |-- Wire @ 2.0.0
    | |-- SPI @ 2.0.0
    | |-- Adafruit Unified Sensor @ 1.1.7
    |-- Adafruit BMP085 Library @ 1.2.2
    | |-- Adafruit BusIO @ 1.14.1
    | | |-- Wire @ 2.0.0
    | | |-- SPI @ 2.0.0
    | |-- Wire @ 2.0.0
    |-- BSEC Software Library @ 1.6.1480
    | |-- SPI @ 2.0.0
    | |-- Wire @ 2.0.0
    |-- Nova Fitness Sds dust sensors library @ 1.5.1+sha.47bc356
    |-- Ultrathin_LED_Matrix @ 1.0.0
    |-- Wire @ 2.0.0
    |-- ESPmDNS @ 2.0.0
    | |-- WiFi @ 2.0.0
    |-- Update @ 2.0.0
    |-- WebServer @ 2.0.0
    | |-- WiFi @ 2.0.0
    | |-- FS @ 2.0.0
    |-- WiFi @ 2.0.0
    |-- WiFiClientSecure @ 2.0.0
    | |-- WiFi @ 2.0.0
    |-- Ticker @ 2.0.0
    |-- Preferences @ 2.0.0
    |-- BitBang_I2C @ 2.2.1
    | |-- Wire @ 2.0.0
    |-- SPI @ 2.0.0
    |-- Ethernet @ 2.0.0
    | |-- WiFi @ 2.0.0
    |-- BintrayClient @ 1.0.0
    | |-- ArduinoJson @ 6.20.0
    | |-- HTTPClient @ 2.0.0
    | | |-- WiFi @ 2.0.0
    | | |-- WiFiClientSecure @ 2.0.0
    | | | |-- WiFi @ 2.0.0
    Building in release mode
    Compiling .pio\build\usb\src\antenna.cpp.o
    Compiling .pio\build\usb\src\bmesensor.cpp.o
    Compiling .pio\build\usb\src\boot.cpp.o
    Compiling .pio\build\usb\src\button.cpp.o
    Compiling .pio\build\usb\src\configmanager.cpp.o
    Compiling .pio\build\usb\src\cyclic.cpp.o
    Compiling .pio\build\usb\src\dcf77.cpp.o
    Compiling .pio\build\usb\src\display.cpp.o
    Compiling .pio\build\usb\src\gpsread.cpp.o
    Compiling .pio\build\usb\src\hash.cpp.o
    Compiling .pio\build\usb\src\i2c.cpp.o
    Compiling .pio\build\usb\src\if482.cpp.o
    Compiling .pio\build\usb\src\irqhandler.cpp.o
    Compiling .pio\build\usb\src\led.cpp.o
    In file included from include/cyclic.h:10,
    from include/senddata.h:6,
    from include/libpax_helpers.h:6,
    from include/rcommand.h:6,
    from include/lorawan.h:7,
    from include/reset.h:8,
    from include/configmanager.h:5,
    from src/configmanager.cpp:4:
    include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    extern ONE_BIT_DISPLAY *dp;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    In file included from include/button.h:7,
    from include/irqhandler.h:16,
    from include/timekeeper.h:6,
    from include/rcommand.h:13,
    from include/lorawan.h:7,
    from include/reset.h:8,
    from include/configmanager.h:5,
    from include/sensor.h:4,
    from include/senddata.h:7,
    from include/cyclic.h:5,
    from src/cyclic.cpp:5:
    include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    extern ONE_BIT_DISPLAY *dp;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    *** [.pio\build\usb\src\configmanager.cpp.o] Error 1
    *** [.pio\build\usb\src\cyclic.cpp.o] Error 1
    In file included from src/display.cpp:38:
    include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    extern ONE_BIT_DISPLAY dp;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    src/display.cpp:51:1: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    ONE_BIT_DISPLAY dp = NULL;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    src/display.cpp: In function 'void dp_setup(int)':
    src/display.cpp:62:3: error: 'dp' was not declared in this scope
    dp = new ONE_BIT_DISPLAY;
    ^~
    src/display.cpp:62:3: note: suggested alternative: 'dup'
    dp = new ONE_BIT_DISPLAY;
    ^~
    dup
    src/display.cpp:62:12: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    dp = new ONE_BIT_DISPLAY;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    src/display.cpp: In function 'void dp_init(bool)':
    src/display.cpp:96:5: error: 'dp' was not declared in this scope
    dp->printf("
    PAXCOUNTER \r\n");
    ^~
    src/display.cpp:96:5: note: suggested alternative: 'dup'
    dp->printf("
    PAXCOUNTER \r\n");
    ^~
    dup
    src/display.cpp: In function 'void dp_refresh(bool)':
    src/display.cpp:178:5: error: 'dp' was not declared in this scope
    dp->setCursor(0, 0);
    ^~
    src/display.cpp:178:5: note: suggested alternative: 'dup'
    dp->setCursor(0, 0);
    ^~
    dup
    src/display.cpp:195:5: error: 'dp' was not declared in this scope
    dp->printf("%-8u", count.pax);
    ^~
    src/display.cpp:195:5: note: suggested alternative: 'dup'
    dp->printf("%-8u", count.pax);
    ^~
    dup
    src/display.cpp: In function 'void dp_setFont(int, int)':
    src/display.cpp:402:3: error: 'dp' was not declared in this scope
    dp->setFont(font);
    ^~
    src/display.cpp:402:3: note: suggested alternative: 'dup'
    dp->setFont(font);
    ^~
    dup
    src/display.cpp: In function 'void dp_dump(uint8_t
    )':
    src/display.cpp:411:12: error: 'dp' was not declared in this scope
    memcpy(dp->getBuffer(), pBuffer, PLOTBUFFERSIZE);
    ^~
    src/display.cpp:411:12: note: suggested alternative: 'dup'
    memcpy(dp->getBuffer(), pBuffer, PLOTBUFFERSIZE);
    ^~
    dup
    src/display.cpp:412:3: error: 'dp' was not declared in this scope
    dp->display();
    ^~
    src/display.cpp:412:3: note: suggested alternative: 'dup'
    dp->display();
    ^~
    dup
    src/display.cpp: In function 'void dp_clear()':
    src/display.cpp:416:3: error: 'dp' was not declared in this scope
    dp->fillScreen(MY_DISPLAY_BGCOLOR);
    ^~
    src/display.cpp:416:3: note: suggested alternative: 'dup'
    dp->fillScreen(MY_DISPLAY_BGCOLOR);
    ^~
    dup
    src/display.cpp: In function 'void dp_contrast(uint8_t)':
    src/display.cpp:423:3: error: 'dp' was not declared in this scope
    dp->setContrast(contrast);
    ^~
    src/display.cpp:423:3: note: suggested alternative: 'dup'
    dp->setContrast(contrast);
    ^~
    dup
    src/display.cpp: In function 'void dp_power(uint8_t)':
    src/display.cpp:431:3: error: 'dp' was not declared in this scope
    dp->setPower(screenon);
    ^~
    src/display.cpp:431:3: note: suggested alternative: 'dup'
    dp->setPower(screenon);
    ^~
    dup
    src/display.cpp: In function 'void dp_shutdown()':
    src/display.cpp:439:3: error: 'dp' was not declared in this scope
    dp->setPower(false);
    ^~
    src/display.cpp:439:3: note: suggested alternative: 'dup'
    dp->setPower(false);
    ^~
    dup
    src/display.cpp: In function 'void dp_printqr(uint16_t, uint16_t, const char
    )':
    src/display.cpp:456:9: error: 'dp' was not declared in this scope
    dp->fillRect(x * QR_SCALEFACTOR + offset_x,
    ^~
    src/display.cpp:456:9: note: suggested alternative: 'dup'
    dp->fillRect(x * QR_SCALEFACTOR + offset_x,
    ^~
    dup
    src/display.cpp:460:3: error: 'dp' was not declared in this scope
    dp->fillRect(0, 0, qrcode.size * QR_SCALEFACTOR + 2 * offset_x, offset_y,
    ^~
    src/display.cpp:460:3: note: suggested alternative: 'dup'
    dp->fillRect(0, 0, qrcode.size * QR_SCALEFACTOR + 2 * offset_x, offset_y,
    ^~
    dup
    *** [.pio\build\usb\src\display.cpp.o] Error 1
    In file included from include/cyclic.h:10,
    from include/senddata.h:6,
    from include/libpax_helpers.h:6,
    from include/rcommand.h:6,
    from include/lorawan.h:7,
    from include/reset.h:8,
    from include/boot.h:6,
    from src/boot.cpp:1:
    include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    extern ONE_BIT_DISPLAY *dp;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    *** [.pio\build\usb\src\boot.cpp.o] Error 1
    In file included from include/reset.h:9,
    from include/configmanager.h:5,
    from include/libpax_helpers.h:7,
    from include/rcommand.h:6,
    from include/cyclic.h:6,
    from include/senddata.h:6,
    from include/button.h:6,
    from include/irqhandler.h:16,
    from src/irqhandler.cpp:1:
    include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    extern ONE_BIT_DISPLAY *dp;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    *** [.pio\build\usb\src\irqhandler.cpp.o] Error 1
    In file included from include/cyclic.h:10,
    from include/senddata.h:6,
    from include/libpax_helpers.h:6,
    from include/rcommand.h:6,
    from include/lorawan.h:7,
    from include/led.h:11,
    from src/led.cpp:3:
    include/display.h:19:8: error: 'ONE_BIT_DISPLAY' does not name a type; did you mean 'HAS_DISPLAY'?
    extern ONE_BIT_DISPLAY *dp;
    ^~~~~~~~~~~~~~~
    HAS_DISPLAY
    *** [.pio\build\usb\src\led.cpp.o] Error 1
    ========================================================= [FAILED] Took 464.36 seconds =========================================================

Environment Status Duration


usb FAILED 00:07:44.356
==================================================== 1 failed, 0 succeeded in 00:07:44.356 ====================================================
The terminal process "C:\Users\joaqu.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Your toolchain is outdated. It is not using the current code:
"platform: espressif32@4.4.0"

Current code is using espressif@5.2.0, see platformio_orig.ini.

If you already build this code before: did you re-copy current platformio_orig.ini to platformio.ini?

Solved.
Deleted .pio. Rename platformio.ini to platformio_old.ini. Copy platformio_orig.ini to platformio.ini.
Clean and build and compile ok