Merge pull request #488 from PavelSindler/xyz_corrections_3
Xyz corrections
This commit is contained in:
commit
ad33d3efd1
@ -18,6 +18,9 @@
|
||||
// Electronics
|
||||
#define MOTHERBOARD BOARD_RAMBO_MINI_1_3
|
||||
|
||||
#define HEATBED_V2
|
||||
#define STEEL_SHEET
|
||||
#define TACH0PULLUP
|
||||
|
||||
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
||||
//#define E3D_PT100_EXTRUDER_WITH_AMP
|
||||
@ -55,7 +58,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
||||
#define X_MAX_POS 250
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MAX_POS 210
|
||||
#define Y_MIN_POS -4 //orig -4
|
||||
#define Y_MIN_POS -4
|
||||
#define Z_MAX_POS 200
|
||||
#define Z_MIN_POS 0.15
|
||||
|
||||
@ -462,12 +465,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
||||
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration and pause print
|
||||
#endif
|
||||
|
||||
#define HEATBED_V2
|
||||
|
||||
#define M600_TIMEOUT 600 //seconds
|
||||
|
||||
#define TACH0PULLUP
|
||||
|
||||
//#define SUPPORT_VERBOSITY
|
||||
|
||||
#endif //__CONFIGURATION_PRUSA_H
|
||||
|
@ -444,7 +444,7 @@ void force_high_power_mode(bool start_high_power_section);
|
||||
#endif //TMC2130
|
||||
|
||||
// G-codes
|
||||
bool gcode_M45(bool onlyZ);
|
||||
bool gcode_M45(bool onlyZ, int8_t verbosity_level);
|
||||
void gcode_M701();
|
||||
|
||||
#define UVLO !(PINE & (1<<4))
|
||||
|
@ -2077,7 +2077,7 @@ void force_high_power_mode(bool start_high_power_section) {
|
||||
}
|
||||
#endif //TMC2130
|
||||
|
||||
bool gcode_M45(bool onlyZ)
|
||||
bool gcode_M45(bool onlyZ, int8_t verbosity_level);
|
||||
{
|
||||
bool final_result = false;
|
||||
#ifdef TMC2130
|
||||
@ -2127,14 +2127,18 @@ bool gcode_M45(bool onlyZ)
|
||||
{
|
||||
#endif //TMC2130
|
||||
refresh_cmd_timeout();
|
||||
//if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ))
|
||||
//{
|
||||
// lcd_wait_for_cool_down();
|
||||
//}
|
||||
#ifndef STEEL_SHEET
|
||||
if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ))
|
||||
{
|
||||
lcd_wait_for_cool_down();
|
||||
}
|
||||
#endif //STEEL_SHEET
|
||||
if(!onlyZ)
|
||||
{
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
#ifdef STEEL_SHEET
|
||||
bool result = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_STEEL_SHEET_CHECK, false, false);
|
||||
#endif //STEEL_SHEET
|
||||
if(result) lcd_show_fullscreen_message_and_wait_P(MSG_REMOVE_STEEL_SHEET);
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_CONFIRM_NOZZLE_CLEAN);
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
|
||||
@ -4176,8 +4180,17 @@ void process_commands()
|
||||
|
||||
case 45: // M45: Prusa3D: bed skew and offset with manual Z up
|
||||
{
|
||||
int8_t verbosity_level = 0;
|
||||
bool only_Z = code_seen('Z');
|
||||
gcode_M45(only_Z);
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (code_seen('V'))
|
||||
{
|
||||
// Just 'V' without a number counts as V1.
|
||||
char c = strchr_pointer[1];
|
||||
verbosity_level = (c == ' ' || c == '\t' || c == 0) ? 1 : code_value_short();
|
||||
}
|
||||
#endif //SUPPORT_VERBOSITY
|
||||
gcode_M45(only_Z, verbosity_level);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -902,7 +902,7 @@ error:
|
||||
// look for the induction sensor response.
|
||||
// Adjust the current_position[X,Y,Z] to the center of the target dot and its response Z coordinate.
|
||||
#define FIND_BED_INDUCTION_SENSOR_POINT_X_RADIUS (8.f)
|
||||
#define FIND_BED_INDUCTION_SENSOR_POINT_Y_RADIUS (6.f)
|
||||
#define FIND_BED_INDUCTION_SENSOR_POINT_Y_RADIUS (4.f)
|
||||
#define FIND_BED_INDUCTION_SENSOR_POINT_XY_STEP (1.f)
|
||||
#define FIND_BED_INDUCTION_SENSOR_POINT_Z_STEP (0.2f)
|
||||
inline bool find_bed_induction_sensor_point_xy(int verbosity_level)
|
||||
@ -957,7 +957,7 @@ inline bool find_bed_induction_sensor_point_xy(int verbosity_level)
|
||||
while (current_position[Z_AXIS] > -10.f) {
|
||||
// Do nsteps_y zig-zag movements.
|
||||
current_position[Y_AXIS] = y0;
|
||||
for (i = 0; i < nsteps_y; current_position[Y_AXIS] += (y1 - y0) / float(nsteps_y - 1), ++ i) {
|
||||
for (i = 0; i < (nsteps_y - 1); current_position[Y_AXIS] += (y1 - y0) / float(nsteps_y - 1), ++ i) {
|
||||
// Run with a slightly decreasing Z axis, zig-zag movement. Stop at the Z end-stop.
|
||||
current_position[Z_AXIS] -= FIND_BED_INDUCTION_SENSOR_POINT_Z_STEP / float(nsteps_y);
|
||||
go_xyz(dir_positive ? x1 : x0, current_position[Y_AXIS], current_position[Z_AXIS], feedrate);
|
||||
@ -965,7 +965,7 @@ inline bool find_bed_induction_sensor_point_xy(int verbosity_level)
|
||||
if (endstop_z_hit_on_purpose())
|
||||
goto endloop;
|
||||
}
|
||||
for (i = 0; i < nsteps_y; current_position[Y_AXIS] -= (y1 - y0) / float(nsteps_y - 1), ++ i) {
|
||||
for (i = 0; i < (nsteps_y - 1); current_position[Y_AXIS] -= (y1 - y0) / float(nsteps_y - 1), ++ i) {
|
||||
// Run with a slightly decreasing Z axis, zig-zag movement. Stop at the Z end-stop.
|
||||
current_position[Z_AXIS] -= FIND_BED_INDUCTION_SENSOR_POINT_Z_STEP / float(nsteps_y);
|
||||
go_xyz(dir_positive ? x1 : x0, current_position[Y_AXIS], current_position[Z_AXIS], feedrate);
|
||||
@ -996,7 +996,7 @@ inline bool find_bed_induction_sensor_point_xy(int verbosity_level)
|
||||
go_xy(x0, current_position[Y_AXIS], feedrate);
|
||||
enable_z_endstop(true);
|
||||
found = false;
|
||||
for (i = 0, dir_positive = true; i < nsteps_y; current_position[Y_AXIS] += (y1 - y0) / float(nsteps_y - 1), ++ i, dir_positive = ! dir_positive) {
|
||||
for (i = 0, dir_positive = true; i < (nsteps_y - 1); current_position[Y_AXIS] += (y1 - y0) / float(nsteps_y - 1), ++ i, dir_positive = ! dir_positive) {
|
||||
go_xy(dir_positive ? x1 : x0, current_position[Y_AXIS], feedrate);
|
||||
if (endstop_z_hit_on_purpose()) {
|
||||
found = true;
|
||||
@ -1016,7 +1016,7 @@ inline bool find_bed_induction_sensor_point_xy(int verbosity_level)
|
||||
go_xy(x0, current_position[Y_AXIS], feedrate);
|
||||
enable_z_endstop(true);
|
||||
found = false;
|
||||
for (i = 0, dir_positive = true; i < nsteps_y; current_position[Y_AXIS] -= (y1 - y0) / float(nsteps_y - 1), ++ i, dir_positive = ! dir_positive) {
|
||||
for (i = 0, dir_positive = true; i < (nsteps_y - 1); current_position[Y_AXIS] -= (y1 - y0) / float(nsteps_y - 1), ++ i, dir_positive = ! dir_positive) {
|
||||
go_xy(dir_positive ? x1 : x0, current_position[Y_AXIS], feedrate);
|
||||
if (endstop_z_hit_on_purpose()) {
|
||||
found = true;
|
||||
|
@ -2635,7 +2635,7 @@ calibrated:
|
||||
lcd_implementation_print_at(0, 3, 1);
|
||||
lcd_printPGM(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2);
|
||||
}else{
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
|
||||
//lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
|
||||
lcd_display_message_fullscreen_P(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1);
|
||||
lcd_implementation_print_at(0, 2, 1);
|
||||
lcd_printPGM(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2);
|
||||
@ -3740,7 +3740,7 @@ void lcd_wizard(int state) {
|
||||
break;
|
||||
case 3: //xyz cal.
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_XYZ_CAL);
|
||||
wizard_event = gcode_M45(false);
|
||||
wizard_event = gcode_M45(false, 0);
|
||||
if (wizard_event) state = 5;
|
||||
else end = true;
|
||||
break;
|
||||
@ -3748,7 +3748,7 @@ void lcd_wizard(int state) {
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_Z_CAL);
|
||||
wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_STEEL_SHEET_CHECK, false, false);
|
||||
if (!wizard_event) lcd_show_fullscreen_message_and_wait_P(MSG_PLACE_STEEL_SHEET);
|
||||
wizard_event = gcode_M45(true);
|
||||
wizard_event = gcode_M45(true, 0);
|
||||
if (wizard_event) state = 11; //shipped, no need to set first layer, go to final message directly
|
||||
else end = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user