diff --git a/Documentation/changelog.md b/Documentation/changelog.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/Documentation/changelog.md @@ -0,0 +1 @@ + diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9d9820488..697753bc3 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -59,7 +59,7 @@ Here are some standard links for getting your machine calibrated: // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_ULTIMAKER + #define MOTHERBOARD BOARD_RAMPS_13_EFB #endif // Define this to set a custom name for your generic Mendel, @@ -123,8 +123,8 @@ Here are some standard links for getting your machine calibrated: // #define DUMMY_THERMISTOR_998_VALUE 25 // #define DUMMY_THERMISTOR_999_VALUE 100 -#define TEMP_SENSOR_0 -1 -#define TEMP_SENSOR_1 -1 +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_2 0 #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_BED 0 @@ -301,35 +301,21 @@ your extruder heater takes 2 minutes to hit the target on heating. // Enable this option for Toshiba steppers // #define CONFIG_STEPPERS_TOSHIBA -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors +// The pullups are needed if you directly connect a mechanical endstop between the signal and ground pins. +#define ENDSTOPPULLUP_XMAX +#define ENDSTOPPULLUP_YMAX +#define ENDSTOPPULLUP_ZMAX +#define ENDSTOPPULLUP_XMIN +#define ENDSTOPPULLUP_YMIN +#define ENDSTOPPULLUP_ZMIN -#ifndef ENDSTOPPULLUPS - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - // #define ENDSTOPPULLUP_XMAX - // #define ENDSTOPPULLUP_YMAX - // #define ENDSTOPPULLUP_ZMAX - // #define ENDSTOPPULLUP_XMIN - // #define ENDSTOPPULLUP_YMIN - // #define ENDSTOPPULLUP_ZMIN -#endif - -#ifdef ENDSTOPPULLUPS - #define ENDSTOPPULLUP_XMAX - #define ENDSTOPPULLUP_YMAX - #define ENDSTOPPULLUP_ZMAX - #define ENDSTOPPULLUP_XMIN - #define ENDSTOPPULLUP_YMIN - #define ENDSTOPPULLUP_ZMIN -#endif - -// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. -const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. //#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS @@ -346,13 +332,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define DISABLE_E false // For all extruders #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled -#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true -#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false -#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true -#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false -#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false -#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false -#define INVERT_E3_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false +// If you motor turns to wrong direction, you can invert it here: +#define INVERT_X_DIR false +#define INVERT_Y_DIR false +#define INVERT_Z_DIR false +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false // ENDSTOP SETTINGS: // Sets direction of endstops when homing; 1=MAX, -1=MIN @@ -364,9 +351,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. // Travel limits after homing (units are in mm) -#define X_MAX_POS 205 +#define X_MAX_POS 200 #define X_MIN_POS 0 -#define Y_MAX_POS 205 +#define Y_MAX_POS 200 #define Y_MIN_POS 0 #define Z_MAX_POS 200 #define Z_MIN_POS 0 @@ -416,6 +403,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define RIGHT_PROBE_BED_POSITION 170 #define FRONT_PROBE_BED_POSITION 20 #define BACK_PROBE_BED_POSITION 170 + + #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this // Set the number of grid points per dimension // You probably don't need more than 3 (squared=9) @@ -438,8 +427,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Offsets to the probe relative to the extruder tip (Hotend - Probe) // X and Y offsets must be integers - #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right - #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind + #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right + #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. @@ -450,6 +439,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points +// #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine. + //Useful to retract a deployable probe. + //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. @@ -497,12 +489,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // default settings -#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200.0*8/3,760*1.1} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. +#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,500} // default steps per unit for Ultimaker +#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec) +#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for retracts +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E 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). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). @@ -543,11 +536,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Preheat Constants #define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HPB_TEMP 70 -#define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 +#define PLA_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 #define ABS_PREHEAT_HOTEND_TEMP 240 -#define ABS_PREHEAT_HPB_TEMP 100 -#define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 +#define ABS_PREHEAT_HPB_TEMP 110 +#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 //==============================LCD and SD support============================= diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index b80aa038d..0dee05ba7 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -3,7 +3,7 @@ * * Configuration and EEPROM storage * - * V15 EEPROM Layout: + * V16 EEPROM Layout: * * ver * axis_steps_per_unit (x4) @@ -11,6 +11,7 @@ * max_acceleration_units_per_sq_second (x4) * acceleration * retract_acceleration + * travel_aceeleration * minimumfeedrate * mintravelfeedrate * minsegmenttime @@ -104,7 +105,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) { // wrong data being written to the variables. // ALSO: always make sure the variables in the Store and retrieve sections are in the same order. -#define EEPROM_VERSION "V15" +#define EEPROM_VERSION "V16" #ifdef EEPROM_SETTINGS @@ -118,6 +119,7 @@ void Config_StoreSettings() { EEPROM_WRITE_VAR(i, max_acceleration_units_per_sq_second); EEPROM_WRITE_VAR(i, acceleration); EEPROM_WRITE_VAR(i, retract_acceleration); + EEPROM_WRITE_VAR(i, travel_acceleration); EEPROM_WRITE_VAR(i, minimumfeedrate); EEPROM_WRITE_VAR(i, mintravelfeedrate); EEPROM_WRITE_VAR(i, minsegmenttime); @@ -253,6 +255,7 @@ void Config_RetrieveSettings() { EEPROM_READ_VAR(i, acceleration); EEPROM_READ_VAR(i, retract_acceleration); + EEPROM_READ_VAR(i, travel_acceleration); EEPROM_READ_VAR(i, minimumfeedrate); EEPROM_READ_VAR(i, mintravelfeedrate); EEPROM_READ_VAR(i, minsegmenttime); @@ -380,6 +383,7 @@ void Config_ResetDefault() { acceleration = DEFAULT_ACCELERATION; retract_acceleration = DEFAULT_RETRACT_ACCELERATION; + travel_acceleration = DEFAULT_TRAVEL_ACCELERATION; minimumfeedrate = DEFAULT_MINIMUMFEEDRATE; minsegmenttime = DEFAULT_MINSEGMENTTIME; mintravelfeedrate = DEFAULT_MINTRAVELFEEDRATE; @@ -516,11 +520,12 @@ void Config_PrintSettings(bool forReplay) { SERIAL_EOL; SERIAL_ECHO_START; if (!forReplay) { - SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration"); + SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel"); SERIAL_ECHO_START; } - SERIAL_ECHOPAIR(" M204 S", acceleration ); - SERIAL_ECHOPAIR(" T", retract_acceleration); + SERIAL_ECHOPAIR(" M204 P", acceleration ); + SERIAL_ECHOPAIR(" R", retract_acceleration); + SERIAL_ECHOPAIR(" T", travel_acceleration); SERIAL_EOL; SERIAL_ECHO_START; diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f2b312441..11f4e43b9 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -214,6 +214,7 @@ #define X_HOME_RETRACT_MM 5 #define Y_HOME_RETRACT_MM 5 #define Z_HOME_RETRACT_MM 2 +#define HOMING_BUMP_DIVISOR {10, 10, 20} // 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 AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 77d1e82dc..e2c69cd95 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -201,6 +201,10 @@ #endif float homing_feedrate[] = HOMING_FEEDRATE; +#ifdef ENABLE_AUTO_BED_LEVELING +int xy_travel_speed = XY_TRAVEL_SPEED; +#endif +int homing_bump_divisor[] = HOMING_BUMP_DIVISOR; bool axis_relative_modes[] = AXIS_RELATIVE_MODES; int feedmultiply = 100; //100->1 200->2 int saved_feedmultiply; @@ -780,7 +784,7 @@ void get_command() while(cmdbuffer[bufindw][count] != '*') checksum = checksum^cmdbuffer[bufindw][count++]; strchr_pointer = strchr(cmdbuffer[bufindw], '*'); - if( (int)(strtod(strchr_pointer + 1, NULL)) != checksum) { + if(strtol(strchr_pointer + 1, NULL, 10) != checksum) { SERIAL_ERROR_START; SERIAL_ERRORPGM(MSG_ERR_CHECKSUM_MISMATCH); SERIAL_ERRORLN(gcode_LastN); @@ -816,7 +820,7 @@ void get_command() } if((strchr(cmdbuffer[bufindw], 'G') != NULL)){ strchr_pointer = strchr(cmdbuffer[bufindw], 'G'); - switch((int)((strtod(strchr_pointer + 1, NULL)))){ + switch(strtol(strchr_pointer + 1, NULL, 10)){ case 0: case 1: case 2: @@ -1146,7 +1150,18 @@ static void run_z_probe() { st_synchronize(); // move back down slowly to find bed - feedrate = homing_feedrate[Z_AXIS]/4; + + if (homing_bump_divisor[Z_AXIS] >= 1) + { + feedrate = homing_feedrate[Z_AXIS]/homing_bump_divisor[Z_AXIS]; + } + else + { + feedrate = homing_feedrate[Z_AXIS]/10; + SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1"); + } + + zPosition -= home_retract_mm(Z_AXIS) * 2; plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder); st_synchronize(); @@ -1165,7 +1180,7 @@ static void do_blocking_move_to(float x, float y, float z) { plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder); st_synchronize(); - feedrate = XY_TRAVEL_SPEED; + feedrate = xy_travel_speed; current_position[X_AXIS] = x; current_position[Y_AXIS] = y; @@ -1308,11 +1323,17 @@ static void homeaxis(int axis) { st_synchronize(); destination[axis] = 2*home_retract_mm(axis) * axis_home_dir; -#ifdef DELTA - feedrate = homing_feedrate[axis]/10; -#else - feedrate = homing_feedrate[axis]/2 ; -#endif + + if (homing_bump_divisor[axis] >= 1) + { + feedrate = homing_feedrate[axis]/homing_bump_divisor[axis]; + } + else + { + feedrate = homing_feedrate[axis]/10; + SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1"); + } + plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); st_synchronize(); #ifdef DELTA @@ -1771,41 +1792,32 @@ inline void gcode_G28() { #ifdef AUTO_BED_LEVELING_GRID - #define MIN_PROBE_EDGE 20 // The probe square sides can be no smaller than this - // Make sure probing points are reachable #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X - #error The given LEFT_PROBE_BED_POSITION can't be reached by the probe. + #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe." #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X - #error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe. + #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe." #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y - #error The given FRONT_PROBE_BED_POSITION can't be reached by the probe. + #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe." #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y - #error The given BACK_PROBE_BED_POSITION can't be reached by the probe. - - // Check if Probe_Offset * Grid Points is greater than Probing Range - - #elif abs(X_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION - #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS" - #elif abs(Y_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION - #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS" + #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe." #endif #else // !AUTO_BED_LEVELING_GRID #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X - #error The given ABL_PROBE_PT_1_X can't be reached by the probe. + #error "The given ABL_PROBE_PT_1_X can't be reached by the probe." #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X - #error The given ABL_PROBE_PT_2_X can't be reached by the probe. + #error "The given ABL_PROBE_PT_2_X can't be reached by the probe." #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X - #error The given ABL_PROBE_PT_3_X can't be reached by the probe. + #error "The given ABL_PROBE_PT_3_X can't be reached by the probe." #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y - #error The given ABL_PROBE_PT_1_Y can't be reached by the probe. + #error "The given ABL_PROBE_PT_1_Y can't be reached by the probe." #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y - #error The given ABL_PROBE_PT_2_Y can't be reached by the probe. + #error "The given ABL_PROBE_PT_2_Y can't be reached by the probe." #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y - #error The given ABL_PROBE_PT_3_Y can't be reached by the probe. + #error "The given ABL_PROBE_PT_3_Y can't be reached by the probe." #endif #endif // !AUTO_BED_LEVELING_GRID @@ -1821,6 +1833,8 @@ inline void gcode_G28() { * P Set the size of the grid that will be probed (P x P points). * Example: "G29 P4" * + * S Set the XY travel speed between probe points (in mm/min) + * * V Set the verbose level (0-4). Example: "G29 V3" * * T Generate a Bed Topology Report. Example: "G29 P5 T" for a detailed report. @@ -1877,11 +1891,13 @@ inline void gcode_G28() { SERIAL_PROTOCOLPGM("G29 Auto Bed Leveling\n"); int auto_bed_leveling_grid_points = code_seen('P') ? code_value_long() : AUTO_BED_LEVELING_GRID_POINTS; - if (auto_bed_leveling_grid_points < 2 || auto_bed_leveling_grid_points > AUTO_BED_LEVELING_GRID_POINTS) { + if (auto_bed_leveling_grid_points < 2) { SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n"); return; } + xy_travel_speed = code_seen('S') ? code_value_long() : XY_TRAVEL_SPEED; + int left_probe_bed_position = code_seen('L') ? code_value_long() : LEFT_PROBE_BED_POSITION, right_probe_bed_position = code_seen('R') ? code_value_long() : RIGHT_PROBE_BED_POSITION, front_probe_bed_position = code_seen('F') ? code_value_long() : FRONT_PROBE_BED_POSITION, @@ -2110,6 +2126,11 @@ inline void gcode_G28() { #ifdef Z_PROBE_SLED dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel #endif + + #ifdef Z_PROBE_END_SCRIPT + enquecommands_P(PSTR(Z_PROBE_END_SCRIPT)); + st_synchronize(); + #endif } #ifndef Z_PROBE_SLED @@ -3257,16 +3278,34 @@ inline void gcode_M203() { } /** - * M204: Set Default Acceleration and/or Default Filament Acceleration in mm/sec^2 (M204 S3000 T7000) + * M204: Set Accelerations in mm/sec^2 (M204 P1200 R3000 T3000) * - * S = normal moves - * T = filament only moves + * P = Printing moves + * R = Retract only (no X, Y, Z) moves + * T = Travel (non printing) moves * * Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate */ inline void gcode_M204() { - if (code_seen('S')) acceleration = code_value(); - if (code_seen('T')) retract_acceleration = code_value(); + if (code_seen('P')) + { + acceleration = code_value(); + SERIAL_ECHOPAIR("Setting Printing Acceleration: ", acceleration ); + SERIAL_EOL; + } + if (code_seen('R')) + { + retract_acceleration = code_value(); + SERIAL_ECHOPAIR("Setting Retract Acceleration: ", retract_acceleration ); + SERIAL_EOL; + } + if (code_seen('T')) + { + travel_acceleration = code_value(); + SERIAL_ECHOPAIR("Setting Travel Acceleration: ", travel_acceleration ); + SERIAL_EOL; + } + } /** @@ -4218,7 +4257,7 @@ inline void gcode_M350() { */ inline void gcode_M351() { #if defined(X_MS1_PIN) && X_MS1_PIN > -1 - if (code_seen('S')) switch((int)code_value()) { + if (code_seen('S')) switch(code_value_long()) { case 1: for(int i=0;iacceleration_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 { 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_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]; } + // 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_rate = (long)((float)block->acceleration_st * (16777216.0 / (F_CPU / 8.0))); diff --git a/Marlin/planner.h b/Marlin/planner.h index 0952b9dd3..a64a0f0d3 100644 --- a/Marlin/planner.h +++ b/Marlin/planner.h @@ -112,6 +112,7 @@ extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 extern float minimumfeedrate; 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 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_z_jerk; extern float max_e_jerk; diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 2f83afe2d..39b092344 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -903,6 +903,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_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_TRAVEL, &travel_acceleration, 100, 99000); 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(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999); diff --git a/README.md b/README.md index 5107cf004..155e916f5 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ We are actively looking for testers. So please try the current development versi [![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224) [![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin) -What bugs are we working on: [Bug Fixing Round 2](https://github.com/MarlinFirmware/Marlin/milestones/Bug%20Fixing%20Round%202) +What bugs are we working on: [Bug Fixing Round 3](https://github.com/MarlinFirmware/Marlin/milestones/Bug%20Fixing%20Round%203) ## Contact -__IRC:__ #marlin-firmware @freenode ([WebChat Client](https://webchat.freenode.net/?channels=marlin-firmware), [Archive](http://energymonitor-dk.dns4e.net/marlin-firmware-log/)) +__IRC:__ #marlin-firmware @freenode ([WebChat Client](https://webchat.freenode.net/?channels=marlin-firmware) __Mailing List:__ marlin@lists.0l.de ([Subscribe](http://lists.0l.de/mailman/listinfo/marlin), [Archive](http://lists.0l.de/pipermail/marlin/))