M45 verbosity, steel sheet define, minor modifications in xyz cal
This commit is contained in:
parent
74f6bbfa6b
commit
a4b3389dfa
5 changed files with 30 additions and 16 deletions
|
@ -55,7 +55,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
||||||
#define X_MAX_POS 255
|
#define X_MAX_POS 255
|
||||||
#define X_MIN_POS 0
|
#define X_MIN_POS 0
|
||||||
#define Y_MAX_POS 210
|
#define Y_MAX_POS 210
|
||||||
#define Y_MIN_POS -4 //orig -4
|
#define Y_MIN_POS -4
|
||||||
#define Z_MAX_POS 200
|
#define Z_MAX_POS 200
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
@ -460,6 +460,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HEATBED_V2
|
#define HEATBED_V2
|
||||||
|
#define STEEL_SHEET
|
||||||
|
|
||||||
#define M600_TIMEOUT 600 //seconds
|
#define M600_TIMEOUT 600 //seconds
|
||||||
|
|
||||||
|
|
|
@ -444,7 +444,7 @@ void force_high_power_mode(bool start_high_power_section);
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
|
||||||
// G-codes
|
// G-codes
|
||||||
bool gcode_M45(bool onlyZ);
|
bool gcode_M45(bool onlyZ, int8_t verbosity_level);
|
||||||
void gcode_M701();
|
void gcode_M701();
|
||||||
|
|
||||||
#define UVLO !(PINE & (1<<4))
|
#define UVLO !(PINE & (1<<4))
|
||||||
|
|
|
@ -2075,7 +2075,7 @@ void force_high_power_mode(bool start_high_power_section) {
|
||||||
}
|
}
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
|
||||||
bool gcode_M45(bool onlyZ)
|
bool gcode_M45(bool onlyZ, int8_t verbosity_level);
|
||||||
{
|
{
|
||||||
bool final_result = false;
|
bool final_result = false;
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
|
@ -2125,14 +2125,18 @@ bool gcode_M45(bool onlyZ)
|
||||||
{
|
{
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
//if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ))
|
#ifndef STEEL_SHEET
|
||||||
//{
|
if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ))
|
||||||
// lcd_wait_for_cool_down();
|
{
|
||||||
//}
|
lcd_wait_for_cool_down();
|
||||||
|
}
|
||||||
|
#endif //STEEL_SHEET
|
||||||
if(!onlyZ)
|
if(!onlyZ)
|
||||||
{
|
{
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
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);
|
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);
|
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_CONFIRM_NOZZLE_CLEAN);
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
|
lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
|
||||||
|
@ -4174,8 +4178,17 @@ void process_commands()
|
||||||
|
|
||||||
case 45: // M45: Prusa3D: bed skew and offset with manual Z up
|
case 45: // M45: Prusa3D: bed skew and offset with manual Z up
|
||||||
{
|
{
|
||||||
|
int8_t verbosity_level = 0;
|
||||||
bool only_Z = code_seen('Z');
|
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;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -902,7 +902,7 @@ error:
|
||||||
// look for the induction sensor response.
|
// 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.
|
// 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_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_XY_STEP (1.f)
|
||||||
#define FIND_BED_INDUCTION_SENSOR_POINT_Z_STEP (0.2f)
|
#define FIND_BED_INDUCTION_SENSOR_POINT_Z_STEP (0.2f)
|
||||||
inline bool find_bed_induction_sensor_point_xy(int verbosity_level)
|
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) {
|
while (current_position[Z_AXIS] > -10.f) {
|
||||||
// Do nsteps_y zig-zag movements.
|
// Do nsteps_y zig-zag movements.
|
||||||
current_position[Y_AXIS] = y0;
|
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.
|
// 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);
|
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);
|
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())
|
if (endstop_z_hit_on_purpose())
|
||||||
goto endloop;
|
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.
|
// 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);
|
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);
|
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);
|
go_xy(x0, current_position[Y_AXIS], feedrate);
|
||||||
enable_z_endstop(true);
|
enable_z_endstop(true);
|
||||||
found = false;
|
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);
|
go_xy(dir_positive ? x1 : x0, current_position[Y_AXIS], feedrate);
|
||||||
if (endstop_z_hit_on_purpose()) {
|
if (endstop_z_hit_on_purpose()) {
|
||||||
found = true;
|
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);
|
go_xy(x0, current_position[Y_AXIS], feedrate);
|
||||||
enable_z_endstop(true);
|
enable_z_endstop(true);
|
||||||
found = false;
|
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);
|
go_xy(dir_positive ? x1 : x0, current_position[Y_AXIS], feedrate);
|
||||||
if (endstop_z_hit_on_purpose()) {
|
if (endstop_z_hit_on_purpose()) {
|
||||||
found = true;
|
found = true;
|
||||||
|
|
|
@ -2629,7 +2629,7 @@ calibrated:
|
||||||
lcd_implementation_print_at(0, 3, 1);
|
lcd_implementation_print_at(0, 3, 1);
|
||||||
lcd_printPGM(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2);
|
lcd_printPGM(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2);
|
||||||
}else{
|
}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_display_message_fullscreen_P(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1);
|
||||||
lcd_implementation_print_at(0, 2, 1);
|
lcd_implementation_print_at(0, 2, 1);
|
||||||
lcd_printPGM(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2);
|
lcd_printPGM(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2);
|
||||||
|
@ -3728,7 +3728,7 @@ void lcd_wizard(int state) {
|
||||||
break;
|
break;
|
||||||
case 3: //xyz cal.
|
case 3: //xyz cal.
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_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;
|
if (wizard_event) state = 5;
|
||||||
else end = true;
|
else end = true;
|
||||||
break;
|
break;
|
||||||
|
@ -3736,7 +3736,7 @@ void lcd_wizard(int state) {
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_Z_CAL);
|
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);
|
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);
|
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
|
if (wizard_event) state = 11; //shipped, no need to set first layer, go to final message directly
|
||||||
else end = true;
|
else end = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue