Remove enum.h include of MarlinConfig.h

This commit is contained in:
Scott Lahteine 2017-11-19 15:11:11 -06:00
parent 1d4571b88d
commit 25af9decfe
5 changed files with 47 additions and 54 deletions

View File

@ -199,6 +199,11 @@ extern millis_t max_inactive_time, stepper_inactive_time;
#endif #endif
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
enum AdvancedPauseMenuResponse {
ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
};
extern AdvancedPauseMenuResponse advanced_pause_menu_response; extern AdvancedPauseMenuResponse advanced_pause_menu_response;
#endif #endif

View File

@ -23,8 +23,6 @@
#ifndef __ENUM_H__ #ifndef __ENUM_H__
#define __ENUM_H__ #define __ENUM_H__
#include "../inc/MarlinConfig.h"
/** /**
* Axis indices as enumerated constants * Axis indices as enumerated constants
* *
@ -69,46 +67,6 @@ typedef enum {
TEMPUNIT_F TEMPUNIT_F
} TempUnit; } TempUnit;
#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(ADVANCED_PAUSE_FEATURE)
enum AdvancedPauseMenuResponse {
ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
};
#if ENABLED(ULTIPANEL)
enum AdvancedPauseMessage {
ADVANCED_PAUSE_MESSAGE_INIT,
ADVANCED_PAUSE_MESSAGE_UNLOAD,
ADVANCED_PAUSE_MESSAGE_INSERT,
ADVANCED_PAUSE_MESSAGE_LOAD,
ADVANCED_PAUSE_MESSAGE_EXTRUDE,
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
};
#endif
#endif
/** /**
* SD Card * SD Card
*/ */
@ -125,15 +83,4 @@ enum LCDViewAction {
LCDVIEW_CALL_NO_REDRAW LCDVIEW_CALL_NO_REDRAW
}; };
/**
* Dual X Carriage modes. A Dual Nozzle can also do duplication.
*/
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
enum DualXMode {
DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
DXC_DUPLICATION_MODE
};
#endif
#endif // __ENUM_H__ #endif // __ENUM_H__

View File

@ -44,6 +44,23 @@ enum DebugFlags {
DEBUG_ALL = 0xFF DEBUG_ALL = 0xFF
}; };
#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
//todo: HAL: breaks encapsulation //todo: HAL: breaks encapsulation
// For AVR only, define a serial interface based on configuration // For AVR only, define a serial interface based on configuration
#ifdef __AVR__ #ifdef __AVR__

View File

@ -108,6 +108,18 @@
void lcd_completion_feedback(const bool good=true); void lcd_completion_feedback(const bool good=true);
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
enum AdvancedPauseMessage {
ADVANCED_PAUSE_MESSAGE_INIT,
ADVANCED_PAUSE_MESSAGE_UNLOAD,
ADVANCED_PAUSE_MESSAGE_INSERT,
ADVANCED_PAUSE_MESSAGE_LOAD,
ADVANCED_PAUSE_MESSAGE_EXTRUDE,
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
};
void lcd_advanced_pause_show_message(const AdvancedPauseMessage message); void lcd_advanced_pause_show_message(const AdvancedPauseMessage message);
#endif #endif

View File

@ -292,6 +292,12 @@ void homeaxis(const AxisEnum axis);
*/ */
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
enum DualXMode {
DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
DXC_DUPLICATION_MODE
};
extern DualXMode dual_x_carriage_mode; extern DualXMode dual_x_carriage_mode;
extern float inactive_extruder_x_pos, // used in mode 0 & 1 extern float inactive_extruder_x_pos, // used in mode 0 & 1
raised_parked_position[XYZE], // used in mode 1 raised_parked_position[XYZE], // used in mode 1
@ -304,7 +310,13 @@ void homeaxis(const AxisEnum axis);
FORCE_INLINE int x_home_dir(const uint8_t extruder) { return extruder ? X2_HOME_DIR : X_HOME_DIR; } FORCE_INLINE int x_home_dir(const uint8_t extruder) { return extruder ? X2_HOME_DIR : X_HOME_DIR; }
#endif // DUAL_X_CARRIAGE #elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
enum DualXMode {
DXC_DUPLICATION_MODE = 2
};
#endif
#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE) #if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
void update_software_endstops(const AxisEnum axis); void update_software_endstops(const AxisEnum axis);