Custom Menu

Hello fellows,

i want to start a wizard menu after printer::setup.

I read all about menus and i made my own menu but i can't find a way to show it using pushmenu function because argument UIMenu isn't const.
Is there any way ?


  • You have to define it like the other menus, then it should be const. All menus are const since they are stored in flash memory (fro avr at least).
  • And another one question:

    What i should write to the functions

    What's the purpose of each one if i'm writing a wizard ?
  • And...

    why i have to use both UI_WIZARD4_T and UI_MENU_ACTIONCOMMAND_T since both have action argument ?

    If you can clarify the difference i would be very greatefull.
  • There are 2 kinds of commands, Direct commands like home. These get executed when you call the action and are implemented in executeAction.

    Then you have value changing commands with or without own view. Like position change or acceleration change. These have nextPrevious implemented to change the value. On okAction they should store value if this did not happen before anyway.

    A wizard is the same as a menu with the difference that it never returns on a timeout so you know the user will finish the sequence. So you either have to make a simple sequence the user has to follow and every "ok" will open the next menu. See filament change on jam detection as example. Or you have normal menus with a exit option, but I never tested/used this so I can not say if that if already fully implemented.

    "why i have to use both UI_WIZARD4_T and UI_MENU_ACTIONCOMMAND_T since both have action argument ?"

    Sorry, it's a while ago I did this. I think UI_WIZARD4_T  is the content you see and UI_MENU_ACTIONCOMMAND_T was to get the next action into it as it works like a menu. Somthing like that I think.
  • Thanks Repetier.

    One more. I'm showing my wizard by using pushmenu function. The wizard pops up but it lasts for 1 second and the it dissapears itself.

    Do i have to do something more or is it a bug ?
  • Sorry, ignore the previous post.

    1) Is there any UI_WIZARD6 (that contains 6 rows ? )
    2) Is it possible for a menu to have headline (or title) row(s) and selectable menu entries ? I need a menu type with text and a YES/NO option

    Thanks in advance
  • Use the headline for non selectable lines, like in abort sd print yes/no question

    #define UI_MENU_SD_ASKSTOP {&ui_menu_sd_askstop_head,&ui_menu_sd_askstop_no,&ui_menu_sd_askstop_yes}

    Check ui.h line 381ff for available commands. UI_WIZARD6  is not available but use 4 line version and you see how to extend it. These are all only helpers to reduce writing amount.

  • Repetier one "last" question.

    I want to use a progress bar.

    1) What is the best/easiest way to present it PAGE or MENU ?
    2) How to dynamically update this bar based on the extruder temperature ?

    Thanks again
  • You mean drawing a bar with teh u8g lib graphic commands? You need to do it like I do with the primary screen. You need to detect that it is that special screen and add the graphic commands there. It does not matter if page or menu. Pages are a bit easier to detect as I do this already for page 0 so you can see how to do it. And only pages are shown all the time. Menus disappear, so the question depends more on what you want to achieve.
Sign In or Register to comment.