My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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. /**
  25. * Axis indices as enumerated constants
  26. *
  27. * Special axis:
  28. * - A_AXIS and B_AXIS are used by COREXY printers
  29. * - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
  30. * between X_AXIS and X Head movement, like CoreXY bots
  31. */
  32. enum AxisEnum {
  33. NO_AXIS = -1,
  34. X_AXIS = 0,
  35. A_AXIS = 0,
  36. Y_AXIS = 1,
  37. B_AXIS = 1,
  38. Z_AXIS = 2,
  39. C_AXIS = 2,
  40. E_AXIS = 3,
  41. X_HEAD = 4,
  42. Y_HEAD = 5,
  43. Z_HEAD = 5
  44. };
  45. #define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++)
  46. #define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++)
  47. typedef enum {
  48. LINEARUNIT_MM,
  49. LINEARUNIT_INCH
  50. } LinearUnit;
  51. typedef enum {
  52. TEMPUNIT_C,
  53. TEMPUNIT_K,
  54. TEMPUNIT_F
  55. } TempUnit;
  56. /**
  57. * Debug flags
  58. * Not yet widely applied
  59. */
  60. enum DebugFlags {
  61. DEBUG_NONE = 0,
  62. DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
  63. DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
  64. DEBUG_ERRORS = _BV(2), ///< Not implemented
  65. DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
  66. DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
  67. DEBUG_LEVELING = _BV(5) ///< Print detailed output for homing and leveling
  68. };
  69. enum EndstopEnum {
  70. X_MIN,
  71. Y_MIN,
  72. Z_MIN,
  73. Z_MIN_PROBE,
  74. X_MAX,
  75. Y_MAX,
  76. Z_MAX,
  77. Z2_MIN,
  78. Z2_MAX
  79. };
  80. /**
  81. * Temperature
  82. * Stages in the ISR loop
  83. */
  84. enum TempState {
  85. PrepareTemp_0,
  86. MeasureTemp_0,
  87. PrepareTemp_BED,
  88. MeasureTemp_BED,
  89. PrepareTemp_1,
  90. MeasureTemp_1,
  91. PrepareTemp_2,
  92. MeasureTemp_2,
  93. PrepareTemp_3,
  94. MeasureTemp_3,
  95. Prepare_FILWIDTH,
  96. Measure_FILWIDTH,
  97. StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
  98. };
  99. #if ENABLED(EMERGENCY_PARSER)
  100. enum e_parser_state {
  101. state_RESET,
  102. state_N,
  103. state_M,
  104. state_M1,
  105. state_M10,
  106. state_M108,
  107. state_M11,
  108. state_M112,
  109. state_M4,
  110. state_M41,
  111. state_M410,
  112. state_IGNORE // to '\n'
  113. };
  114. #endif
  115. #if ENABLED(FILAMENT_CHANGE_FEATURE)
  116. enum FilamentChangeMenuResponse {
  117. FILAMENT_CHANGE_RESPONSE_WAIT_FOR,
  118. FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE,
  119. FILAMENT_CHANGE_RESPONSE_RESUME_PRINT
  120. };
  121. #if ENABLED(ULTIPANEL)
  122. enum FilamentChangeMessage {
  123. FILAMENT_CHANGE_MESSAGE_INIT,
  124. FILAMENT_CHANGE_MESSAGE_UNLOAD,
  125. FILAMENT_CHANGE_MESSAGE_INSERT,
  126. FILAMENT_CHANGE_MESSAGE_LOAD,
  127. FILAMENT_CHANGE_MESSAGE_EXTRUDE,
  128. FILAMENT_CHANGE_MESSAGE_OPTION,
  129. FILAMENT_CHANGE_MESSAGE_RESUME,
  130. FILAMENT_CHANGE_MESSAGE_STATUS
  131. };
  132. #endif
  133. #endif
  134. /**
  135. * States for managing Marlin and host communication
  136. * Marlin sends messages if blocked or busy
  137. */
  138. #if ENABLED(HOST_KEEPALIVE_FEATURE)
  139. enum MarlinBusyState {
  140. NOT_BUSY, // Not in a handler
  141. IN_HANDLER, // Processing a GCode
  142. IN_PROCESS, // Known to be blocking command input (as in G29)
  143. PAUSED_FOR_USER, // Blocking pending any input
  144. PAUSED_FOR_INPUT // Blocking pending text input (concept)
  145. };
  146. #endif
  147. #if ENABLED(MESH_BED_LEVELING)
  148. enum MeshLevelingState {
  149. MeshReport,
  150. MeshStart,
  151. MeshNext,
  152. MeshSet,
  153. MeshSetZOffset,
  154. MeshReset
  155. };
  156. enum MBLStatus {
  157. MBL_STATUS_NONE = 0,
  158. MBL_STATUS_HAS_MESH_BIT = 0,
  159. MBL_STATUS_ACTIVE_BIT = 1
  160. };
  161. #endif
  162. /**
  163. * SD Card
  164. */
  165. enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
  166. /**
  167. * Ultra LCD
  168. */
  169. enum LCDViewAction {
  170. LCDVIEW_NONE,
  171. LCDVIEW_REDRAW_NOW,
  172. LCDVIEW_CALL_REDRAW_NEXT,
  173. LCDVIEW_CLEAR_CALL_REDRAW,
  174. LCDVIEW_CALL_NO_REDRAW
  175. };
  176. #endif // __ENUM_H__