Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Menu #698

Closed
SergeyKrutyko opened this issue Sep 26, 2018 · 6 comments
Closed

Default Menu #698

SergeyKrutyko opened this issue Sep 26, 2018 · 6 comments

Comments

@SergeyKrutyko
Copy link

I am sorry for nubby question....

i found default menu in klipper/klippy/extras/display/menu.cfg

how i can enable it ?

Thanks!

@ruevs
Copy link
Contributor

ruevs commented Sep 26, 2018

It's enabled by default.
Simply provide the encoder and click pins in your configuration file.
Here is an example for a "RepRapDiscount 2004 Smart Controller" connected to a RAMPS (compatible) board:
https://github.com/KevinOConnor/klipper/blob/170b9678fba2749063023008f51ebdff7e0e0759/config/printer-anycubic-kossel-2016.cfg#L99
Here is an explanation:
https://github.com/KevinOConnor/klipper/blob/170b9678fba2749063023008f51ebdff7e0e0759/config/example-extras.cfg#L820

@SergeyKrutyko
Copy link
Author

It's enabled by default.
Simply provide the encoder and click pins in your configuration file.
Here is an example for a "RepRapDiscount 2004 Smart Controller" connected to a RAMPS (compatible) board:
klipper/config/printer-anycubic-kossel-2016.cfg

Line 99 in 170b967

encoder_pins: ^ar31, ^ar33

Here is an explanation:
klipper/config/example-extras.cfg

Line 820 in 170b967

#encoder_pins:

Thanks man!

@SergeyKrutyko
Copy link
Author

one more questions:

how i can disable few items on default menu ?
how i can add personal items to menu?
i need create new own menu? or have simply patch?

@ruevs
Copy link
Contributor

ruevs commented Sep 27, 2018

To remove items from the default menu you have to delete them from menu.cfg. Although re-defining them as empty in printer.cfg may also work - I am not sure, see here #500 (comment)

Add your custom menus in printer.cfg.
Documentation:
https://github.com/KevinOConnor/klipper/blob/master/config/example-menu.cfg
An example:
#596 (comment)

@mcmatrix
Copy link
Contributor

mcmatrix commented Sep 27, 2018

I don't recommend to make changes in the default menu.cfg
Next time you update Klipper's codebase your changes may be overwritten.

But you can easily overwrite default menu items.
Just redefine items with the same name in your printer config.
For example, to hide Octoprint menu just redefine it with enable: false

[menu __octoprint]
type: list
enable: false
name: OctoPrint
items:
    .__pause
    .__resume
    .__abort

To add something to the menu, you need to redefine and include your item.
For example, to add your menu to main, just define your menu items and add it to
redefined __main

[menu __main]
type: list
name: Main Menu
items:
    __tune
    __octoprint
    __sdcard
    my_super_menu
    __control
    __temp
    __filament
    __prepare
    __test

Or you can fully define your own menu structure and use it.
under display section use menu_root: your_menu_root_elem attribute.

You have to be careful when redefining menus and have to be prepared to adjust your changes according to default menu changes.
NB! Any change in menu system or in default menu.cfg may break your config!

@SergeyKrutyko
Copy link
Author

thanks mcmatrix, i try now!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants