Browse Source

Minor code cleanup, move NUM_AXIS out of config

pull/1/head
Scott Lahteine 10 years ago
parent
commit
e0d4368cb5
  1. 6
      Marlin/Configuration.h
  2. 27
      Marlin/Marlin.h
  3. 6
      Marlin/configurator/config/Configuration.h
  4. 6
      Marlin/example_configurations/Felix/Configuration.h
  5. 6
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  6. 6
      Marlin/example_configurations/Hephestos/Configuration.h
  7. 6
      Marlin/example_configurations/K8200/Configuration.h
  8. 6
      Marlin/example_configurations/SCARA/Configuration.h
  9. 6
      Marlin/example_configurations/WITBOX/Configuration.h
  10. 6
      Marlin/example_configurations/delta/generic/Configuration.h
  11. 6
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  12. 6
      Marlin/example_configurations/makibox/Configuration.h
  13. 6
      Marlin/example_configurations/tvrrug/Round2/Configuration.h

6
Marlin/Configuration.h

@ -529,8 +529,10 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings

27
Marlin/Marlin.h

@ -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.
FORCE_INLINE void serialprintPGM(const char *str)
{
FORCE_INLINE void serialprintPGM(const char *str) {
char ch = pgm_read_byte(str);
while(ch)
{
while(ch) {
MYSERIAL.write(ch);
ch = pgm_read_byte(++str);
}
}
void get_command();
void process_commands();
@ -179,8 +176,18 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_e3() /* nothing */
#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};
//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 ClearToSend();
@ -224,7 +231,7 @@ void refresh_cmd_timeout(void);
#ifndef CRITICAL_SECTION_START
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg;
#endif //CRITICAL_SECTION_START
#endif
extern float homing_feedrate[];
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 current_position[NUM_AXIS];
extern float home_offset[3];
#ifdef DELTA
extern float endstop_adj[3];
extern float delta_radius;
@ -244,16 +252,21 @@ extern float home_offset[3];
#elif defined(Z_DUAL_ENDSTOPS)
extern float z_endstop_adj;
#endif
#ifdef SCARA
extern float axis_scaling[3]; // Build size scaling
#endif
extern float min_pos[3];
extern float max_pos[3];
extern bool axis_known_position[3];
#ifdef ENABLE_AUTO_BED_LEVELING
extern float zprobe_zoffset;
#endif
extern int fanSpeed;
#ifdef BARICUDA
extern int ValvePressure;
extern int EtoPPressure;

6
Marlin/configurator/config/Configuration.h

@ -553,8 +553,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// @section movement
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/Felix/Configuration.h

@ -499,8 +499,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/Felix/Configuration_DUAL.h

@ -499,8 +499,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/Hephestos/Configuration.h

@ -522,8 +522,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {2000, 2000, 150, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/K8200/Configuration.h

@ -527,8 +527,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/SCARA/Configuration.h

@ -551,8 +551,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {40*60, 40*60, 10*60, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/WITBOX/Configuration.h

@ -521,8 +521,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {120*60, 120*60, 7.2*60, 0} // set the homing speeds (mm/min)
// default settings

6
Marlin/example_configurations/delta/generic/Configuration.h

@ -566,8 +566,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
// delta homing speeds must be the same on xyz
#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min)

6
Marlin/example_configurations/delta/kossel_mini/Configuration.h

@ -570,8 +570,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
// delta homing speeds must be the same on xyz
#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min)

6
Marlin/example_configurations/makibox/Configuration.h

@ -519,8 +519,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {1500, 1500, 120, 0} // set the homing speeds (mm/min) ***** MakiBox A6 *****
// default settings

6
Marlin/example_configurations/tvrrug/Round2/Configuration.h

@ -521,8 +521,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif
//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
/**
* MOVEMENT SETTINGS
*/
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
// default settings

Loading…
Cancel
Save