My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

enum.h 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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. #ifndef __ENUM_H__
  23. #define __ENUM_H__
  24. #include "MarlinConfig.h"
  25. /**
  26. * Axis indices as enumerated constants
  27. *
  28. * Special axis:
  29. * - A_AXIS and B_AXIS are used by COREXY printers
  30. * - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
  31. * between X_AXIS and X Head movement, like CoreXY bots
  32. */
  33. enum AxisEnum {
  34. NO_AXIS = -1,
  35. X_AXIS = 0,
  36. A_AXIS = 0,
  37. Y_AXIS = 1,
  38. B_AXIS = 1,
  39. Z_AXIS = 2,
  40. C_AXIS = 2,
  41. E_AXIS = 3,
  42. X_HEAD = 4,
  43. Y_HEAD = 5,
  44. Z_HEAD = 6,
  45. ALL_AXES = 100
  46. };
  47. #define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
  48. #define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++)
  49. #define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
  50. #define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
  51. #define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
  52. #define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
  53. #define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
  54. #define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
  55. typedef enum {
  56. LINEARUNIT_MM,
  57. LINEARUNIT_INCH
  58. } LinearUnit;
  59. typedef enum {
  60. TEMPUNIT_C,
  61. TEMPUNIT_K,
  62. TEMPUNIT_F
  63. } TempUnit;
  64. /**
  65. * Debug flags
  66. * Not yet widely applied
  67. */
  68. enum DebugFlags {
  69. DEBUG_NONE = 0,
  70. DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
  71. DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
  72. DEBUG_ERRORS = _BV(2), ///< Not implemented
  73. DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
  74. DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
  75. DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
  76. DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling
  77. DEBUG_ALL = 0xFF
  78. };
  79. enum EndstopEnum {
  80. X_MIN,
  81. Y_MIN,
  82. Z_MIN,
  83. Z_MIN_PROBE,
  84. X_MAX,
  85. Y_MAX,
  86. Z_MAX,
  87. X2_MIN,
  88. X2_MAX,
  89. Y2_MIN,
  90. Y2_MAX,
  91. Z2_MIN,
  92. Z2_MAX
  93. };
  94. #if ENABLED(EMERGENCY_PARSER)
  95. enum e_parser_state {
  96. state_RESET,
  97. state_N,
  98. state_M,
  99. state_M1,
  100. state_M10,
  101. state_M108,
  102. state_M11,
  103. state_M112,
  104. state_M4,
  105. state_M41,
  106. state_M410,
  107. state_IGNORE // to '\n'
  108. };
  109. #endif
  110. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  111. enum AdvancedPauseMenuResponse {
  112. ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
  113. ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
  114. ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
  115. };
  116. #if ENABLED(ULTIPANEL)
  117. enum AdvancedPauseMessage {
  118. ADVANCED_PAUSE_MESSAGE_INIT,
  119. ADVANCED_PAUSE_MESSAGE_UNLOAD,
  120. ADVANCED_PAUSE_MESSAGE_INSERT,
  121. ADVANCED_PAUSE_MESSAGE_LOAD,
  122. ADVANCED_PAUSE_MESSAGE_EXTRUDE,
  123. ADVANCED_PAUSE_MESSAGE_OPTION,
  124. ADVANCED_PAUSE_MESSAGE_RESUME,
  125. ADVANCED_PAUSE_MESSAGE_STATUS,
  126. ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
  127. ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
  128. };
  129. #endif
  130. #endif
  131. /**
  132. * States for managing Marlin and host communication
  133. * Marlin sends messages if blocked or busy
  134. */
  135. #if ENABLED(HOST_KEEPALIVE_FEATURE)
  136. enum MarlinBusyState {
  137. NOT_BUSY, // Not in a handler
  138. IN_HANDLER, // Processing a GCode
  139. IN_PROCESS, // Known to be blocking command input (as in G29)
  140. PAUSED_FOR_USER, // Blocking pending any input
  141. PAUSED_FOR_INPUT // Blocking pending text input (concept)
  142. };
  143. #endif
  144. /**
  145. * SD Card
  146. */
  147. enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
  148. /**
  149. * Ultra LCD
  150. */
  151. enum LCDViewAction {
  152. LCDVIEW_NONE,
  153. LCDVIEW_REDRAW_NOW,
  154. LCDVIEW_CALL_REDRAW_NEXT,
  155. LCDVIEW_CLEAR_CALL_REDRAW,
  156. LCDVIEW_CALL_NO_REDRAW
  157. };
  158. /**
  159. * Dual X Carriage modes. A Dual Nozzle can also do duplication.
  160. */
  161. #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
  162. enum DualXMode {
  163. DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
  164. DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
  165. DXC_DUPLICATION_MODE
  166. };
  167. #endif
  168. /**
  169. * Workspace planes only apply to G2/G3 moves
  170. * (and "canned cycles" - not a current feature)
  171. */
  172. #if ENABLED(CNC_WORKSPACE_PLANES)
  173. enum WorkspacePlane { PLANE_XY, PLANE_ZX, PLANE_YZ };
  174. #endif
  175. #endif // __ENUM_H__