jasoncoon / esp8266-fastled-webserver

GNU General Public License v3.0
712 stars 360 forks source link

Compiling on latest PlatformIO #258

Open madmaxed opened 11 months ago

madmaxed commented 11 months ago

I'm having trouble getting the current main branch to compile on PlatformIO.

The problem is with the simplehacks/array_size2. I have attached my PlatformIO terminal.

reference to 'detail' is ambiguous namespace ArduinoJson::V6213PA2::detail

Processing fastled_webserver__d1_mini (platform: espressif8266@2.6.3; board: d1_mini; framework: arduino) ------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html PLATFORM: Espressif 8266 (2.6.3) > WeMos D1 R2 and mini HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash PACKAGES:

jasoncoon commented 11 months ago

Hey, sorry for the trouble. Mind trying this branch? https://github.com/jasoncoon/esp8266-fastled-webserver/tree/jcoon/hack-fix-all-json-truncation

It's the one I last used (which has been a while). I just tried it, compiled fine for me.

madmaxed commented 11 months ago

Thanks. I tried switching to that branch, and also downloaded a clean copy of the repo and switching to that branch with the same results. I have included a couple of images from VS Code this time and corresponding pop-up messages.

no instance of function template "ArduinoJson::V6213PA2::detail::ARRAY_SIZE2_ARGUMENT_CANNOT_BE_POINTER" matches the argument listC/C++(304) esp8266-fastled-webserver.ino(248, 30): argument types are: ()

define ARRAY_SIZE2(arr) detail::ARRAY_SIZE2_ARGUMENT_CANNOT_BE_POINTER(arr)

Expands to:

detail::ARRAY_SIZE2_ARGUMENT_CANNOT_BE_POINTER(patterns)

image

reference to 'detail' is ambiguous namespace ArduinoJson::V6213PA2::detail

image

I wonder if I might have some basic configuration problem. Below is another copy of the terminal window while trying to compile the branch you suggested:

Processing fastled_webserver__d1_mini (platform: espressif8266@2.6.3; board: d1_mini; framework: arduino) ------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html PLATFORM: Espressif 8266 (2.6.3) > WeMos D1 R2 and mini HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash PACKAGES:

jordanadania commented 7 months ago

Hey, sorry for the trouble. Mind trying this branch? https://github.com/jasoncoon/esp8266-fastled-webserver/tree/jcoon/hack-fix-all-json-truncation

It's the one I last used (which has been a while). I just tried it, compiled fine for me.

I tried this and my errors didn't change. What am I doing wrong?

_\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/Converter.hpp:9:1: error: pasting ")" and "2" does not give a valid preprocessing token 9 | ARDUINOJSON_BEGIN_PUBLICNAMESPACE | ^~~~~~~~~~

RomRider commented 2 months ago

Juste rename detail to detaill

namespace detaill
{
    template <typename T, size_t N>
    constexpr size_t ARRAY_SIZE2_ARGUMENT_CANNOT_BE_POINTER(T const (&)[N]) noexcept
    {
        return N;
    }
} // namespace detaill
#define ARRAY_SIZE2(arr) detaill::ARRAY_SIZE2_ARGUMENT_CANNOT_BE_POINTER(arr)