@ -94,17 +94,14 @@ void serial_echopair_P(const char *s_P, unsigned long v);
// Things to write to serial from Program memory. Saves 400 to 2k of RAM.
// Things to write to serial from Program memory. Saves 400 to 2k of RAM.
FORCE_INLINE void serialprintPGM ( const char * str )
FORCE_INLINE void serialprintPGM ( const char * str ) {
{
char ch = pgm_read_byte ( str ) ;
char ch = pgm_read_byte ( str ) ;
while ( ch )
while ( ch ) {
{
MYSERIAL . write ( ch ) ;
MYSERIAL . write ( ch ) ;
ch = pgm_read_byte ( + + str ) ;
ch = pgm_read_byte ( + + str ) ;
}
}
}
}
void get_command ( ) ;
void get_command ( ) ;
void process_commands ( ) ;
void process_commands ( ) ;
@ -179,8 +176,18 @@ void manage_inactivity(bool ignore_stepper_queue=false);
# define disable_e3() /* nothing */
# define disable_e3() /* nothing */
# endif
# endif
/**
* 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 { X_AXIS = 0 , Y_AXIS = 1 , A_AXIS = 0 , B_AXIS = 1 , Z_AXIS = 2 , E_AXIS = 3 , X_HEAD = 4 , Y_HEAD = 5 } ;
enum AxisEnum { X_AXIS = 0 , Y_AXIS = 1 , A_AXIS = 0 , B_AXIS = 1 , Z_AXIS = 2 , E_AXIS = 3 , X_HEAD = 4 , Y_HEAD = 5 } ;
//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.
void FlushSerialRequestResend ( ) ;
void FlushSerialRequestResend ( ) ;
void ClearToSend ( ) ;
void ClearToSend ( ) ;
@ -224,7 +231,7 @@ void refresh_cmd_timeout(void);
# ifndef CRITICAL_SECTION_START
# ifndef CRITICAL_SECTION_START
# define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
# define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
# define CRITICAL_SECTION_END SREG = _sreg;
# define CRITICAL_SECTION_END SREG = _sreg;
# endif //CRITICAL_SECTION_START
# endif
extern float homing_feedrate [ ] ;
extern float homing_feedrate [ ] ;
extern bool axis_relative_modes [ ] ;
extern bool axis_relative_modes [ ] ;
@ -235,6 +242,7 @@ extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in m
extern float volumetric_multiplier [ EXTRUDERS ] ; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
extern float volumetric_multiplier [ EXTRUDERS ] ; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
extern float current_position [ NUM_AXIS ] ;
extern float current_position [ NUM_AXIS ] ;
extern float home_offset [ 3 ] ;
extern float home_offset [ 3 ] ;
# ifdef DELTA
# ifdef DELTA
extern float endstop_adj [ 3 ] ;
extern float endstop_adj [ 3 ] ;
extern float delta_radius ;
extern float delta_radius ;
@ -244,16 +252,21 @@ extern float home_offset[3];
# elif defined(Z_DUAL_ENDSTOPS)
# elif defined(Z_DUAL_ENDSTOPS)
extern float z_endstop_adj ;
extern float z_endstop_adj ;
# endif
# endif
# ifdef SCARA
# ifdef SCARA
extern float axis_scaling [ 3 ] ; // Build size scaling
extern float axis_scaling [ 3 ] ; // Build size scaling
# endif
# endif
extern float min_pos [ 3 ] ;
extern float min_pos [ 3 ] ;
extern float max_pos [ 3 ] ;
extern float max_pos [ 3 ] ;
extern bool axis_known_position [ 3 ] ;
extern bool axis_known_position [ 3 ] ;
# ifdef ENABLE_AUTO_BED_LEVELING
# ifdef ENABLE_AUTO_BED_LEVELING
extern float zprobe_zoffset ;
extern float zprobe_zoffset ;
# endif
# endif
extern int fanSpeed ;
extern int fanSpeed ;
# ifdef BARICUDA
# ifdef BARICUDA
extern int ValvePressure ;
extern int ValvePressure ;
extern int EtoPPressure ;
extern int EtoPPressure ;