2016-07-19 08:31:09 -05: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 14:01:29 -05:00
|
|
|
#include "MarlinConfig.h"
|
|
|
|
|
2016-07-19 08:31:09 -05: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
|
|
|
|
*/
|
|
|
|
enum AxisEnum {
|
|
|
|
NO_AXIS = -1,
|
|
|
|
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,
|
2016-09-11 20:14:41 -05:00
|
|
|
Z_HEAD = 6,
|
|
|
|
ALL_AXES = 100
|
2016-07-19 08:31:09 -05:00
|
|
|
};
|
|
|
|
|
2016-07-23 15:07:23 -05:00
|
|
|
#define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++)
|
|
|
|
#define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++)
|
2016-12-03 22:02:27 -06:00
|
|
|
#define LOOP_XYZE_N(VAR) for (uint8_t VAR=X_AXIS; VAR<XYZE_N; VAR++)
|
2016-07-23 15:07:23 -05:00
|
|
|
|
2016-07-19 08:31:09 -05:00
|
|
|
typedef enum {
|
|
|
|
LINEARUNIT_MM,
|
|
|
|
LINEARUNIT_INCH
|
|
|
|
} LinearUnit;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
TEMPUNIT_C,
|
|
|
|
TEMPUNIT_K,
|
|
|
|
TEMPUNIT_F
|
|
|
|
} TempUnit;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Debug flags
|
|
|
|
* Not yet widely applied
|
|
|
|
*/
|
|
|
|
enum DebugFlags {
|
|
|
|
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-27 19:37:31 -05:00
|
|
|
DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
|
|
|
|
DEBUG_ALL = 0xFF
|
2016-07-19 08:31:09 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
enum EndstopEnum {
|
|
|
|
X_MIN,
|
|
|
|
Y_MIN,
|
|
|
|
Z_MIN,
|
|
|
|
Z_MIN_PROBE,
|
|
|
|
X_MAX,
|
|
|
|
Y_MAX,
|
|
|
|
Z_MAX,
|
|
|
|
Z2_MIN,
|
|
|
|
Z2_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Temperature
|
|
|
|
* Stages in the ISR loop
|
|
|
|
*/
|
|
|
|
enum TempState {
|
|
|
|
PrepareTemp_0,
|
|
|
|
MeasureTemp_0,
|
|
|
|
PrepareTemp_BED,
|
|
|
|
MeasureTemp_BED,
|
|
|
|
PrepareTemp_1,
|
|
|
|
MeasureTemp_1,
|
|
|
|
PrepareTemp_2,
|
|
|
|
MeasureTemp_2,
|
|
|
|
PrepareTemp_3,
|
|
|
|
MeasureTemp_3,
|
|
|
|
Prepare_FILWIDTH,
|
|
|
|
Measure_FILWIDTH,
|
|
|
|
StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
|
|
|
|
};
|
|
|
|
|
|
|
|
#if ENABLED(EMERGENCY_PARSER)
|
|
|
|
enum e_parser_state {
|
|
|
|
state_RESET,
|
|
|
|
state_N,
|
|
|
|
state_M,
|
|
|
|
state_M1,
|
|
|
|
state_M10,
|
|
|
|
state_M108,
|
|
|
|
state_M11,
|
|
|
|
state_M112,
|
|
|
|
state_M4,
|
|
|
|
state_M41,
|
|
|
|
state_M410,
|
|
|
|
state_IGNORE // to '\n'
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_CHANGE_FEATURE)
|
|
|
|
enum FilamentChangeMenuResponse {
|
|
|
|
FILAMENT_CHANGE_RESPONSE_WAIT_FOR,
|
|
|
|
FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE,
|
|
|
|
FILAMENT_CHANGE_RESPONSE_RESUME_PRINT
|
|
|
|
};
|
|
|
|
|
|
|
|
#if ENABLED(ULTIPANEL)
|
|
|
|
enum FilamentChangeMessage {
|
|
|
|
FILAMENT_CHANGE_MESSAGE_INIT,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_UNLOAD,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_INSERT,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_LOAD,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_EXTRUDE,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_OPTION,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_RESUME,
|
2017-01-21 17:10:57 -06:00
|
|
|
FILAMENT_CHANGE_MESSAGE_STATUS,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
|
|
|
|
FILAMENT_CHANGE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
|
2016-07-19 08:31:09 -05:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* States for managing Marlin and host communication
|
|
|
|
* Marlin sends messages if blocked or busy
|
|
|
|
*/
|
|
|
|
#if ENABLED(HOST_KEEPALIVE_FEATURE)
|
|
|
|
enum MarlinBusyState {
|
|
|
|
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
|
|
|
|
|
2017-03-15 03:20:41 -05:00
|
|
|
#if ENABLED(PROBE_MANUALLY)
|
|
|
|
enum ABLState {
|
|
|
|
ABLReport,
|
|
|
|
ABLStart,
|
|
|
|
ABLNext,
|
|
|
|
ABLSet,
|
|
|
|
ABLReset
|
2016-07-19 08:31:09 -05:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SD Card
|
|
|
|
*/
|
|
|
|
enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Ultra LCD
|
|
|
|
*/
|
|
|
|
enum LCDViewAction {
|
|
|
|
LCDVIEW_NONE,
|
|
|
|
LCDVIEW_REDRAW_NOW,
|
|
|
|
LCDVIEW_CALL_REDRAW_NEXT,
|
|
|
|
LCDVIEW_CLEAR_CALL_REDRAW,
|
|
|
|
LCDVIEW_CALL_NO_REDRAW
|
|
|
|
};
|
|
|
|
|
2016-11-02 21:37:46 -05:00
|
|
|
#if ENABLED(DUAL_X_CARRIAGE)
|
|
|
|
enum DualXMode {
|
|
|
|
DXC_FULL_CONTROL_MODE,
|
|
|
|
DXC_AUTO_PARK_MODE,
|
|
|
|
DXC_DUPLICATION_MODE
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2016-07-19 08:31:09 -05:00
|
|
|
#endif // __ENUM_H__
|