mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-24 12:35:51 +00:00
Add "End Repeat Loops" menu item
This commit is contained in:
parent
fadc8a1944
commit
121d4bf52a
@ -39,6 +39,10 @@ private:
|
|||||||
static uint8_t index;
|
static uint8_t index;
|
||||||
public:
|
public:
|
||||||
static inline void reset() { index = 0; }
|
static inline void reset() { index = 0; }
|
||||||
|
static inline bool is_active() {
|
||||||
|
LOOP_L_N(i, index) if (marker[i].counter) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
static bool is_command_M808(char * const cmd) { return cmd[0] == 'M' && cmd[1] == '8' && cmd[2] == '0' && cmd[3] == '8' && !NUMERIC(cmd[4]); }
|
static bool is_command_M808(char * const cmd) { return cmd[0] == 'M' && cmd[1] == '8' && cmd[2] == '0' && cmd[3] == '8' && !NUMERIC(cmd[4]); }
|
||||||
static void early_parse_M808(char * const cmd);
|
static void early_parse_M808(char * const cmd);
|
||||||
static void add_marker(const uint32_t sdpos, const uint16_t count);
|
static void add_marker(const uint32_t sdpos, const uint16_t count);
|
||||||
|
@ -388,6 +388,7 @@ namespace Language_en {
|
|||||||
PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Resume Print");
|
PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Resume Print");
|
||||||
PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Host Start");
|
PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Host Start");
|
||||||
PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop Print");
|
PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop Print");
|
||||||
|
PROGMEM Language_Str MSG_END_LOOPS = _UxGT("End Repeat Loops");
|
||||||
PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Printing Object");
|
PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Printing Object");
|
||||||
PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancel Object");
|
PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancel Object");
|
||||||
PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object =");
|
PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object =");
|
||||||
|
@ -58,6 +58,10 @@
|
|||||||
#include "../../feature/host_actions.h"
|
#include "../../feature/host_actions.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(GCODE_REPEAT_MARKERS)
|
||||||
|
#include "../../feature/repeat.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void menu_tune();
|
void menu_tune();
|
||||||
void menu_cancelobject();
|
void menu_cancelobject();
|
||||||
void menu_motion();
|
void menu_motion();
|
||||||
@ -120,6 +124,11 @@ void menu_main() {
|
|||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(GCODE_REPEAT_MARKERS)
|
||||||
|
if (repeat.is_active())
|
||||||
|
ACTION_ITEM(MSG_END_LOOPS, repeat.cancel);
|
||||||
|
#endif
|
||||||
|
|
||||||
SUBMENU(MSG_TUNE, menu_tune);
|
SUBMENU(MSG_TUNE, menu_tune);
|
||||||
|
|
||||||
#if ENABLED(CANCEL_OBJECTS) && DISABLED(SLIM_LCD_MENUS)
|
#if ENABLED(CANCEL_OBJECTS) && DISABLED(SLIM_LCD_MENUS)
|
||||||
|
Loading…
Reference in New Issue
Block a user