Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. richardmckenna
    R
    • Continue chat with richardmckenna
    • Start new chat with richardmckenna
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    richardmckenna

    @richardmckenna

    0
    Reputation
    6
    Posts
    1484
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    richardmckenna Follow

    Posts made by richardmckenna

    • RE: ezMenu not declared in scope error

      @lukasmaximus thanks for the reply. Yeah I'm using the latest version 2.1.2 and have read the manual several times in places ha ha.

      So after messing around with it for too long last night this morning I figured I would try compiling it in the Arduino IDE rather than the VSCode Arduino extension that I have been using up until now.

      And it works! Obviously something going wrong with the extension. I will report the issue on their github.

      posted in M5EZ
      R
      richardmckenna
    • ezMenu not declared in scope error

      Hi all,

      I'm trying to use advanced functions with ezMenu addItem. The only example I can find for it is in the M5ez.ccp file https://github.com/ropg/M5ez/blob/master/src/M5ez.cpp line 1248.

      So in my main.ino file I have

      void mainmenu_manage_boards() {
          // TODO
          prefs.begin("BOARDSTATUS");
          
          String idx;
      
          ezMenu savedBoards("Managing Boards");
          if (board_count < 1) {
              ez.msgBox("No Boards", "You have no saved Boards.", "OK");
              return;
          }
          for (uint8_t n = 1; n < board_count+1; n++) {
              idx = "NAME" + (String)n;
              String name = prefs.getString(idx.c_str(), "");
              savedBoards.addItem(name, NULL, _savedSelected);
          }
          savedBoards.txtSmall();
          savedBoards.buttons("up#Back#Forget##down#");
          savedBoards.run();
          
          prefs.end();
      }
      
      bool _savedSelected(ezMenu* callingMenu) {
        if (callingMenu->pickButton() == "Forget") {
          if (ez.msgBox("Forgetting board", "Are you sure you want | to forget board | " + callingMenu->pickName() + " ?", "Yes##No") == "Yes") {
            callingMenu->deleteItem(callingMenu->pick());
          }
        }
        return false;
      }
      

      On compile I get the following error

      error: 'ezMenu' was not declared in this scope
       static bool _savedSelected(ezMenu* callingMenu) {
      

      Any suggestions? If I do

      savedBoards.addItem(name, NULL, NULL);
      

      The menu renders fine.

      Thanks in advance.

      posted in M5EZ
      R
      richardmckenna
    • RE: Degrees C Symbol

      @world101 thanks. I think I will do this.

      posted in General
      R
      richardmckenna
    • RE: Degrees C Symbol

      @m5stack Thank you I will take a look.

      posted in General
      R
      richardmckenna
    • RE: Degrees C Symbol

      @m5stack hmmm ok that's a shame.

      I don't suppose you can suggest any other way of displaying it? Would have thought it was a common thing to do given temperature applications are a popular thing for this kind of hardware.

      Is there any documentation on what characters are available? Or is it just the standard ASCII set but not the extended set?

      posted in General
      R
      richardmckenna
    • Degrees C Symbol

      Hi all,

      I can't seem to find the answer to this anywhere. I'm using the Arduino API and trying to display the degrees C symbol eg 5.2ºC in M5.Lcd.printf("%0.1f%cC", temp, (char)000) but can't for the life of me find what number I need for (char)000

      Can anyone help?

      posted in General
      R
      richardmckenna