Moves all global enums to a central file

This commit is contained in:
João Brázio
2016-07-19 14:31:09 +01:00
parent 238fefcb00
commit 3ebad4e020
10 changed files with 206 additions and 112 deletions

View File

@@ -50,6 +50,8 @@
#include "Arduino.h"
#include "enum.h"
typedef unsigned long millis_t;
#ifdef USBCON
@@ -230,20 +232,8 @@ void manage_inactivity(bool ignore_stepper_queue = false);
* The axis order in all axis related arrays is X, Y, Z, E
*/
#define NUM_AXIS 4
/**
* Axis indices as enumerated constants
*
* 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, Z_HEAD = 5};
#define _AXIS(AXIS) AXIS ##_AXIS
typedef enum { LINEARUNIT_MM = 0, LINEARUNIT_INCH = 1 } LinearUnit;
typedef enum { TEMPUNIT_C = 0, TEMPUNIT_K = 1, TEMPUNIT_F = 2 } TempUnit;
void enable_all_steppers();
void disable_all_steppers();
@@ -259,18 +249,6 @@ void quickstop_stepper();
void handle_filament_runout();
#endif
/**
* 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
DEBUG_LEVELING = _BV(5) ///< Print detailed output for homing and leveling
};
extern uint8_t marlin_debug_flags;
#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
@@ -380,11 +358,6 @@ float code_value_temp_diff();
#endif
#if ENABLED(FILAMENT_CHANGE_FEATURE)
enum FilamentChangeMenuResponse {
FILAMENT_CHANGE_RESPONSE_WAIT_FOR,
FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE,
FILAMENT_CHANGE_RESPONSE_RESUME_PRINT
};
extern FilamentChangeMenuResponse filament_change_menu_response;
#endif