-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
[FR] CUSTOM_USER_MENU As Submenu To Configuration Menu #18096
Comments
You could copy these lines from
and paste them into I give you this for your test purposes. |
Thanks for the hints Tannoo. I followed your guidance, but results were unsuccessful. Here's what I did.. the Custom_menu setup in Configuration_adv.h file still looks like this:
Note the menu defines in USER_ DESC and USER_GCODE above are labeled 1 through 5. I added this new code block with similar labels, but for 6 through 10.
Then, In file menu_configuration.cpp, I added this code block, per your direction, right after #ifENABLED(DUAL_X_CARRIAGE)... #endif:
Problem is, the Menus 1, 2, 6, and 7 are all placed in the Main menu under "Custom Commands". No "Custom Commands" are shown in the Configuration menu. I still haven't figured out how the menu macros work. I'll try looking at it later. |
Okay. I will have to test it myself. I thought it would work. I will see what I can do in the am. |
Alright... I have done and tested this: To add items to the custom user menu, edit
It is coded in Now, to get it in the
If you want a whole other dedicated submenu for your purpose, it is a little more complicated. |
Thanks Tannoo, I tested it. It does place the custom menus inside the Configuration Menu, however I found it duplicates the menus in the Main Menu. I think, they need to be defined separately in |
Yes, it does. I was giving that to you for the time being. Like I said, if you wanted it as it's own, it will take a little more doing.
You first stated that you wanted it in the configuration menu also. That is what I gave you this time. |
Have you nailed down the hardware to work? Also remember, the user menu can have up to 25 items. Just add them in |
Yes, I have the WiFi hardware, ESP8266 (D1 Mini Pro), custom PCB adapter for 3.3V/5V RX/TX bi-directional level translator, but waiting for materials to build cable between adapter and printer's AUX-1 connector. |
Did you want just a menu option to turn it on and off? |
Okay... here is a new submenu for you. This is based on Insert this in `configuration_adv.h` just under LN # 3084: /**
* User-defined wireless menu items that execute custom GCode
*/
#define CUSTOM_WIRELESS_MENUS
#if ENABLED(CUSTOM_WIRELESS_MENUS)
//#define CUSTOM_WIRELESS_MENU_TITLE "Wifi Commands"
#define WIRELESS_SCRIPT_DONE "M117 Wireless Script Done"
#define WIRELESS_SCRIPT_AUDIBLE_FEEDBACK
//#define WIRELESS_SCRIPT_RETURN // Return to status screen after a script
#define WIRELESS_DESC_1 "Wifi On"
#define WIRELESS_GCODE_1 "M118 [ESP110] ON pwd=12345678"
#define WIRELESS_DESC_2 "Wifi Off"
#define WIRELESS_GCODE_2 "M118 [ESP110] OFF pwd=12345678"
//#define WIRELESS_DESC_3 "Wifi ????"
//#define WIRELESS_GCODE_3 "M118 ????"
//#define WIRELESS_DESC_4 "Wifi ????"
//#define WIRELESS_GCODE_4 "M118 ????"
#endif And add this line in PROGMEM Language_Str MSG_WIRELESS_MENU = _UxGT("Wireless Commands"); Add these in #if ENABLED(CUSTOM_WIRELESS_MENUS)
void menu_wireless();
#endif NOTE: Changing where you put the following can change the position of this in the menu structure. Just put it before or after any other #if ENABLED(CUSTOM_WIRELESS_MENUS)
#ifdef CUSTOM_WIRELESS_MENU_TITLE
SUBMENU_P(PSTR(CUSTOM_WIRELESS_MENU_TITLE), menu_wireless);
#else
SUBMENU(MSG_WIRELESS_MENU, menu_wireless);
#endif
#endif And copy this file to Is this more of what you wanted? |
If you checked this by email. Please reload via GitHub as I have updated and edited the last post multiple times. |
I followed your guide and the new menus test good. It is what I was wanting. Good job Tannoo! It's unfortunate the If you don't mind, I will try in the next few days, making some changes and submit a PR. This to include:
|
EDIT: Nevermind. I had to re-read what you said. I have no objections to renaming anything about this. |
I will let you submit any PR you want. I hate doing those anyway. |
Tannoo, Can you look the PR I submitted from my depository (CustomMenus branch) to see why it fails checks. It complies fine with FW 2.0.5,3, but checks says 'Bad Target' branch. |
I looked around and I am not sure why there is a bad target. Maybe check path lengths? But, I would think that there would have been more errors if that were the case. I am sure someone here on git knows what might be going on. |
Update.. I just got notification from thisiskeithb with some guidance on how to fix my PR. Will look at that tomorrow. Thanks for looking. My first PR, so not surprised. Here's what I did to create the PR:
Wasn't sure which branch to fork, but my thinking was branch 2.0.x would be more stable, so I chose that. |
Your PR should be created against |
@Tannoo Seems like your pretty good at the menu system... Is it posssible to make a menu ala the one Prusa use Normal/Stealth for steppers... On my board it is possible to change current on the stepper using M907 "PWM_MOTOR_CURRENT" So would like a menu item who said "Stepper Mode" on the Left side, and in same line on the right can change from Normal to Slient depending on what the PWM_MOTOR_CURRENT is set to... Can you help with that? |
Please start a new topic and someone might be able to help. This is old and I have actually been away from Marlin for quite some time. I am sure tons have changed. I would need some time to look it over, but someone else may be much more up-to-date with the current menu coding for faster help with this. |
#18177 was merged, this can be closed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
CUSTOM_USER_MENU's option in Configuration_adv.h, are only available to be placed as menu item in Main Menu. Request CUSTOM_USER_MENU's also be available as sub-menu items for "Configuration" menu item.
I am implementing peripheral hardware equipment (WiFi/Bluetooth radio) to be controlled using g-code M118 to send commands over wired SERIAL_PORT_2. This would allow turning ON/OFF the WiFi/Bluetooth radio to conserve power should user wish to use printer with USB or as standalone. For this implementation, CUSTOM_USER_MENU would be better placed as a sub-menu item under the "Configuration" setting main menu item.
The text was updated successfully, but these errors were encountered: