Welcome! Log In Create A New Profile

Advanced

[solved] Reorganize menu items in Marlin 2.0.x

Posted by RomanCZE1 
[solved] Reorganize menu items in Marlin 2.0.x
February 24, 2021 01:27AM
Does anyone know how to move an menu item in the menu "print from TF" from bottom to the top position? Now I have this item on the 6. position and I must scroll and scroll down. MARLIN 2.0.x on the Ender3 pro with 12864 LCD. Official Creality firmware has this item on the second place. Thanks for help. Roman

Edited 2 time(s). Last edit at 02/25/2021 02:22PM by RomanCZE1.
Attachments:
open | download - 151496694_2811501245731024_5875695827944912718_o.jpg (215.2 KB)
Re: Reorganize menu items in Marlin 2.0.x
February 24, 2021 02:14AM
That would be a code change, do you have the source for that version of marlin?
Re: Reorganize menu items in Marlin 2.0.x
February 24, 2021 04:55AM
NB "print from TF" was updated to "Print from Media" quite some time back so that is not a current marlin.

Change was made back in Aug 14 2019
Re: Reorganize menu items in Marlin 2.0.x
February 24, 2021 02:20PM
Yes I have marlin in the visual studio. That picture is only for sample so I have really "Print from media". My current version is bugfix 2.0.x.
Where can I change this?

Edited 3 time(s). Last edit at 02/24/2021 11:42PM by RomanCZE1.
Re: Reorganize menu items in Marlin 2.0.x
February 24, 2021 04:53PM
Marlin/src/lcd/menu/menu_main.cpp

search for MSG_MEDIA_MENU
Re: Reorganize menu items in Marlin 2.0.x
February 25, 2021 12:01AM
Thanks. I found this. But I don't know next steps how to. I didn't see any logical sorting.
Re: Reorganize menu items in Marlin 2.0.x
February 25, 2021 01:52AM
cut the block
#if BOTH(HAS_ENCODER_WHEEL, SDSUPPORT)

    if (!busy) {

      // *** IF THIS SECTION IS CHANGED, REPRODUCE ABOVE ***

      //
      // Autostart
      //
      #if ENABLED(MENU_ADDAUTOSTART)
        ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin);
      #endif

      if (card_detected) {
        if (!card_open) {
          #if PIN_EXISTS(SD_DETECT)
            GCODES_ITEM(MSG_CHANGE_MEDIA, PSTR("M21"));
          #else
            GCODES_ITEM(MSG_RELEASE_MEDIA, PSTR("M22"));
          #endif
          SUBMENU(MSG_MEDIA_MENU, MEDIA_MENU_GATEWAY);
        }
      }
      else {
        #if PIN_EXISTS(SD_DETECT)
          ACTION_ITEM(MSG_NO_MEDIA, nullptr);
        #else
          GCODES_ITEM(MSG_ATTACH_MEDIA, PSTR("M21"));
        #endif
      }
    }

  #endif // HAS_ENCODER_WHEEL && SDSUPPORT

and paste it directly at top of menu, ie just under the lines
START_MENU();
  BACK_ITEM(MSG_INFO_SCREEN);
Re: Reorganize menu items in Marlin 2.0.x
February 25, 2021 08:41AM
Big thanks man! That is what I want!
Sorry, only registered users may post in this forum.

Click here to login