ESP32-Chimera-Core icon indicating copy to clipboard operation
ESP32-Chimera-Core copied to clipboard

Core2ez on Chimera

Open ropg opened this issue 3 years ago • 10 comments

Hey there...

I was trying to see if things "just work" and am having some issues...

I took my Core2ez library and replaced occurrences of M5Core.h with ESP32-Chimera-Core.h. That gave compile errrors, mostly about missing methods in TFT_eSprite, which seemed like they want to be replaced by replaced by LGFX_Sprite. But that is still not working, and then I gave up until I understand better what this LovyanGFX does and how it differs from the TFT driver in the default M5Core2 library. Regrettably, I do not read Japanese...

I included all error messages below...

/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'void ezDisplayZone::push(LGFX_Sprite*, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:79:32: error: 'LGFX_Sprite {aka class lgfx::LGFX_Sprite}' has no member named 'pushInSprite'
   if      (sprite )  sprite  ->pushInSprite(s, ox, oy, w_, h_, x_, y_);
                                ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'void ezDisplayZone::spriteToDisplay(LGFX_Sprite*, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:89:12: error: 'LGFX_Sprite {aka class lgfx::LGFX_Sprite}' has no member named 'pushInSprite'
     tmpspr.pushInSprite(s, ox, oy, w_, h_, 0, 0);
            ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'void ezDisplayZone::setRotation(uint8_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:242:31: error: 'LGFX_Sprite {aka class lgfx::LGFX_Sprite}' has no member named 'setRotation'
   if      (sprite ) sprite  ->setRotation(r);
                               ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'uint8_t ezDisplayZone::color16to8(uint16_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:398:38: error: 'LGFX_Sprite {aka class lgfx::LGFX_Sprite}' has no member named 'color16to8'
   if      (sprite ) return sprite  ->color16to8(color565);
                                      ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:400:38: error: 'class M5Display' has no member named 'color16to8'
   else              return DISPLAY  .color16to8(color565);
                                      ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'uint16_t ezDisplayZone::fontsLoaded()':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:416:38: error: 'LGFX_Sprite {aka class lgfx::LGFX_Sprite}' has no member named 'fontsLoaded'
   if      (sprite ) return sprite  ->fontsLoaded();
                                      ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:418:38: error: 'class M5Display' has no member named 'fontsLoaded'
   else              return DISPLAY  .fontsLoaded();
                                      ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'uint16_t ezDisplayZone::color8to16(uint8_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:428:38: error: 'LGFX_Sprite {aka class lgfx::LGFX_Sprite}' has no member named 'color8to16'
   if      (sprite ) return sprite  ->color8to16(color332);
                                      ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:430:38: error: 'class M5Display' has no member named 'color8to16'
   else              return DISPLAY  .color8to16(color332);
                                      ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp: In member function 'virtual void ezLabel::draw()':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:112:42: error: no matching function for call to 'min(int, std::vector<line_t>::size_type)'
                              lines.size());
                                          ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:62:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezEvents.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezWidget.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3451:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3451:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:112:42: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
                              lines.size());
                                          ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:62:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezEvents.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezWidget.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3445:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
     min(initializer_list<_Tp> __l)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3445:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:112:42: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
                              lines.size());
                                          ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:61:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezEvents.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezWidget.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:112:42: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::vector<line_t>::size_type {aka unsigned int}')
                              lines.size());
                                          ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:61:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezEvents.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezWidget.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezLabel.cpp:112:42: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::vector<line_t>::size_type {aka unsigned int}')
                              lines.size());
                                          ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'int16_t ezDisplayZone::textWidth(const char*, uint8_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:506:60: error: no matching function for call to 'lgfx::LGFX_Sprite::textWidth(const char*&, uint8_t&)'
   if      (sprite ) return sprite  ->textWidth(string, font);
                                                            ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note: candidate: int32_t lgfx::LGFXBase::textWidth(const char*)
     std::int32_t textWidth(const char *string);
                  ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note: candidate: int32_t lgfx::LGFXBase::textWidth(const String&)
     inline std::int32_t textWidth(const String& string) { return textWidth(string.c_str()); }
                         ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:508:60: error: no matching function for call to 'M5Display::textWidth(const char*&, uint8_t&)'
   else              return DISPLAY  .textWidth(string, font);
                                                            ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note: candidate: int32_t lgfx::LGFXBase::textWidth(const char*)
     std::int32_t textWidth(const char *string);
                  ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note: candidate: int32_t lgfx::LGFXBase::textWidth(const String&)
     inline std::int32_t textWidth(const String& string) { return textWidth(string.c_str()); }
                         ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'int16_t ezDisplayZone::textWidth(const String&, uint8_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:518:60: error: no matching function for call to 'lgfx::LGFX_Sprite::textWidth(const String&, uint8_t&)'
   if      (sprite ) return sprite  ->textWidth(string, font);
                                                            ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note: candidate: int32_t lgfx::LGFXBase::textWidth(const char*)
     std::int32_t textWidth(const char *string);
                  ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note: candidate: int32_t lgfx::LGFXBase::textWidth(const String&)
     inline std::int32_t textWidth(const String& string) { return textWidth(string.c_str()); }
                         ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:520:60: error: no matching function for call to 'M5Display::textWidth(const String&, uint8_t&)'
   else              return DISPLAY  .textWidth(string, font);
                                                            ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note: candidate: int32_t lgfx::LGFXBase::textWidth(const char*)
     std::int32_t textWidth(const char *string);
                  ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:473:18: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note: candidate: int32_t lgfx::LGFXBase::textWidth(const String&)
     inline std::int32_t textWidth(const String& string) { return textWidth(string.c_str()); }
                         ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:494:25: note:   candidate expects 1 argument, 2 provided
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp: In member function 'uint16_t ezDisplayZone::decodeUTF8(uint8_t*, uint16_t*, uint16_t)':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:542:70: error: no matching function for call to 'lgfx::LGFX_Sprite::decodeUTF8(uint8_t*&, uint16_t*&, uint16_t&)'
   if      (sprite ) return sprite  ->decodeUTF8(buf, index, remaining);
                                                                      ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:1005:19: note: candidate: uint16_t lgfx::LGFXBase::decodeUTF8(uint8_t)
     std::uint16_t decodeUTF8(std::uint8_t c);
                   ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:1005:19: note:   candidate expects 1 argument, 3 provided
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:544:70: error: no matching function for call to 'M5Display::decodeUTF8(uint8_t*&, uint16_t*&, uint16_t&)'
   else              return DISPLAY  .decodeUTF8(buf, index, remaining);
                                                                      ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:1005:19: note: candidate: uint16_t lgfx::LGFXBase::decodeUTF8(uint8_t)
     std::uint16_t decodeUTF8(std::uint8_t c);
                   ^
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:1005:19: note:   candidate expects 1 argument, 3 provided
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp: In member function 'uint16_t ezDisplayZone::decodeUTF8(uint8_t)':
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:1005:19: error: 'uint16_t lgfx::LGFXBase::decodeUTF8(uint8_t)' is protected
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:548:50: error: within this context
   if      (sprite ) return sprite  ->decodeUTF8(c);
                                                  ^
In file included from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:41:0,
                 from /Users/rop/Documents/Arduino/libraries/LovyanGFX/src/LGFX_TFT_eSPI.hpp:14,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/M5Display.h:8,
                 from /Users/rop/Documents/Arduino/libraries/ESP32-Chimera-Core/src/ESP32-Chimera-Core.h:126,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.h:6,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:1:
/Users/rop/Documents/Arduino/libraries/LovyanGFX/src/lgfx/LGFXBase.hpp:1005:19: error: 'uint16_t lgfx::LGFXBase::decodeUTF8(uint8_t)' is protected
     std::uint16_t decodeUTF8(std::uint8_t c);
                   ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezDisplayZone.cpp:550:50: error: within this context
   else              return DISPLAY  .decodeUTF8(c);
                                                  ^
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp: In member function 'int16_t ezMenu::doMenu()':
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:83:63: error: no matching function for call to 'min(uint8_t&, int)'
   if (rowsPerScreen == EZ_AUTO) rowsPerScreen = min(numRows, 3);
                                                               ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:62:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezSound.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/Core2ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezHeader.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3451:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3451:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:83:63: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned char'
   if (rowsPerScreen == EZ_AUTO) rowsPerScreen = min(numRows, 3);
                                                               ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:62:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezSound.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/Core2ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezHeader.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3445:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
     min(initializer_list<_Tp> __l)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3445:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:83:63: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned char'
   if (rowsPerScreen == EZ_AUTO) rowsPerScreen = min(numRows, 3);
                                                               ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:61:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezSound.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/Core2ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezHeader.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:83:63: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned char' and 'int')
   if (rowsPerScreen == EZ_AUTO) rowsPerScreen = min(numRows, 3);
                                                               ^
In file included from /Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/algorithm:61:0,
                 from /Users/rop/Library/Arduino15/packages/m5stack/hardware/esp32/1.0.5/cores/esp32/Arduino.h:142,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezSound.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/Core2ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ez.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezHeader.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.h:4,
                 from /Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:1:
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
/Users/rop/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
/Users/rop/Documents/Arduino/libraries/Core2ez/src/ezMenu.cpp:83:63: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned char' and 'int')
   if (rowsPerScreen == EZ_AUTO) rowsPerScreen = min(numRows, 3);
                                                               ^
exit status 1
Error compiling for board M5Stack-Core2.

ropg avatar Mar 05 '21 13:03 ropg

hey @ropg thanks for your feedback

LovyanGFX will soon become the official core for all M5Stack products, while this is very good news I can only hope it will not drop support for non-M5Stack products such as Odroid-Go or TWatch.

Please note I'm assuming Core2Ez is taking the same direction as M5Stack towards LovyanGFX adoption while writing this answer.

pushInSprite + setRotation -> pushRotateZoom

color16To8 / color8to16 -> conversion should be native provided setColorDepth() was used

fontsLoaded -> loadFont( [font] ) returns a bool

textWidth(text, font) -> use separately 'setFont() + 'textWidth()'

decodeUTF8(buf, index, remaining) -> not implemented in LGFX (drawChar() is unicode safe)

error: no matching function for call to 'min(int, std::vector<line_t>::size_type)' -> LGFX uses its own fast version of min/max and #undef's them afterwards. Your library being affected by this means you probably need to do the same.

Some thoughts:

  • I use egrep -R + keywords to find the interesting functions in the LGFX library

  • I'm not sure TFT_eSPI allows that, but this works with LGFX and may save you from maintaining DisplayZone::push() and DisplayZone::spriteToDisplay()

TFT_eSprite spriteToDisplay = new TFT_eSprite( &M5.Lcd );
TFT_eSprite spriteToSprite  = new TFT_eSprite( &spriteToDisplay );
  • pushRotateZoom is your swiss-army knife, this function is fast and powerful
spriteToSprite->pushRotateZoom(&spriteToDisplay, x, y, angle, zoomX, zoomY);
spriteToDisplay->pushRotateZoom(&tft, tft.width() >> 1, tft.height() >> 1, 0,  1, 1);
  • The ESP32-Chimera-Core library has a DummyTouch object

tobozo avatar Mar 05 '21 14:03 tobozo

Wow, thanks...

I've learned a lot about documentation lately, to be used as Core2ez gets proper documentation. I have a setup that uses doxygen and sphinx/breathe that I have tuned so that both the doxygen and the more textual sphinx/breathe output can be referred to. LovyanGFX becomes easier to parse if you look at the doxygen graphs that show object relations and all... I have forked LovyanGFX and am setting it up in the 'documentation' fork.

What are your plans wrt the Chimera given M5Stack's adoption of LovyanGFX?

(They need to take the button stuff back out and only use my touch driver, this is silly the way it is now...)

ropg avatar Mar 05 '21 14:03 ropg

I've been playing a lot with LGFX library, if I can be of any help to your documentation effort don't hesitate.

I've only scratched the surface of Doxygen with travis, do you know if this could be used in a github action ? Looks like there is an implementation so maybe the doc generation and publication can be automated and triggered whenever a new release is produced.

I know M5Stack is planning to use LGFX code in some unified core but the MCU scope is still unknown. There's already support for ESP32/SAMD, who knows what's next ? (e.g. ESP32-C3'RISCV)

The problems that will need to be solved in order to achieve this unification will probably deal with touch/notouch + button/nobutton conflicts too, so these upcoming change are likely to break some eggs.

Whatever happens, ESP32-Chimera-Core will stick to M5Stack API.

So reporting Core2Ez integration problems here is totally in the scope of that project.

The only concern I have is for the M5Stack-SD-Updater library which has a wider scope since it should work (but never achieved complete coverage) with native TFT_eSPI, old M5Core, M5Core2, LGFX, Chimera-Core.

tobozo avatar Mar 05 '21 15:03 tobozo

Check out core2ez.m5ez.com, it redirects to Read The Docs, who do all the documentation building. It's more sample documentation than real right now past chapter 2, but have a look.

ropg avatar Mar 05 '21 16:03 ropg

Have a look at lovyan03/LovyanGFX#105

ropg avatar Mar 05 '21 18:03 ropg

Hello. @ropg

LovyanGFX is currently being tweaked to be officially adopted into M5Stack. This includes tweaking it to be more compatible with TFT_eSPI. Some unacceptable specs will be lost, but we will try to add as many as possible that can be provided as functions so that the same ones can be used.

In addition, LovyanGFX v1.0.0, which has a new foundation design, is under development. Therefore, it is not recommended to make modifications in accordance with the currently released v0.3.9.

I'm currently in discussions with M5Stack, and there are several possibilities, including adopting LovyanGFX as it is as an official M5Stack library, or creating a new M5Display library derived from LovyanGFX.

At the very least, the current situation where each product has its own implementation of different display drivers seems to be a problem within M5Stack.

lovyan03 avatar Mar 06 '21 05:03 lovyan03

OK, I will wait to do anything drastic and just play around a bit.

Does this also mean we should hold off on documenting? Or is the 'develop' branch much closer to what will become 1.0.0 and should we just start documenting it?

I think we should use our time now to experiment with different ways of documenting things so we know which direction we want to move in.

ropg avatar Mar 06 '21 08:03 ropg

I think it is advisable to postpone the documentation for now. The base of LovyanGFX v1.0.0 will be completed soon, but due to the many specification changes involved, the release will be phased in. At least in v0.4.0, users will be able to choose between v0.4.0 and v1.0.0 by using the define flag.

lovyan03 avatar Mar 06 '21 08:03 lovyan03

Sure.

Can you explain briefly about the differences between what's there now and 1.0.0 ?

ropg avatar Mar 06 '21 17:03 ropg

It's time to move the discussion to a new location, since it's no longer relevant to the topic of Chimera Core. thanks.

lovyan03 avatar Mar 06 '21 21:03 lovyan03