Error building latest m5dial code on vscode
-
While trying to upload the m5dial fw into my m5dial I get the following error. What am I missing here? How can I fix this in order to continue the upload?
'Compiling .pio\build\m5dial\lib285\LittleFS\LittleFS.cpp.o
.pio/libdeps/m5dial/M5GFX/src/lgfx/v1/platforms/esp32/Panel_EPD.cpp: In static member function 'static void lgfx::v1::Panel_EPD::task_update(lgfx::v1::Panel_EPD*)':
.pio/libdeps/m5dial/M5GFX/src/lgfx/v1/platforms/esp32/Panel_EPD.cpp:1003:27: error: no match for 'operator!=' (operand types are 'const lgfx::v1::Panel_EPD::update_data_t' and 'lgfx::v1::Panel_EPD::update_data_t')
if (prev_data != new_data) { break; }
^
In file included from .pio/libdeps/m5dial/M5GFX/src/lgfx/v1/panel/../Panel.hpp:24,
from .pio/libdeps/m5dial/M5GFX/src/lgfx/v1/panel/Panel_Device.hpp:20,
from .pio/libdeps/m5dial/M5GFX/src/lgfx/v1/panel/Panel_HasBuffer.hpp:20,
from .pio/libdeps/m5dial/M5GFX/src/lgfx/v1/platforms/esp32/Panel_EPD.hpp:28,
from .pio/libdeps/m5dial/M5GFX/src/lgfx/v1/platforms/esp32/Panel_EPD.cpp:19:
.pio/libdeps/m5dial/M5GFX/src/lgfx/v1/panel/../misc/colortype.hpp:700:20: note: candidate: 'bool lgfx::v1::operator!=(const lgfx::v1::raw_color_t&, const lgfx::v1::raw_color_t&)'
LGFX_INLINE bool operator!=(const raw_color_t& lhs, const raw_color_t& rhs) { return reinterpret_cast<const uint32_t>(&lhs) != reinterpret_cast<const uint32_t>(&rhs); }
^~~~~~~~
.pio/libdeps/m5dial/M5GFX/src/lgfx/v1/panel/../misc/colortype.hpp:700:20: note: no known conversion for argument 1 from 'const lgfx::v1::Panel_EPD::update_data_t' to 'const lgfx::v1::raw_color_t&'
Compiling .pio\build\m5dial\FrameworkArduino\Esp.cpp.o
*** [.pio\build\m5dial\lib145\M5GFX\lgfx\v1\platforms\esp32\Panel_EPD.cpp.o] Error 1
====================================================================================== [FAILED] Took 12.79 seconds ======================================================================================Environment Status Duration
m5dial FAILED 00:00:12.788
===================== 1 failed, 0 succeeded in 00:00:12.788 =================================================================================
- The terminal process "C:\Users\gscorrea.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--environment', 'm5dial'" terminated with exit code: 1.
- Terminal will be reused by tasks, press any key to close it.'
-
The error is happening because the code is trying to compare two update_data_t objects, but there's no defined way to compare them (no operator!=).
To fix it, you need to either:Define a comparison function (operator!=) for update_data_t so it knows how to compare the two objects.
Or, manually compare the relevant fields of prev_data and new_data.
-
Hello @gscorrea
using the latest library versions, e.g. M5GFX 0.2.13 and M5Unified 0.2.8 I can build M5Dial firmware with no error.
Thanks
Felix
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login