how to add button press to jump to a SubMenu in LCD please help.confused smiley
April 23, 2017 01:10AM
Hi,
I am Gurmeet from India, I have been using my 3D Printer with Marlin Firmware for just over a year now.
since few months I am trying to add a few buttons to be able to directly jump to a sub menu in LCD, Like directly jumping to "Move Axis" Menu in Prepare Menu, Jumping to Babystepping while printing, or directly go to temprature setting menu and then use the rotary encoder normally as it would have been.

Can anyone help me with this?. I dont know much about coding in c/c++.
Re: how to add button press to jump to a SubMenu in LCD please help.confused smiley
April 23, 2017 05:42PM
Jumping to Babystepping while printing,

If you look at the current RC-8's RCBugFix... I added a 'Double Click' option. If the option is enabled (in Configuration_adv.h) and the LCD Panel is at its status screen.... You can double click the encoder wheel and instantly go to Z-BabyStepping. I use it all the time. I deliberately set my nozzle height a tiny bit too high and I use the Z-BabyStepping to get the height exactly correct while the printer is drawing the skirt around the part. It is a good way to make sure you get perfect adhesion on your print.

You can hook in at the same place to watch for different buttons being pressed and use the same code to jump to different routines.

If you are not fluent in C, you are going to have a difficult time... But the simplest way to do this is go into Marlin's idle() task in Marlin_main.cpp and add a check to see if the button you care about is pressed.

If it is... call void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0); (in ultralcd.cpp) with the function name you want activated. The next LCD update cycle will put up that screen.

But like I say... If you are not fluent in C, this is a very difficult piece of code to try to use as a learning experience.

Edited 3 time(s). Last edit at 04/24/2017 12:53AM by Roxy.
Sorry, only registered users may post in this forum.

Click here to login