🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Unified 0.2.3 broken on PaperS3

    Scheduled Pinned Locked Moved SOFTWARE
    4 Posts 2 Posters 2.8k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wsanders
      last edited by wsanders

      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();
      }
      
      
      
      
      felmueF 1 Reply Last reply Reply Quote 0
      • felmueF Online
        felmue @wsanders
        last edited by

        Hello @wsanders

        the error indicates that M5GFX library is out of date. Did you update M5GFX library to the latest as well?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        W 1 Reply Last reply Reply Quote 0
        • W Offline
          wsanders @felmue
          last edited by

          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.

          felmueF 1 Reply Last reply Reply Quote 0
          • felmueF Online
            felmue @wsanders
            last edited by

            Hello @wsanders

            I think these compiler error have been fixed (see here), but after tagging the library. I guess it will be in M5Unified 0.2.4.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0

            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
            • First post
              Last post