2016-07-19 15:31:09 +02:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
|
|
|
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
|
|
|
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ENUM_H__
|
|
|
|
#define __ENUM_H__
|
|
|
|
|
2016-09-28 21:01:29 +02:00
|
|
|
#include "MarlinConfig.h"
|
|
|
|
|
2016-07-19 15:31:09 +02:00
|
|
|
/**
|
|
|
|
* Axis indices as enumerated constants
|
|
|
|
*
|
|
|
|
* Special axis:
|
|
|
|
* - A_AXIS and B_AXIS are used by COREXY printers
|
|
|
|
* - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
|
|
|
|
* between X_AXIS and X Head movement, like CoreXY bots
|
|
|
|
*/
|
2018-03-07 04:50:29 +01:00
|
|
|
enum AxisEnum : unsigned char {
|
2017-06-09 14:06:23 +02:00
|
|
|
X_AXIS = 0,
|
|
|
|
A_AXIS = 0,
|
|
|
|
Y_AXIS = 1,
|
|
|
|
B_AXIS = 1,
|
|
|
|
Z_AXIS = 2,
|
|
|
|
C_AXIS = 2,
|
|
|
|
E_AXIS = 3,
|
|
|
|
X_HEAD = 4,
|
|
|
|
Y_HEAD = 5,
|
|
|
|
Z_HEAD = 6,
|
2018-03-07 04:50:29 +01:00
|
|
|
ALL_AXES = 0xFE,
|
|
|
|
NO_AXIS = 0xFF
|
2016-07-19 15:31:09 +02:00
|
|
|
};
|
|
|
|
|
2017-06-09 14:06:23 +02:00
|
|
|
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
|
|
|
|
#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++)
|
|
|
|
#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
|
|
|
|
#define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
|
|
|
|
|
|
|
|
#define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
|
|
|
|
#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
|
|
|
|
#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
|
|
|
|
#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
|
2018-02-03 01:49:32 +01:00
|
|
|
#define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
|
|
|
|
#define LOOP_ABCE(VAR) LOOP_S_LE_N(VAR, A_AXIS, E_AXIS)
|
|
|
|
#define LOOP_ABCE_N(VAR) LOOP_S_L_N(VAR, A_AXIS, XYZE_N)
|
2016-07-23 22:07:23 +02:00
|
|
|
|
2016-07-19 15:31:09 +02:00
|
|
|
typedef enum {
|
|
|
|
LINEARUNIT_MM,
|
|
|
|
LINEARUNIT_INCH
|
|
|
|
} LinearUnit;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
TEMPUNIT_C,
|
|
|
|
TEMPUNIT_K,
|
|
|
|
TEMPUNIT_F
|
|
|
|
} TempUnit;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Debug flags
|
|
|
|
* Not yet widely applied
|
|
|
|
*/
|
2018-03-07 04:50:29 +01:00
|
|
|
enum DebugFlags : unsigned char {
|
2016-07-19 15:31:09 +02:00
|
|
|
DEBUG_NONE = 0,
|
|
|
|
DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
|
|
|
|
DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
|
|
|
|
DEBUG_ERRORS = _BV(2), ///< Not implemented
|
|
|
|
DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
|
|
|
|
DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
|
2016-08-28 02:37:31 +02:00
|
|
|
DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
|
2017-03-20 21:38:25 +01:00
|
|
|
DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling
|
2016-08-28 02:37:31 +02:00
|
|
|
DEBUG_ALL = 0xFF
|
2016-07-19 15:31:09 +02:00
|
|
|
};
|
|
|
|
|
2018-03-07 04:50:29 +01:00
|
|
|
enum EndstopEnum : char {
|
2016-07-19 15:31:09 +02:00
|
|
|
X_MIN,
|
|
|
|
Y_MIN,
|
|
|
|
Z_MIN,
|
|
|
|
Z_MIN_PROBE,
|
|
|
|
X_MAX,
|
|
|
|
Y_MAX,
|
|
|
|
Z_MAX,
|
2017-10-27 23:24:34 +02:00
|
|
|
X2_MIN,
|
|
|
|
X2_MAX,
|
|
|
|
Y2_MIN,
|
|
|
|
Y2_MAX,
|
2016-07-19 15:31:09 +02:00
|
|
|
Z2_MIN,
|
|
|
|
Z2_MAX
|
|
|
|
};
|
|
|
|
|
2017-05-26 20:01:02 +02:00
|
|
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
2018-03-07 04:50:29 +01:00
|
|
|
enum AdvancedPauseMenuResponse : char {
|
2017-05-26 20:01:02 +02:00
|
|
|
ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
|
|
|
|
ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
|
|
|
|
ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
|
2016-07-19 15:31:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#if ENABLED(ULTIPANEL)
|
2018-03-07 04:50:29 +01:00
|
|
|
enum AdvancedPauseMessage : char {
|
2017-05-26 20:01:02 +02:00
|
|
|
ADVANCED_PAUSE_MESSAGE_INIT,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_UNLOAD,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_INSERT,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_LOAD,
|
2017-12-27 05:51:55 +01:00
|
|
|
ADVANCED_PAUSE_MESSAGE_PURGE,
|
2018-03-29 01:01:07 +02:00
|
|
|
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
|
|
|
|
ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE,
|
|
|
|
#endif
|
2017-05-26 20:01:02 +02:00
|
|
|
ADVANCED_PAUSE_MESSAGE_OPTION,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_RESUME,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_STATUS,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
|
|
|
|
ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
|
2016-07-19 15:31:09 +02:00
|
|
|
};
|
|
|
|
#endif
|
2017-12-27 05:51:55 +01:00
|
|
|
|
2018-03-07 04:50:29 +01:00
|
|
|
enum AdvancedPauseMode : char {
|
2017-12-27 05:51:55 +01:00
|
|
|
ADVANCED_PAUSE_MODE_PAUSE_PRINT,
|
|
|
|
ADVANCED_PAUSE_MODE_LOAD_FILAMENT,
|
|
|
|
ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT
|
|
|
|
};
|
2016-07-19 15:31:09 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* States for managing Marlin and host communication
|
|
|
|
* Marlin sends messages if blocked or busy
|
|
|
|
*/
|
|
|
|
#if ENABLED(HOST_KEEPALIVE_FEATURE)
|
2018-03-07 04:50:29 +01:00
|
|
|
enum MarlinBusyState : char {
|
2016-07-19 15:31:09 +02:00
|
|
|
NOT_BUSY, // Not in a handler
|
|
|
|
IN_HANDLER, // Processing a GCode
|
|
|
|
IN_PROCESS, // Known to be blocking command input (as in G29)
|
|
|
|
PAUSED_FOR_USER, // Blocking pending any input
|
|
|
|
PAUSED_FOR_INPUT // Blocking pending text input (concept)
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SD Card
|
|
|
|
*/
|
2018-03-07 04:50:29 +01:00
|
|
|
enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename };
|
2016-07-19 15:31:09 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Ultra LCD
|
|
|
|
*/
|
2018-03-07 04:50:29 +01:00
|
|
|
enum LCDViewAction : char {
|
2016-07-19 15:31:09 +02:00
|
|
|
LCDVIEW_NONE,
|
|
|
|
LCDVIEW_REDRAW_NOW,
|
|
|
|
LCDVIEW_CALL_REDRAW_NEXT,
|
|
|
|
LCDVIEW_CLEAR_CALL_REDRAW,
|
|
|
|
LCDVIEW_CALL_NO_REDRAW
|
|
|
|
};
|
|
|
|
|
2017-06-22 15:57:53 +02:00
|
|
|
/**
|
|
|
|
* Dual X Carriage modes. A Dual Nozzle can also do duplication.
|
|
|
|
*/
|
2017-05-01 19:20:25 +02:00
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
2018-03-07 04:50:29 +01:00
|
|
|
enum DualXMode : char {
|
2017-06-22 15:57:53 +02:00
|
|
|
DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
|
|
|
|
DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
|
2016-11-03 03:37:46 +01:00
|
|
|
DXC_DUPLICATION_MODE
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2017-06-23 21:28:28 +02:00
|
|
|
/**
|
|
|
|
* Workspace planes only apply to G2/G3 moves
|
|
|
|
* (and "canned cycles" - not a current feature)
|
|
|
|
*/
|
|
|
|
#if ENABLED(CNC_WORKSPACE_PLANES)
|
2018-03-07 04:50:29 +01:00
|
|
|
enum WorkspacePlane : char { PLANE_XY, PLANE_ZX, PLANE_YZ };
|
2017-06-23 21:28:28 +02:00
|
|
|
#endif
|
|
|
|
|
2016-07-19 15:31:09 +02:00
|
|
|
#endif // __ENUM_H__
|