M5Unified 0.2.3 broken on PaperS3
-
My sketches all fail to compile. I am using the 1.8.19 IDE on Linux, haven't moved to the 2.0 IDE yet :
Arduino: 1.8.19 (Linux), Board: "M5PaperS3, Disabled, OPI PSRAM, QIO 80MHz, 16MB (128Mb), Core 1, Core 1, Hardware CDC and JTAG, Enabled, Disabled, Disabled, UART0 / Hardware CDC, 16M Flash (3MB APP/9.9MB FATFS), 240MHz (WiFi), 921600, None, Disabled" In file included from /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.h:5, from /home/wsanders/Documents/ArduinoSketchbook/M5/badgeWX/badgeWX.ino:2: /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.hpp: In member function 'virtual void m5::M5Unified::begin(m5::M5Unified::config_t)': /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.hpp:326:62: error: no matching function for call to 'm5gfx::M5GFX::init_without_reset(bool&)' bool res = Display.init_without_reset(cfg.clear_display); ^ In file included from /home/wsanders/Documents/ArduinoSketchbook/libraries/M5GFX/src/M5GFX.h:22, from /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.hpp:19, from /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.h:5, from /home/wsanders/Documents/ArduinoSketchbook/M5/badgeWX/badgeWX.ino:2: /home/wsanders/Documents/ArduinoSketchbook/libraries/M5GFX/src/lgfx/v1/LGFXBase.hpp:1411:10: note: candidate: 'bool lgfx::v1::LGFX_Device::init_without_reset()' bool init_without_reset(void) { return init_impl(false, false); }; ^~~~~~~~~~~~~~~~~~ /home/wsanders/Documents/ArduinoSketchbook/libraries/M5GFX/src/lgfx/v1/LGFXBase.hpp:1411:10: note: candidate expects 0 arguments, 1 provided Multiple libraries were found for "WiFi.h" Used: /home/wsanders/.arduino15/packages/m5stack/hardware/esp32/2.1.3/libraries/WiFi Not used: /home/wsanders/arduino-1.8.19-NOSAVE/libraries/WiFi exit status 1
With 0.2.2 I needed to use these includes, in this order:
#include <epdiy.h> #include <M5Unified.h>
Maybe this has changed? Here's some sample code, it compiles with 0.2.2:
#include <epdiy.h> #include <M5Unified.h> static constexpr const char* state_name[16] = { "none" , "touch" , "touch_end" , "touch_begin" , "___" , "hold" , "hold_end" , "hold_begin" , "___" , "flick" , "flick_end" , "flick_begin" , "___" , "drag" , "drag_end" , "drag_begin" }; void setup(void) { Serial.begin(115200); M5.begin(); M5.Display.setRotation(M5.Display.getRotation() ^ 2); M5.Display.setEpdMode(epd_mode_t::epd_fastest); M5.Display.startWrite(); M5.Display.setTextSize(2); } void loop(void) { // too slow! M5.delay(10); M5.delay(2); M5.update(); // Count is going to be the bumber of "fingers" detected: 0, 1, max 2 // So, can be ignored for simple button press // Always seems to be 0 inside for loop? // auto count = M5.Touch.getCount(); auto t = M5.Touch.getDetail(0); if (t.state > 0) { // State is state of the entire touch screen // All we care about is t.wasFlicked Serial.print(t.state); Serial.println(state_name[t.state]); } M5.Display.display(); }
-
Hello @wsanders
the error indicates that M5GFX library is out of date. Did you update M5GFX library to the latest as well?
Thanks
Felix -
Still a problem:
Arduino: 1.8.19 (Linux), Board: "M5PaperS3, Disabled, OPI PSRAM, QIO 80MHz, 16MB (128Mb), Core 1, Core 1, Hardware CDC and JTAG, Enabled, Disabled, Disabled, UART0 / Hardware CDC, 16M Flash (3MB APP/9.9MB FATFS), 240MHz (WiFi), 921600, None, Disabled" /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.cpp: In static member function 'static bool m5::M5Unified::_speaker_enabled_cb_atomic_echo(void*, bool)': /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.cpp:338:10: error: variable 'spk_cfg' set but not used [-Werror=unused-but-set-variable] auto spk_cfg = self->Speaker.config(); ^~~~~~~ /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.cpp: In static member function 'static bool m5::M5Unified::_microphone_enabled_cb_atomic_echo(void*, bool)': /home/wsanders/Documents/ArduinoSketchbook/libraries/M5Unified/src/M5Unified.cpp:441:10: error: variable 'spk_cfg' set but not used [-Werror=unused-but-set-variable] auto spk_cfg = self->Speaker.config(); ^~~~~~~ cc1plus: some warnings being treated as errors Multiple libraries were found for "WiFi.h" Used: /home/wsanders/.arduino15/packages/m5stack/hardware/esp32/2.1.3/libraries/WiFi Not used: /home/wsanders/arduino-1.8.19-NOSAVE/libraries/WiFi exit status 1 Error compiling for board M5PaperS3.
M5GFX is now 0.2.5, M5United is 0.2.3, this bug comes from M5United, upgraded M5GFX is OK.
Too busy today to file a bug report on this, later.
-