Commit cb6236ed authored by MagoKimbra's avatar MagoKimbra

Update

parent 4f4b9507
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0 #define TEMP_SENSOR_3 0
#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_BED 0
// This makes temp sensor 1 a redundant sensor for sensor 0. // This makes temp sensor 1 a redundant sensor for sensor 0.
// If the temperatures difference between these sensors is to high the print will be aborted. // If the temperatures difference between these sensors is to high the print will be aborted.
...@@ -693,4 +693,5 @@ your extruder heater takes 2 minutes to hit the target on heating. ...@@ -693,4 +693,5 @@ your extruder heater takes 2 minutes to hit the target on heating.
#include "Configuration_adv.h" #include "Configuration_adv.h"
#include "thermistortables.h"
#endif //__CONFIGURATION_H #endif //__CONFIGURATION_H
This diff is collapsed.
...@@ -92,7 +92,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -92,7 +92,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define FRONT_PROBE_BED_POSITION 20 #define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180 #define BACK_PROBE_BED_POSITION 180
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min #define XY_TRAVEL_SPEED 10000 // X and Y axis travel speed between probes, in mm/min
//If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing, //If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!! //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
...@@ -123,6 +123,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -123,6 +123,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
#ifdef AUTO_BED_LEVELING_GRID #ifdef AUTO_BED_LEVELING_GRID
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_LEVELING_GRID #else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product // with no grid, just probe 3 arbitrary points. A simple cross-product
...@@ -136,7 +137,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -136,7 +137,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#endif // AUTO_BED_LEVELING_GRID #endif // AUTO_BED_LEVELING_GRID
// Offsets to the probe relative to the extruder tip (Hotend - Probe) // Offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers // X and Y offsets MUST be INTEGERS
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // -front +behind #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!) #define Z_PROBE_OFFSET_FROM_EXTRUDER -1 // -below (always!)
...@@ -180,6 +181,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -180,6 +181,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 10000 // E max acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 10000 // E max acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
......
...@@ -92,7 +92,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -92,7 +92,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define FRONT_PROBE_BED_POSITION 20 #define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180 #define BACK_PROBE_BED_POSITION 180
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min #define XY_TRAVEL_SPEED 10000 // X and Y axis travel speed between probes, in mm/min
//If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing, //If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!! //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
...@@ -123,6 +123,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -123,6 +123,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
#ifdef AUTO_BED_LEVELING_GRID #ifdef AUTO_BED_LEVELING_GRID
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_LEVELING_GRID #else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product // with no grid, just probe 3 arbitrary points. A simple cross-product
...@@ -180,6 +181,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo ...@@ -180,6 +181,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 10000 // E max acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 10000 // E max acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
......
...@@ -130,8 +130,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o ...@@ -130,8 +130,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_RETRACTION_MAX_FEEDRATE {150,150,150,150} // E0, E1, E2, E3 (mm/sec) #define DEFAULT_RETRACTION_MAX_FEEDRATE {150,150,150,150} // E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves. #define DEFAULT_MAX_ACCELERATION {2000,2000,2000,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 20 // (mm/sec) #define DEFAULT_XYJERK 20 // (mm/sec)
......
...@@ -147,6 +147,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the lo ...@@ -147,6 +147,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define AUTO_BED_LEVELING_GRID #define AUTO_BED_LEVELING_GRID
#ifdef AUTO_BED_LEVELING_GRID #ifdef AUTO_BED_LEVELING_GRID
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
#define AUTO_BED_LEVELING_GRID_POINTS 2 #define AUTO_BED_LEVELING_GRID_POINTS 2
#else // not AUTO_BED_LEVELING_GRID #else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product // with no grid, just probe 3 arbitrary points. A simple cross-product
...@@ -189,8 +190,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the lo ...@@ -189,8 +190,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the lo
//Manual homing switch locations: //Manual homing switch locations:
// For SCARA: Offset between HomingPosition and Bed X=0 / Y=0 // For SCARA: Offset between HomingPosition and Bed X=0 / Y=0
#define MANUAL_X_HOME_POS -22. #define MANUAL_X_HOME_POS -22
#define MANUAL_Y_HOME_POS -52. #define MANUAL_Y_HOME_POS -52
#define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing. #define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing.
// MOVEMENT SETTINGS // MOVEMENT SETTINGS
...@@ -203,8 +204,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the lo ...@@ -203,8 +204,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define DEFAULT_RETRACTION_MAX_FEEDRATE {80,80,80,80} // E0, E1, E2, E3 (mm/sec) #define DEFAULT_RETRACTION_MAX_FEEDRATE {80,80,80,80} // E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {5000,5000,50,5000,5000,5000,5000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves. #define DEFAULT_MAX_ACCELERATION {5000,5000,50,5000,5000,5000,5000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 400 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 400 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 2000 // X, Y, Z and E max acceleration in mm/s^2 for retracts #define DEFAULT_RETRACT_ACCELERATION 2000 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 400 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
......
...@@ -218,6 +218,7 @@ ...@@ -218,6 +218,7 @@
#else #else
#define Z_HOME_RETRACT_MM 2 #define Z_HOME_RETRACT_MM 2
#endif #endif
#define HOMING_BUMP_DIVISOR {10, 10, 2} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
...@@ -468,6 +469,141 @@ const unsigned int dropsegments=5; //everything with less than this number of st ...@@ -468,6 +469,141 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#endif #endif
#endif #endif
/******************************************************************************\
* enable this section if you have TMC26X motor drivers.
* you need to import the TMC26XStepper library into the arduino IDE for this
******************************************************************************/
//#define HAVE_TMCDRIVER
#ifdef HAVE_TMCDRIVER
// #define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
#define X_MICROSTEPS 16 //number of microsteps
// #define X2_IS_TMC
#define X2_MAX_CURRENT 1000 //in mA
#define X2_SENSE_RESISTOR 91 //in mOhms
#define X2_MICROSTEPS 16 //number of microsteps
// #define Y_IS_TMC
#define Y_MAX_CURRENT 1000 //in mA
#define Y_SENSE_RESISTOR 91 //in mOhms
#define Y_MICROSTEPS 16 //number of microsteps
// #define Y2_IS_TMC
#define Y2_MAX_CURRENT 1000 //in mA
#define Y2_SENSE_RESISTOR 91 //in mOhms
#define Y2_MICROSTEPS 16 //number of microsteps
// #define Z_IS_TMC
#define Z_MAX_CURRENT 1000 //in mA
#define Z_SENSE_RESISTOR 91 //in mOhms
#define Z_MICROSTEPS 16 //number of microsteps
// #define Z2_IS_TMC
#define Z2_MAX_CURRENT 1000 //in mA
#define Z2_SENSE_RESISTOR 91 //in mOhms
#define Z2_MICROSTEPS 16 //number of microsteps
// #define E0_IS_TMC
#define E0_MAX_CURRENT 1000 //in mA
#define E0_SENSE_RESISTOR 91 //in mOhms
#define E0_MICROSTEPS 16 //number of microsteps
// #define E1_IS_TMC
#define E1_MAX_CURRENT 1000 //in mA
#define E1_SENSE_RESISTOR 91 //in mOhms
#define E1_MICROSTEPS 16 //number of microsteps
// #define E2_IS_TMC
#define E2_MAX_CURRENT 1000 //in mA
#define E2_SENSE_RESISTOR 91 //in mOhms
#define E2_MICROSTEPS 16 //number of microsteps
// #define E3_IS_TMC
#define E3_MAX_CURRENT 1000 //in mA
#define E3_SENSE_RESISTOR 91 //in mOhms
#define E3_MICROSTEPS 16 //number of microsteps
#endif
/******************************************************************************\
* enable this section if you have L6470 motor drivers.
* you need to import the L6470 library into the arduino IDE for this
******************************************************************************/
//#define HAVE_L6470DRIVER
#ifdef HAVE_L6470DRIVER
// #define X_IS_L6470
#define X_MICROSTEPS 16 //number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define X2_IS_L6470
#define X2_MICROSTEPS 16 //number of microsteps
#define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y_IS_L6470
#define Y_MICROSTEPS 16 //number of microsteps
#define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Y2_IS_L6470
#define Y2_MICROSTEPS 16 //number of microsteps
#define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z_IS_L6470
#define Z_MICROSTEPS 16 //number of microsteps
#define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define Z2_IS_L6470
#define Z2_MICROSTEPS 16 //number of microsteps
#define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E0_IS_L6470
#define E0_MICROSTEPS 16 //number of microsteps
#define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
// #define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
#endif
//=========================================================================== //===========================================================================
//============================= Define Defines ============================ //============================= Define Defines ============================
//=========================================================================== //===========================================================================
......
...@@ -112,11 +112,11 @@ void manage_inactivity(bool ignore_stepper_queue=false); ...@@ -112,11 +112,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#if defined(DUAL_X_CARRIAGE) && defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 \ #if defined(DUAL_X_CARRIAGE) && defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 \
&& defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1 && defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
#define enable_x() do { WRITE(X_ENABLE_PIN, X_ENABLE_ON); WRITE(X2_ENABLE_PIN, X_ENABLE_ON); } while (0) #define enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
#define disable_x() do { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); WRITE(X2_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0) #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
#elif defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 #elif defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1
#define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON) #define enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
#define disable_x() { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } #define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
#else #else
#define enable_x() ; #define enable_x() ;
#define disable_x() ; #define disable_x() ;
...@@ -124,11 +124,11 @@ void manage_inactivity(bool ignore_stepper_queue=false); ...@@ -124,11 +124,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
#ifdef Y_DUAL_STEPPER_DRIVERS #ifdef Y_DUAL_STEPPER_DRIVERS
#define enable_y() { WRITE(Y_ENABLE_PIN, Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, Y_ENABLE_ON); } #define enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, !Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; } #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
#else #else
#define enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON) #define enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON)
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; } #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
#endif #endif
#else #else
#define enable_y() ; #define enable_y() ;
...@@ -137,11 +137,11 @@ void manage_inactivity(bool ignore_stepper_queue=false); ...@@ -137,11 +137,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1 #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
#ifdef Z_DUAL_STEPPER_DRIVERS #ifdef Z_DUAL_STEPPER_DRIVERS
#define enable_z() { WRITE(Z_ENABLE_PIN, Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN, Z_ENABLE_ON); } #define enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
#define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; } #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
#else #else
#define enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON) #define enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON)
#define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; } #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
#endif #endif
#else #else
#define enable_z() ; #define enable_z() ;
...@@ -149,32 +149,32 @@ void manage_inactivity(bool ignore_stepper_queue=false); ...@@ -149,32 +149,32 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#endif #endif
#if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1) #if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1)
#define enable_e0() WRITE(E0_ENABLE_PIN, E_ENABLE_ON) #define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e0() WRITE(E0_ENABLE_PIN,!E_ENABLE_ON) #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e0() /* nothing */ #define enable_e0() /* nothing */
#define disable_e0() /* nothing */ #define disable_e0() /* nothing */
#endif #endif
#if (DRIVER_EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1) #if (DRIVER_EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
#define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON) #define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON) #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e1() /* nothing */ #define enable_e1() /* nothing */
#define disable_e1() /* nothing */ #define disable_e1() /* nothing */
#endif #endif
#if (DRIVER_EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1) #if (DRIVER_EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
#define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON) #define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON) #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e2() /* nothing */ #define enable_e2() /* nothing */
#define disable_e2() /* nothing */ #define disable_e2() /* nothing */
#endif #endif
#if (DRIVER_EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1) #if (DRIVER_EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
#define enable_e3() WRITE(E3_ENABLE_PIN, E_ENABLE_ON) #define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON)
#define disable_e3() WRITE(E3_ENABLE_PIN,!E_ENABLE_ON) #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e3() /* nothing */ #define enable_e3() /* nothing */
#define disable_e3() /* nothing */ #define disable_e3() /* nothing */
......
This diff is collapsed.
...@@ -159,8 +159,8 @@ ...@@ -159,8 +159,8 @@
#define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout" #define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout"
#define MSG_BIAS " bias: " #define MSG_BIAS " bias: "
#define MSG_D " d: " #define MSG_D " d: "
#define MSG_MIN " min: " #define MSG_T_MIN " min: "
#define MSG_MAX " max: " #define MSG_T_MAX " max: "
#define MSG_KU " Ku: " #define MSG_KU " Ku: "
#define MSG_TU " Tu: " #define MSG_TU " Tu: "
#define MSG_CLASSIC_PID " Classic PID " #define MSG_CLASSIC_PID " Classic PID "
...@@ -214,8 +214,7 @@ ...@@ -214,8 +214,7 @@
#define STR_h3 "3" #define STR_h3 "3"
#define STR_Deg "\271" #define STR_Deg "\271"
#define STR_THERMOMETER "\002" #define STR_THERMOMETER "\002"
#endif #elif defined(DISPLAY_CHARSET_HD44780_WESTERN) // HD44780 ROM Code: A02 (Western)
#ifdef DISPLAY_CHARSET_HD44780_WESTERN // HD44780 ROM Code: A02 (Western)
#define STR_Ae "\216" #define STR_Ae "\216"
#define STR_ae "\204" #define STR_ae "\204"
#define STR_Oe "\211" #define STR_Oe "\211"
...@@ -227,6 +226,8 @@ ...@@ -227,6 +226,8 @@
#define STR_h3 "\263" #define STR_h3 "\263"
#define STR_Deg "\337" #define STR_Deg "\337"
#define STR_THERMOMETER "\002" #define STR_THERMOMETER "\002"
#elif defined(ULTRA_LCD)
#error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller.
#endif #endif
#endif #endif
/* /*
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax" #define MSG_AMAX "Amax"
#define MSG_A_RETRACT "A-retrac." #define MSG_A_RETRACT "A-retrac."
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X trangos/mm" #define MSG_XSTEPS "X trangos/mm"
#define MSG_YSTEPS "Y trangos/mm" #define MSG_YSTEPS "Y trangos/mm"
#define MSG_ZSTEPS "Z trangos/mm" #define MSG_ZSTEPS "Z trangos/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X passos/mm" #define MSG_XSTEPS "X passos/mm"
#define MSG_YSTEPS "Y passos/mm" #define MSG_YSTEPS "Y passos/mm"
#define MSG_ZSTEPS "Z passos/mm" #define MSG_ZSTEPS "Z passos/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-Retract" #define MSG_A_RETRACT "A-Retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X steps/mm" #define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm" #define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm" #define MSG_ZSTEPS "Z steps/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X steps/mm" #define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm" #define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm" #define MSG_ZSTEPS "Z steps/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "Vvacio min" #define MSG_VTRAV_MIN "Vvacio min"
#define MSG_AMAX "Amax" #define MSG_AMAX "Amax"
#define MSG_A_RETRACT "A-retrac." #define MSG_A_RETRACT "A-retrac."
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X pasos/mm" #define MSG_XSTEPS "X pasos/mm"
#define MSG_YSTEPS "Y pasos/mm" #define MSG_YSTEPS "Y pasos/mm"
#define MSG_ZSTEPS "Z pasos/mm" #define MSG_ZSTEPS "Z pasos/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retrakt" #define MSG_A_RETRACT "A-retrakt"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X pausoak/mm" #define MSG_XSTEPS "X pausoak/mm"
#define MSG_YSTEPS "Y pausoak/mm" #define MSG_YSTEPS "Y pausoak/mm"
#define MSG_ZSTEPS "Z pausoak/mm" #define MSG_ZSTEPS "Z pausoak/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VLiike min" #define MSG_VTRAV_MIN "VLiike min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-peruuta" #define MSG_A_RETRACT "A-peruuta"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X steps/mm" #define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm" #define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm" #define MSG_ZSTEPS "Z steps/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "Vdepl min" #define MSG_VTRAV_MIN "Vdepl min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X pas/mm" #define MSG_XSTEPS "X pas/mm"
#define MSG_YSTEPS "Y pas/mm" #define MSG_YSTEPS "Y pas/mm"
#define MSG_ZSTEPS "Z pas/mm" #define MSG_ZSTEPS "Z pas/mm"
......
...@@ -62,15 +62,16 @@ ...@@ -62,15 +62,16 @@
#define MSG_VXY_JERK "Vxy-jerk" #define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax"
#define MSG_X "x" #define MSG_X "x"
#define MSG_Y "y" #define MSG_Y "y"
#define MSG_Z "z" #define MSG_Z "z"
#define MSG_E "e" #define MSG_E "e"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax"
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X steps/mm" #define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm" #define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm" #define MSG_ZSTEPS "Z steps/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X steps/mm" #define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm" #define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm" #define MSG_ZSTEPS "Z steps/mm"
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "Vskok min" #define MSG_VTRAV_MIN "Vskok min"
#define MSG_AMAX "Amax" #define MSG_AMAX "Amax"
#define MSG_A_RETRACT "A-wycofanie" #define MSG_A_RETRACT "A-wycofanie"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "krokiX/mm" #define MSG_XSTEPS "krokiX/mm"
#define MSG_YSTEPS "krokiY/mm" #define MSG_YSTEPS "krokiY/mm"
#define MSG_ZSTEPS "krokiZ/mm" #define MSG_ZSTEPS "krokiZ/mm"
......
...@@ -71,13 +71,14 @@ ...@@ -71,13 +71,14 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "Xpasso/mm" #define MSG_XSTEPS "Xpasso/mm"
#define MSG_YSTEPS "Ypasso/mm" #define MSG_YSTEPS "Ypasso/mm"
#define MSG_ZSTEPS "Zpasso/mm" #define MSG_ZSTEPS "Zpasso/mm"
#define MSG_E0STEPS "E0 steps/mm" #define MSG_E0STEPS "E0 passo/mm"
#define MSG_E1STEPS "E1 steps/mm" #define MSG_E1STEPS "E1 passo/mm"
#define MSG_E2STEPS "E2 steps/mm" #define MSG_E2STEPS "E2 passo/mm"
#define MSG_E3STEPS "E3 steps/mm" #define MSG_E3STEPS "E3 passo/mm"
#define MSG_TEMPERATURE "Temperatura" #define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Movimento" #define MSG_MOTION "Movimento"
#define MSG_VOLUMETRIC "Filament" #define MSG_VOLUMETRIC "Filament"
......
This diff is collapsed.
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X шаг/mm" #define MSG_XSTEPS "X шаг/mm"
#define MSG_YSTEPS "Y шаг/mm" #define MSG_YSTEPS "Y шаг/mm"
#define MSG_ZSTEPS "Z шаг/mm" #define MSG_ZSTEPS "Z шаг/mm"
......
...@@ -68,8 +68,9 @@ float max_retraction_feedrate[EXTRUDERS]; // set the max speeds for retraction ...@@ -68,8 +68,9 @@ float max_retraction_feedrate[EXTRUDERS]; // set the max speeds for retraction
float axis_steps_per_unit[3 + EXTRUDERS]; float axis_steps_per_unit[3 + EXTRUDERS];
unsigned long max_acceleration_units_per_sq_second[3 + EXTRUDERS]; // Use M201 to override by software unsigned long max_acceleration_units_per_sq_second[3 + EXTRUDERS]; // Use M201 to override by software
float minimumfeedrate; float minimumfeedrate;
float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all printing moves. M204 SXXXX
float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
float travel_acceleration; // Travel acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
float max_xy_jerk; //speed than can be stopped at once, if i understand correctly. float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
float max_z_jerk; float max_z_jerk;
float max_e_jerk; float max_e_jerk;
...@@ -708,64 +709,82 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi ...@@ -708,64 +709,82 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi
if(block->steps_x != 0) enable_x(); if(block->steps_x != 0) enable_x();
if(block->steps_y != 0) enable_y(); if(block->steps_y != 0) enable_y();
#endif //NOCOREXY #endif //NOCOREXY
#ifndef Z_LATE_ENABLE #ifndef Z_LATE_ENABLE
if(block->steps_z != 0) enable_z(); if(block->steps_z != 0) enable_z();
#endif #endif
// Enable extruder(s) // Enable extruder(s)
if(block->steps_e != 0) if(block->steps_e != 0)
{ {
if (DISABLE_INACTIVE_EXTRUDER) //enable only selected extruder #if !defined(MKR4) && !defined(NPR2)
{ if (DISABLE_INACTIVE_EXTRUDER) //enable only selected extruder
{
if(g_uc_extruder_last_move[0] > 0) g_uc_extruder_last_move[0]--; if(g_uc_extruder_last_move[0] > 0) g_uc_extruder_last_move[0]--;
if(g_uc_extruder_last_move[1] > 0) g_uc_extruder_last_move[1]--; if(g_uc_extruder_last_move[1] > 0) g_uc_extruder_last_move[1]--;
if(g_uc_extruder_last_move[2] > 0) g_uc_extruder_last_move[2]--; if(g_uc_extruder_last_move[2] > 0) g_uc_extruder_last_move[2]--;
if(g_uc_extruder_last_move[3] > 0) g_uc_extruder_last_move[3]--; if(g_uc_extruder_last_move[3] > 0) g_uc_extruder_last_move[3]--;
switch(extruder)
{
case 0:
enable_e0();
g_uc_extruder_last_move[0] = BLOCK_BUFFER_SIZE*2;
if(g_uc_extruder_last_move[1] == 0) disable_e1();
if(g_uc_extruder_last_move[2] == 0) disable_e2();
if(g_uc_extruder_last_move[3] == 0) disable_e3();
break;
case 1:
enable_e1();
g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE*2;
if(g_uc_extruder_last_move[0] == 0) disable_e0();
if(g_uc_extruder_last_move[2] == 0) disable_e2();
if(g_uc_extruder_last_move[3] == 0) disable_e3();
break;
case 2:
enable_e2();
g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE*2;
if(g_uc_extruder_last_move[0] == 0) disable_e0();
if(g_uc_extruder_last_move[1] == 0) disable_e1();
if(g_uc_extruder_last_move[3] == 0) disable_e3();
break;
case 3:
enable_e3();
g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE*2;
if(g_uc_extruder_last_move[0] == 0) disable_e0();
if(g_uc_extruder_last_move[1] == 0) disable_e1();
if(g_uc_extruder_last_move[2] == 0) disable_e2();
break;
}
}
else //enable all
{
enable_e0();
enable_e1();
enable_e2();
enable_e3();
}
#else //MKR4 or NPr2
switch(extruder) switch(extruder)
{ {
case 0: case 0:
enable_e0(); enable_e0();
g_uc_extruder_last_move[0] = BLOCK_BUFFER_SIZE*2;
if(g_uc_extruder_last_move[1] == 0) disable_e1();
if(g_uc_extruder_last_move[2] == 0) disable_e2();
if(g_uc_extruder_last_move[3] == 0) disable_e3();
break; break;
case 1: case 1:
enable_e1(); enable_e1();
g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE*2;
if(g_uc_extruder_last_move[0] == 0) disable_e0();
if(g_uc_extruder_last_move[2] == 0) disable_e2();
if(g_uc_extruder_last_move[3] == 0) disable_e3();
break; break;
case 2: case 2:
enable_e2(); enable_e0();
g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE*2; break;
if(g_uc_extruder_last_move[0] == 0) disable_e0();
if(g_uc_extruder_last_move[1] == 0) disable_e1();
if(g_uc_extruder_last_move[3] == 0) disable_e3();
break;
case 3: case 3:
enable_e3(); enable_e1();
g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE*2; break;
if(g_uc_extruder_last_move[0] == 0) disable_e0();
if(g_uc_extruder_last_move[1] == 0) disable_e1();
if(g_uc_extruder_last_move[2] == 0) disable_e2();
break;
} }
} #endif //!MKR4 && !NPR2
else //enable all
{
enable_e0();
enable_e1();
enable_e2();
enable_e3();
}
} }
if (block->steps_e == 0) if (block->steps_e == 0)
...@@ -959,19 +978,24 @@ Having the real displacement of the head, we can calculate the total movement le ...@@ -959,19 +978,24 @@ Having the real displacement of the head, we can calculate the total movement le
{ {
block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2 block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
} }
else if(block->steps_e == 0)
{
block->acceleration_st = ceil(travel_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
}
else else
{ {
block->acceleration_st = ceil(acceleration * steps_per_mm); // convert to: acceleration steps/sec^2 block->acceleration_st = ceil(acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
// Limit acceleration per axis
if(((float)block->acceleration_st * (float)block->steps_x / (float)block->step_event_count) > axis_steps_per_sqr_second[X_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[X_AXIS];
if(((float)block->acceleration_st * (float)block->steps_y / (float)block->step_event_count) > axis_steps_per_sqr_second[Y_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[Y_AXIS];
if(((float)block->acceleration_st * (float)block->steps_z / (float)block->step_event_count ) > axis_steps_per_sqr_second[Z_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[Z_AXIS];
if(((float)block->acceleration_st * (float)block->steps_e / (float)block->step_event_count) > axis_steps_per_sqr_second[E_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[E_AXIS];
} }
// Limit acceleration per axis
if(((float)block->acceleration_st * (float)block->steps_x / (float)block->step_event_count) > axis_steps_per_sqr_second[X_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[X_AXIS];
if(((float)block->acceleration_st * (float)block->steps_y / (float)block->step_event_count) > axis_steps_per_sqr_second[Y_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[Y_AXIS];
if(((float)block->acceleration_st * (float)block->steps_e / (float)block->step_event_count) > axis_steps_per_sqr_second[E_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[E_AXIS];
if(((float)block->acceleration_st * (float)block->steps_z / (float)block->step_event_count ) > axis_steps_per_sqr_second[Z_AXIS])
block->acceleration_st = axis_steps_per_sqr_second[Z_AXIS];
block->acceleration = block->acceleration_st / steps_per_mm; block->acceleration = block->acceleration_st / steps_per_mm;
block->acceleration_rate = (long)((float)block->acceleration_st * (16777216.0 / (F_CPU / 8.0))); block->acceleration_rate = (long)((float)block->acceleration_st * (16777216.0 / (F_CPU / 8.0)));
......
...@@ -116,6 +116,7 @@ extern unsigned long max_acceleration_units_per_sq_second[3 + EXTRUDERS]; // Use ...@@ -116,6 +116,7 @@ extern unsigned long max_acceleration_units_per_sq_second[3 + EXTRUDERS]; // Use
extern float minimumfeedrate; extern float minimumfeedrate;
extern float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX extern float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX
extern float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX extern float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
extern float travel_acceleration; // Travel acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly. extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
extern float max_z_jerk; extern float max_z_jerk;
extern float max_e_jerk; extern float max_e_jerk;
......
This diff is collapsed.
...@@ -22,30 +22,31 @@ ...@@ -22,30 +22,31 @@
#define stepper_h #define stepper_h
#include "planner.h" #include "planner.h"
#include "stepper_indirection.h"
#if DRIVER_EXTRUDERS > 3 #if DRIVER_EXTRUDERS > 3
#define WRITE_E_STEP(v) { if(current_block->active_driver == 3) { WRITE(E3_STEP_PIN, v); } else { if(current_block->active_driver == 2) { WRITE(E2_STEP_PIN, v); } else { if(current_block->active_driver == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }}}} #define WRITE_E_STEP(v) { if(current_block->active_driver == 3) { E3_STEP_WRITE(v); } else { if(current_block->active_driver == 2) { E2_STEP_WRITE(v); } else { if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}}}
#define NORM_E_DIR() { if(current_block->active_driver == 3) { WRITE(E3_DIR_PIN, !INVERT_E3_DIR); } else { if(current_block->active_driver == 2) { WRITE(E2_DIR_PIN, !INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }}}} #define NORM_E_DIR() { if(current_block->active_driver == 3) { E3_DIR_WRITE( !INVERT_E3_DIR); } else { if(current_block->active_driver == 2) { E2_DIR_WRITE(!INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}}}
#define REV_E_DIR() { if(current_block->active_driver == 3) { WRITE(E3_DIR_PIN, INVERT_E3_DIR); } else { if(current_block->active_driver == 2) { WRITE(E2_DIR_PIN, INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }}}} #define REV_E_DIR() { if(current_block->active_driver == 3) { E3_DIR_WRITE(INVERT_E3_DIR); } else { if(current_block->active_driver == 2) { E2_DIR_WRITE(INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}}}
#elif DRIVER_EXTRUDERS > 2 #elif DRIVER_EXTRUDERS > 2
#define WRITE_E_STEP(v) { if(current_block->active_driver == 2) { WRITE(E2_STEP_PIN, v); } else { if(current_block->active_driver == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }}} #define WRITE_E_STEP(v) { if(current_block->active_driver == 2) { E2_STEP_WRITE(v); } else { if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}}
#define NORM_E_DIR() { if(current_block->active_driver == 2) { WRITE(E2_DIR_PIN, !INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }}} #define NORM_E_DIR() { if(current_block->active_driver == 2) { E2_DIR_WRITE(!INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}}
#define REV_E_DIR() { if(current_block->active_driver == 2) { WRITE(E2_DIR_PIN, INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }}} #define REV_E_DIR() { if(current_block->active_driver == 2) { E2_DIR_WRITE(INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}}
#elif DRIVER_EXTRUDERS > 1 #elif DRIVER_EXTRUDERS > 1
#ifndef DUAL_X_CARRIAGE #ifndef DUAL_X_CARRIAGE
#define WRITE_E_STEP(v) { if(current_block->active_driver == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }} #define WRITE_E_STEP(v) { if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }} #define NORM_E_DIR() { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }} #define REV_E_DIR() { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}
#else #else
extern bool extruder_duplication_enabled; extern bool extruder_duplication_enabled;
#define WRITE_E_STEP(v) { if(extruder_duplication_enabled) { WRITE(E0_STEP_PIN, v); WRITE(E1_STEP_PIN, v); } else if(current_block->active_driver == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }} #define WRITE_E_STEP(v) { if(extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(extruder_duplication_enabled) { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }} #define NORM_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(extruder_duplication_enabled) { WRITE(E0_DIR_PIN, INVERT_E0_DIR); WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else if(current_block->active_driver == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }} #define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(INVERT_E0_DIR); E1_DIR_WRITE(INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}
#endif //DUAL_X_CARRIAGE #endif
#else #else
#define WRITE_E_STEP(v) WRITE(E0_STEP_PIN, v) #define WRITE_E_STEP(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() WRITE(E0_DIR_PIN, !INVERT_E0_DIR) #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
#define REV_E_DIR() WRITE(E0_DIR_PIN, INVERT_E0_DIR) #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR)
#endif //DRIVER_EXTRUDERS #endif //DRIVER_EXTRUDERS
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
......
/*
stepper_indirection.c - stepper motor driver indirection
to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation
Part of Marlin
Copyright (c) 2015 Dominik Wenger
Marlin 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.
Marlin 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 Marlin. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stepper_indirection.h"
#include "Configuration.h"
#ifdef HAVE_TMCDRIVER
#include <SPI.h>
#include <TMC26XStepper.h>
#endif
// Stepper objects of TMC steppers used
#ifdef X_IS_TMC
TMC26XStepper stepperX(200,X_ENABLE_PIN,X_STEP_PIN,X_DIR_PIN,X_MAX_CURRENT,X_SENSE_RESISTOR);
#endif
#ifdef X2_IS_TMC
TMC26XStepper stepperX2(200,X2_ENABLE_PIN,X2_STEP_PIN,X2_DIR_PIN,X2_MAX_CURRENT,X2_SENSE_RESISTOR);
#endif
#ifdef Y_IS_TMC
TMC26XStepper stepperY(200,Y_ENABLE_PIN,Y_STEP_PIN,Y_DIR_PIN,Y_MAX_CURRENT,Y_SENSE_RESISTOR);
#endif
#ifdef Y2_IS_TMC
TMC26XStepper stepperY2(200,Y2_ENABLE_PIN,Y2_STEP_PIN,Y2_DIR_PIN,Y2_MAX_CURRENT,Y2_SENSE_RESISTOR);
#endif
#ifdef Z_IS_TMC
TMC26XStepper stepperZ(200,Z_ENABLE_PIN,Z_STEP_PIN,Z_DIR_PIN,Z_MAX_CURRENT,Z_SENSE_RESISTOR);
#endif
#ifdef Z2_IS_TMC
TMC26XStepper stepperZ2(200,Z2_ENABLE_PIN,Z2_STEP_PIN,Z2_DIR_PIN,Z2_MAX_CURRENT,Z2_SENSE_RESISTOR);
#endif
#ifdef E0_IS_TMC
TMC26XStepper stepperE0(200,E0_ENABLE_PIN,E0_STEP_PIN,E0_DIR_PIN,E0_MAX_CURRENT,E0_SENSE_RESISTOR);
#endif
#ifdef E1_IS_TMC
TMC26XStepper stepperE1(200,E1_ENABLE_PIN,E1_STEP_PIN,E1_DIR_PIN,E1_MAX_CURRENT,E1_SENSE_RESISTOR);
#endif
#ifdef E2_IS_TMC
TMC26XStepper stepperE2(200,E2_ENABLE_PIN,E2_STEP_PIN,E2_DIR_PIN,E2_MAX_CURRENT,E2_SENSE_RESISTOR);
#endif
#ifdef E3_IS_TMC
TMC26XStepper stepperE3(200,E3_ENABLE_PIN,E3_STEP_PIN,E3_DIR_PIN,E3_MAX_CURRENT,E3_SENSE_RESISTOR);
#endif
#ifdef HAVE_TMCDRIVER
void tmc_init()
{
#ifdef X_IS_TMC
stepperX.setMicrosteps(X_MICROSTEPS);
stepperX.start();
#endif
#ifdef X2_IS_TMC
stepperX2.setMicrosteps(X2_MICROSTEPS);
stepperX2.start();
#endif
#ifdef Y_IS_TMC
stepperY.setMicrosteps(Y_MICROSTEPS);
stepperY.start();
#endif
#ifdef Y2_IS_TMC
stepperY2.setMicrosteps(Y2_MICROSTEPS);
stepperY2.start();
#endif
#ifdef Z_IS_TMC
stepperZ.setMicrosteps(Z_MICROSTEPS);
stepperZ.start();
#endif
#ifdef Z2_IS_TMC
stepperZ2.setMicrosteps(Z2_MICROSTEPS);
stepperZ2.start();
#endif
#ifdef E0_IS_TMC
stepperE0.setMicrosteps(E0_MICROSTEPS);
stepperE0.start();
#endif
#ifdef E1_IS_TMC
stepperE1.setMicrosteps(E1_MICROSTEPS);
stepperE1.start();
#endif
#ifdef E2_IS_TMC
stepperE2.setMicrosteps(E2_MICROSTEPS);
stepperE2.start();
#endif
#ifdef E3_IS_TMC
stepperE3.setMicrosteps(E3_MICROSTEPS);
stepperE3.start();
#endif
}
#endif
// L6470 Driver objects and inits
#ifdef HAVE_L6470DRIVER
#include <SPI.h>
#include <L6470.h>
#endif
// L6470 Stepper objects
#ifdef X_IS_L6470
L6470 stepperX(X_ENABLE_PIN);
#endif
#ifdef X2_IS_L6470
L6470 stepperX2(X2_ENABLE_PIN);
#endif
#ifdef Y_IS_L6470
L6470 stepperY(Y_ENABLE_PIN);
#endif
#ifdef Y2_IS_L6470
L6470 stepperY2(Y2_ENABLE_PIN);
#endif
#ifdef Z_IS_L6470
L6470 stepperZ(Z_ENABLE_PIN);
#endif
#ifdef Z2_IS_L6470
L6470 stepperZ2(Z2_ENABLE_PIN);
#endif
#ifdef E0_IS_L6470
L6470 stepperE0(E0_ENABLE_PIN);
#endif
#ifdef E1_IS_L6470
L6470 stepperE1(E1_ENABLE_PIN);
#endif
#ifdef E2_IS_L6470
L6470 stepperE2(E2_ENABLE_PIN);
#endif
#ifdef E3_IS_L6470
L6470 stepperE3(E3_ENABLE_PIN);
#endif
// init routine
#ifdef HAVE_L6470DRIVER
void L6470_init()
{
#ifdef X_IS_L6470
stepperX.init(X_K_VAL);
stepperX.softFree();
stepperX.setMicroSteps(X_MICROSTEPS);
stepperX.setOverCurrent(X_OVERCURRENT); //set overcurrent protection
stepperX.setStallCurrent(X_STALLCURRENT);
#endif
#ifdef X2_IS_L6470
stepperX2.init(X2_K_VAL);
stepperX2.softFree();
stepperX2.setMicroSteps(X2_MICROSTEPS);
stepperX2.setOverCurrent(X2_OVERCURRENT); //set overcurrent protection
stepperX2.setStallCurrent(X2_STALLCURRENT);
#endif
#ifdef Y_IS_L6470
stepperY.init(Y_K_VAL);
stepperY.softFree();
stepperY.setMicroSteps(Y_MICROSTEPS);
stepperY.setOverCurrent(Y_OVERCURRENT); //set overcurrent protection
stepperY.setStallCurrent(Y_STALLCURRENT);
#endif
#ifdef Y2_IS_L6470
stepperY2.init(Y2_K_VAL);
stepperY2.softFree();
stepperY2.setMicroSteps(Y2_MICROSTEPS);
stepperY2.setOverCurrent(Y2_OVERCURRENT); //set overcurrent protection
stepperY2.setStallCurrent(Y2_STALLCURRENT);
#endif
#ifdef Z_IS_L6470
stepperZ.init(Z_K_VAL);
stepperZ.softFree();
stepperZ.setMicroSteps(Z_MICROSTEPS);
stepperZ.setOverCurrent(Z_OVERCURRENT); //set overcurrent protection
stepperZ.setStallCurrent(Z_STALLCURRENT);
#endif
#ifdef Z2_IS_L6470
stepperZ2.init(Z2_K_VAL);
stepperZ2.softFree();
stepperZ2.setMicroSteps(Z2_MICROSTEPS);
stepperZ2.setOverCurrent(Z2_OVERCURRENT); //set overcurrent protection
stepperZ2.setStallCurrent(Z2_STALLCURRENT);
#endif
#ifdef E0_IS_L6470
stepperE0.init(E0_K_VAL);
stepperE0.softFree();
stepperE0.setMicroSteps(E0_MICROSTEPS);
stepperE0.setOverCurrent(E0_OVERCURRENT); //set overcurrent protection
stepperE0.setStallCurrent(E0_STALLCURRENT);
#endif
#ifdef E1_IS_L6470
stepperE1.init(E1_K_VAL);
stepperE1.softFree();
stepperE1.setMicroSteps(E1_MICROSTEPS);
stepperE1.setOverCurrent(E1_OVERCURRENT); //set overcurrent protection
stepperE1.setStallCurrent(E1_STALLCURRENT);
#endif
#ifdef E2_IS_L6470
stepperE2.init(E2_K_VAL);
stepperE2.softFree();
stepperE2.setMicroSteps(E2_MICROSTEPS);
stepperE2.setOverCurrent(E2_OVERCURRENT); //set overcurrent protection
stepperE2.setStallCurrent(E2_STALLCURRENT);
#endif
#ifdef E3_IS_L6470
stepperE3.init(E3_K_VAL);
stepperE3.softFree();
stepperE3.setMicroSteps(E3_MICROSTEPS);
stepperE3.setOverCurrent(E3_OVERCURRENT); //set overcurrent protection
stepperE3.setStallCurrent(E3_STALLCURRENT);
#endif
}
#endif
This diff is collapsed.
This diff is collapsed.
...@@ -697,7 +697,7 @@ static void lcd_prepare_menu() { ...@@ -697,7 +697,7 @@ static void lcd_prepare_menu() {
if (powersupply) { if (powersupply) {
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81")); MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
} }
else{ else {
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80")); MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
} }
#endif #endif
...@@ -706,16 +706,16 @@ static void lcd_prepare_menu() { ...@@ -706,16 +706,16 @@ static void lcd_prepare_menu() {
} }
#ifdef DELTA #ifdef DELTA
static void lcd_delta_calibrate_menu() { static void lcd_delta_calibrate_menu() {
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_X, PSTR("G0 F8000 X-77.94 Y-45 Z0")); MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_X, PSTR("G0 F8000 X-77.94 Y-45 Z0"));
MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Y, PSTR("G0 F8000 X77.94 Y-45 Z0")); MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Y, PSTR("G0 F8000 X77.94 Y-45 Z0"));
MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Z, PSTR("G0 F8000 X0 Y90 Z0")); MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Z, PSTR("G0 F8000 X0 Y90 Z0"));
MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_CENTER, PSTR("G0 F8000 X0 Y0 Z0")); MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_CENTER, PSTR("G0 F8000 X0 Y0 Z0"));
END_MENU(); END_MENU();
} }
#endif // DELTA #endif // DELTA
float move_menu_scale; float move_menu_scale;
...@@ -995,6 +995,7 @@ static void lcd_control_motion_menu() { ...@@ -995,6 +995,7 @@ static void lcd_control_motion_menu() {
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &max_acceleration_units_per_sq_second[Z_AXIS], 100, 99000, reset_acceleration_rates); MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &max_acceleration_units_per_sq_second[Z_AXIS], 100, 99000, reset_acceleration_rates);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &max_acceleration_units_per_sq_second[E_AXIS], 100, 99000, reset_acceleration_rates); MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &max_acceleration_units_per_sq_second[E_AXIS], 100, 99000, reset_acceleration_rates);
MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &retract_acceleration, 100, 99000); MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &retract_acceleration, 100, 99000);
MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &travel_acceleration, 100, 99000);
MENU_ITEM_EDIT(float52, MSG_XSTEPS, &axis_steps_per_unit[X_AXIS], 5, 9999); MENU_ITEM_EDIT(float52, MSG_XSTEPS, &axis_steps_per_unit[X_AXIS], 5, 9999);
MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999); MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999); MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
...@@ -1018,8 +1019,7 @@ static void lcd_control_motion_menu() { ...@@ -1018,8 +1019,7 @@ static void lcd_control_motion_menu() {
END_MENU(); END_MENU();
} }
static void lcd_control_volumetric_menu() static void lcd_control_volumetric_menu() {
{
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
......
...@@ -845,32 +845,28 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pst ...@@ -845,32 +845,28 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pst
static void lcd_implementation_quick_feedback() static void lcd_implementation_quick_feedback()
{ {
#ifdef LCD_USE_I2C_BUZZER #ifdef LCD_USE_I2C_BUZZER
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) #if defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) && defined(LCD_FEEDBACK_FREQUENCY_HZ)
lcd_buzz(1000/6,100); lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#else #else
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS,LCD_FEEDBACK_FREQUENCY_HZ); lcd_buzz(1000/6, 100);
#endif #endif
#elif defined(BEEPER) && BEEPER > -1 #elif defined(BEEPER) && BEEPER > -1
SET_OUTPUT(BEEPER); SET_OUTPUT(BEEPER);
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) #if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
for(int8_t i=0;i<10;i++) const unsigned int delay = 100;
{ uint8_t i = 10;
WRITE(BEEPER,HIGH);
delayMicroseconds(100);
WRITE(BEEPER,LOW);
delayMicroseconds(100);
}
#else #else
for(int8_t i=0;i<(LCD_FEEDBACK_FREQUENCY_DURATION_MS / (1000 / LCD_FEEDBACK_FREQUENCY_HZ));i++) const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
{ int8_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
#endif
while (i--) {
WRITE(BEEPER,HIGH); WRITE(BEEPER,HIGH);
delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2); delayMicroseconds(delay);
WRITE(BEEPER,LOW); WRITE(BEEPER,LOW);
delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2); delayMicroseconds(delay);
} }
#endif #endif
#endif
} }
#ifdef LCD_HAS_STATUS_INDICATORS #ifdef LCD_HAS_STATUS_INDICATORS
......
...@@ -84,7 +84,7 @@ void vector_3::debug(char* title) ...@@ -84,7 +84,7 @@ void vector_3::debug(char* title)
SERIAL_PROTOCOL(y); SERIAL_PROTOCOL(y);
SERIAL_PROTOCOLPGM(" z: "); SERIAL_PROTOCOLPGM(" z: ");
SERIAL_PROTOCOL(z); SERIAL_PROTOCOL(z);
SERIAL_PROTOCOLPGM("\n"); SERIAL_EOL;
} }
void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z) void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z)
...@@ -145,22 +145,17 @@ matrix_3x3 matrix_3x3::transpose(matrix_3x3 original) ...@@ -145,22 +145,17 @@ matrix_3x3 matrix_3x3::transpose(matrix_3x3 original)
return new_matrix; return new_matrix;
} }
void matrix_3x3::debug(char* title) void matrix_3x3::debug(char* title) {
{ SERIAL_PROTOCOLLN(title);
SERIAL_PROTOCOL(title); int count = 0;
SERIAL_PROTOCOL("\n"); for(int i=0; i<3; i++) {
int count = 0; for(int j=0; j<3; j++) {
for(int i=0; i<3; i++) SERIAL_PROTOCOL(matrix[count] + 0.0001);
{ SERIAL_PROTOCOLPGM(" ");
for(int j=0; j<3; j++) count++;
{ }
SERIAL_PROTOCOL(matrix[count]); SERIAL_EOL;
SERIAL_PROTOCOLPGM(" "); }
count++;
}
SERIAL_PROTOCOLPGM("\n");
}
} }
#endif // #ifdef ENABLE_AUTO_BED_LEVELING #endif // #ifdef ENABLE_AUTO_BED_LEVELING
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment