Welcome! Log In Create A New Profile

Advanced

Adding a new sub-menu into "quick-settings"

Posted by tiwanacote 
Adding a new sub-menu into "quick-settings"
October 15, 2015 05:00PM
Hello, I'm enthused making some modifications to the firmware.

Now, I would like to add a sub-menu called "x"to menu "Quick-menu" (Pre-heatPLA, Pre-heatABS, CoolDown,... ... , and X), and when I select it or press it, then show some actions X1,X2,X3...


//ADD SOME ACTION:

UI_MENU_ACTIONCOMMAND_FILTER(ui_menu_x1,UI_TEXT_X1,UI_ACTION_for_example_DISABLE_STEPPER1,0,MENU_MODE_PRINTING)
UI_MENU_ACTIONCOMMAND_FILTER(ui_menu_x2,UI_TEXT_X2,UI_ACTION_for_example_DISABLE_STEPPER2,0,MENU_MODE_PRINTING)
UI_MENU_ACTIONCOMMAND_FILTER(ui_menu_x3,UI_TEXT_X3,UI_ACTION_for_example_DISABLE_STEPPER3,0,MENU_MODE_PRINTING)

#define UI_X1, &ui_menu_x1
#define UI_X1_COUNT 1
#define UI_X2, &ui_menu_x2
#define UI_X2_COUNT 1
#define UI_X3, &ui_menu_x3
#define UI_X3_COUNT 1

#define UI_MENU_X {UI_MENU_ADDCONDBACK, UI_X1, UI_X2, UI_X3 }
UI_MENU(ui_menu_quick_x,UI_MENU_X,1+UI_X1_COUNT+UI_X2_COUNT+UI_X3_COUNT)


Now, How I should do to add to "quick-menu" ?
I should use: UI_MENU_SUBMENU(ui_menu_quick, UI_TEXT_QUICK_X, ui_menu_quick_x) ?????
or direct add "ui_menu_quick_x" in :



//#define UI_MENU_QUICK {UI_MENU_ADDCONDBACK &ui_menu_home_all BABY_ENTRY ,&ui_menu_quick_speedmultiply,&ui_menu_quick_flowmultiply UI_TOOGLE_LIGHT_ENTRY UI_CHANGE_FIL_ENT,&ui_menu_quick_preheat_pla,&ui_menu_quick_preheat_abs,&ui_menu_quick_cooldown,&ui_menu_quick_origin,&ui_menu_quick_stopstepper MENU_PSON_ENTRY DEBUG_PRINT_EXTRA}

//UI_MENU(ui_menu_quick,UI_MENU_QUICK,8+BABY_CNT+UI_MENU_BACKCNT+MENU_PSON_COUNT+DEBUG_PRINT_COUNT+UI_TOGGLE_LIGHT_COUNT+UI_CHANGE_FIL_CNT)



Regards!!!
Re: Adding a new sub-menu into "quick-settings"
October 17, 2015 12:27PM
Adding a submenu to a submenu is the same as in the main menu. Define a line referencing it and add it and increase entry count by 1 (the count lines).

The new submenu has similar code like e.g. quick menu. Just copy the logic.

Remark: New version now uses changeable translations. So all menu entries having translateable entries have now _T appended. The old version with directly included text will still continue to work.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Sorry, only registered users may post in this forum.

Click here to login