My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pause.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * feature/pause.h - Pause feature support functions
  25. * This may be combined with related G-codes if features are consolidated.
  26. */
  27. typedef struct {
  28. float unload_length, load_length;
  29. } fil_change_settings_t;
  30. #include "../inc/MarlinConfigPre.h"
  31. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  32. #include "../libs/nozzle.h"
  33. enum PauseMode : char {
  34. PAUSE_MODE_SAME,
  35. PAUSE_MODE_PAUSE_PRINT,
  36. PAUSE_MODE_CHANGE_FILAMENT,
  37. PAUSE_MODE_LOAD_FILAMENT,
  38. PAUSE_MODE_UNLOAD_FILAMENT
  39. };
  40. enum PauseMessage : char {
  41. PAUSE_MESSAGE_PAUSING,
  42. PAUSE_MESSAGE_CHANGING,
  43. PAUSE_MESSAGE_WAITING,
  44. PAUSE_MESSAGE_UNLOAD,
  45. PAUSE_MESSAGE_INSERT,
  46. PAUSE_MESSAGE_LOAD,
  47. PAUSE_MESSAGE_PURGE,
  48. PAUSE_MESSAGE_OPTION,
  49. PAUSE_MESSAGE_RESUME,
  50. PAUSE_MESSAGE_STATUS,
  51. PAUSE_MESSAGE_HEAT,
  52. PAUSE_MESSAGE_HEATING
  53. };
  54. #if HAS_LCD_MENU
  55. enum PauseMenuResponse : char {
  56. PAUSE_RESPONSE_WAIT_FOR,
  57. PAUSE_RESPONSE_EXTRUDE_MORE,
  58. PAUSE_RESPONSE_RESUME_PRINT
  59. };
  60. extern PauseMenuResponse pause_menu_response;
  61. extern PauseMode pause_mode;
  62. #endif
  63. extern fil_change_settings_t fc_settings[EXTRUDERS];
  64. extern uint8_t did_pause_print;
  65. #if ENABLED(DUAL_X_CARRIAGE)
  66. #define DXC_PARAMS , const int8_t DXC_ext=-1
  67. #define DXC_ARGS , const int8_t DXC_ext
  68. #define DXC_PASS , DXC_ext
  69. #else
  70. #define DXC_PARAMS
  71. #define DXC_ARGS
  72. #define DXC_PASS
  73. #endif
  74. void do_pause_e_move(const float &length, const feedRate_t &fr_mm_s);
  75. bool pause_print(const float &retract, const xyz_pos_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS);
  76. void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS);
  77. void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0 DXC_PARAMS);
  78. bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
  79. const bool pause_for_user=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT DXC_PARAMS);
  80. bool unload_filament(const float &unload_length, const bool show_lcd=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT
  81. #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
  82. , const float &mix_multiplier=1.0
  83. #endif
  84. );
  85. #endif // ADVANCED_PAUSE_FEATURE