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.

enum.h 4.7KB

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