Add Drilling cycles (G81, G82 and G83)#16103
Closed
FNeo31 wants to merge 10 commits intoMarlinFirmware:bugfix-2.0.xfrom
FNeo31:bugfix-2.0.x
Closed
Add Drilling cycles (G81, G82 and G83)#16103FNeo31 wants to merge 10 commits intoMarlinFirmware:bugfix-2.0.xfrom FNeo31:bugfix-2.0.x
FNeo31 wants to merge 10 commits intoMarlinFirmware:bugfix-2.0.xfrom
FNeo31:bugfix-2.0.x
Conversation
more variables for CNC users
Contributor
|
Great work, I like this idea. CNC menu/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
//
// CNC Menu
//
#include "../../inc/MarlinConfigPre.h"
#if HAS_LCD_MENU && ENABLED(CNC_DRILLING_CYCLE)
#include "menu.h"
#include "../../gcode/queue.h"
#ifdef CNC_SCRIPT_DONE
#define _DONE_SCRIPT "\n" CNC_SCRIPT_DONE
#else
#define _DONE_SCRIPT ""
#endif
void _lcd_cnc_gcode(PGM_P const cmd) {
queue.inject_P(cmd);
#if ENABLED(CNC_SCRIPT_AUDIBLE_FEEDBACK) && HAS_BUZZER
ui.completion_feedback();
#endif
#if ENABLED(CNC_SCRIPT_RETURN)
ui.return_to_status();
#endif
}
void menu_cnc() {
START_MENU();
BACK_ITEM(MSG_MAIN);
#if defined(CNC_DESC_1) && defined(CNC_GCODE_1)
ACTION_ITEM_P(PSTR(CNC_DESC_1), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_1 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_2) && defined(CNC_GCODE_2)
ACTION_ITEM_P(PSTR(CNC_DESC_2), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_2 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_3) && defined(CNC_GCODE_3)
ACTION_ITEM_P(PSTR(CNC_DESC_3), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_3 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_4) && defined(CNC_GCODE_4)
ACTION_ITEM_P(PSTR(CNC_DESC_4), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_4 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_5) && defined(CNC_GCODE_5)
ACTION_ITEM_P(PSTR(CNC_DESC_5), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_5 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_6) && defined(CNC_GCODE_6)
ACTION_ITEM_P(PSTR(CNC_DESC_6), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_6 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_7) && defined(CNC_GCODE_7)
ACTION_ITEM_P(PSTR(CNC_DESC_7), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_7 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_8) && defined(CNC_GCODE_8)
ACTION_ITEM_P(PSTR(CNC_DESC_8), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_8 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_9) && defined(CNC_GCODE_9)
ACTION_ITEM_P(PSTR(CNC_DESC_9), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_9 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_10) && defined(CNC_GCODE_10)
ACTION_ITEM_P(PSTR(CNC_DESC_10), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_10 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_11) && defined(CNC_GCODE_11)
ACTION_ITEM_P(PSTR(CNC_DESC_11), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_11 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_12) && defined(CNC_GCODE_12)
ACTION_ITEM_P(PSTR(CNC_DESC_12), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_12 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_13) && defined(CNC_GCODE_13)
ACTION_ITEM_P(PSTR(CNC_DESC_13), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_13 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_14) && defined(CNC_GCODE_14)
ACTION_ITEM_P(PSTR(CNC_DESC_14), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_14 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_15) && defined(CNC_GCODE_15)
ACTION_ITEM_P(PSTR(CNC_DESC_15), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_15 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_16) && defined(CNC_GCODE_16)
ACTION_ITEM_P(PSTR(CNC_DESC_16), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_16 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_17) && defined(CNC_GCODE_17)
ACTION_ITEM_P(PSTR(CNC_DESC_17), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_17 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_18) && defined(CNC_GCODE_18)
ACTION_ITEM_P(PSTR(CNC_DESC_18), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_18 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_19) && defined(CNC_GCODE_19)
ACTION_ITEM_P(PSTR(CNC_DESC_19), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_19 _DONE_SCRIPT)); });
#endif
#if defined(CNC_DESC_20) && defined(CNC_GCODE_20)
ACTION_ITEM_P(PSTR(CNC_DESC_20), []{ _lcd_cnc_gcode(PSTR(CNC_GCODE_20 _DONE_SCRIPT)); });
#endif
END_MENU();
}
#endif // HAS_LCD_MENU && CUSTOM_CNC_MENUS |
6a1a2d4 to
022b6b9
Compare
f94b384 to
bd550bb
Compare
28c6bd2 to
ebd2bcc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add Canned Drilling cycles (G81, G82 and G83)
(need to repeat the G code cycle each position no need to cancel for this reason)
Prepare the develop of 5 axis CNC milling (without RTCP for now)
Increase the number of variables for custom menu (from 5 to 20) and custom CNC Users preset variables to easy probing and define Zeros (G54 to G59)
Need to optimizations in some sections
Benefits
Add Canned Drilling cycles (G81, G82 and G83)
Increase the number of variables for custom menu (from 5 to 20)
Related Issues
[FR] Add Drilling canned cycles to Marlin 2.0 #14448
Add G81 and G83 drilling cycles #14225