commit
4c65b3979c
@ -101,6 +101,8 @@
|
|||||||
|
|
||||||
#define EEPROM_XYZ_CAL_SKEW (EEPROM_POWER_COUNT - 4) //float for skew backup
|
#define EEPROM_XYZ_CAL_SKEW (EEPROM_POWER_COUNT - 4) //float for skew backup
|
||||||
|
|
||||||
|
#define EEPROM_WIZARD_ACTIVE (EEPROM_XYZ_CAL_SKEW - 1)
|
||||||
|
|
||||||
// Currently running firmware, each digit stored as uint16_t.
|
// Currently running firmware, each digit stored as uint16_t.
|
||||||
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
||||||
#define EEPROM_FIRMWARE_VERSION_END (FW_PRUSA3D_MAGIC_LEN+8)
|
#define EEPROM_FIRMWARE_VERSION_END (FW_PRUSA3D_MAGIC_LEN+8)
|
||||||
@ -769,7 +771,7 @@ enum CalibrationStatus
|
|||||||
CALIBRATION_STATUS_ASSEMBLED = 255,
|
CALIBRATION_STATUS_ASSEMBLED = 255,
|
||||||
|
|
||||||
// For the wizard: self test has been performed, now the XYZ calibration is needed.
|
// For the wizard: self test has been performed, now the XYZ calibration is needed.
|
||||||
// CALIBRATION_STATUS_XYZ_CALIBRATION = 250,
|
CALIBRATION_STATUS_XYZ_CALIBRATION = 250,
|
||||||
|
|
||||||
// For the wizard: factory assembled, needs to run Z calibration.
|
// For the wizard: factory assembled, needs to run Z calibration.
|
||||||
CALIBRATION_STATUS_Z_CALIBRATION = 240,
|
CALIBRATION_STATUS_Z_CALIBRATION = 240,
|
||||||
|
@ -46,7 +46,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||||||
#define MANUAL_Z_HOME_POS 0.2
|
#define MANUAL_Z_HOME_POS 0.2
|
||||||
|
|
||||||
// Travel limits after homing
|
// Travel limits after homing
|
||||||
#define X_MAX_POS 255
|
#define X_MAX_POS 250
|
||||||
#define X_MIN_POS 0
|
#define X_MIN_POS 0
|
||||||
#define Y_MAX_POS 210
|
#define Y_MAX_POS 210
|
||||||
#define Y_MIN_POS -12 //orig -4
|
#define Y_MIN_POS -12 //orig -4
|
||||||
@ -93,7 +93,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||||||
//#define DEBUG_DISABLE_YMAXLIMIT //y max limit ignored
|
//#define DEBUG_DISABLE_YMAXLIMIT //y max limit ignored
|
||||||
//#define DEBUG_DISABLE_ZMINLIMIT //z min limit ignored
|
//#define DEBUG_DISABLE_ZMINLIMIT //z min limit ignored
|
||||||
//#define DEBUG_DISABLE_ZMAXLIMIT //z max limit ignored
|
//#define DEBUG_DISABLE_ZMAXLIMIT //z max limit ignored
|
||||||
#define DEBUG_DISABLE_STARTMSGS //no startup messages
|
//#define DEBUG_DISABLE_STARTMSGS //no startup messages
|
||||||
//#define DEBUG_DISABLE_MINTEMP //mintemp error ignored
|
//#define DEBUG_DISABLE_MINTEMP //mintemp error ignored
|
||||||
//#define DEBUG_DISABLE_SWLIMITS //sw limits ignored
|
//#define DEBUG_DISABLE_SWLIMITS //sw limits ignored
|
||||||
//#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line
|
//#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line
|
||||||
|
@ -234,7 +234,6 @@ void cmdqueue_reset();
|
|||||||
|
|
||||||
void prepare_arc_move(char isclockwise);
|
void prepare_arc_move(char isclockwise);
|
||||||
void clamp_to_software_endstops(float target[3]);
|
void clamp_to_software_endstops(float target[3]);
|
||||||
|
|
||||||
void refresh_cmd_timeout(void);
|
void refresh_cmd_timeout(void);
|
||||||
|
|
||||||
#ifdef FAST_PWM_FAN
|
#ifdef FAST_PWM_FAN
|
||||||
@ -382,5 +381,8 @@ extern void print_world_coordinates();
|
|||||||
extern void print_physical_coordinates();
|
extern void print_physical_coordinates();
|
||||||
extern void print_mesh_bed_leveling_table();
|
extern void print_mesh_bed_leveling_table();
|
||||||
|
|
||||||
|
// G-codes
|
||||||
|
bool gcode_M45(bool onlyZ);
|
||||||
|
void gcode_M701();
|
||||||
|
|
||||||
#define UVLO !(PINE & (1<<4))
|
#define UVLO !(PINE & (1<<4))
|
@ -271,7 +271,7 @@ int extruder_multiply[EXTRUDERS] = {100
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
int bowden_length[4];
|
int bowden_length[4] = {385, 385, 385, 385};
|
||||||
|
|
||||||
bool is_usb_printing = false;
|
bool is_usb_printing = false;
|
||||||
bool homing_flag = false;
|
bool homing_flag = false;
|
||||||
@ -960,6 +960,7 @@ void setup()
|
|||||||
// EEPROM_LANG to number lower than 0x0ff.
|
// EEPROM_LANG to number lower than 0x0ff.
|
||||||
// 1) Set a high power mode.
|
// 1) Set a high power mode.
|
||||||
eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0);
|
eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0);
|
||||||
|
eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1); //run wizard
|
||||||
}
|
}
|
||||||
#ifdef SNMM
|
#ifdef SNMM
|
||||||
if (eeprom_read_dword((uint32_t*)EEPROM_BOWDEN_LENGTH) == 0x0ffffffff) { //bowden length used for SNMM
|
if (eeprom_read_dword((uint32_t*)EEPROM_BOWDEN_LENGTH) == 0x0ffffffff) { //bowden length used for SNMM
|
||||||
@ -992,29 +993,36 @@ void setup()
|
|||||||
setup_uvlo_interrupt();
|
setup_uvlo_interrupt();
|
||||||
setup_fan_interrupt();
|
setup_fan_interrupt();
|
||||||
fsensor_setup_interrupt();
|
fsensor_setup_interrupt();
|
||||||
|
for (int i = 0; i<4; i++) EEPROM_read_B(EEPROM_BOWDEN_LENGTH + i * 2, &bowden_length[i]);
|
||||||
|
|
||||||
#ifndef DEBUG_DISABLE_STARTMSGS
|
#ifndef DEBUG_DISABLE_STARTMSGS
|
||||||
|
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 1) {
|
||||||
|
lcd_wizard(0);
|
||||||
|
}
|
||||||
|
else if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 0) { //dont show calibration status messages if wizard is currently active
|
||||||
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
||||||
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
|
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
|
||||||
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
|
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
|
||||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
||||||
// Show the message.
|
// Show the message.
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
|
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
|
||||||
} else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) {
|
}
|
||||||
|
else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) {
|
||||||
// Show the message.
|
// Show the message.
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
|
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
} else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && temp_cal_active == true && calibration_status_pinda() == false) {
|
}
|
||||||
|
else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && temp_cal_active == true && calibration_status_pinda() == false) {
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_PINDA_NOT_CALIBRATED);
|
lcd_show_fullscreen_message_and_wait_P(MSG_PINDA_NOT_CALIBRATED);
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
} else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
|
}
|
||||||
|
else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
|
||||||
// Show the message.
|
// Show the message.
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
|
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif //DEBUG_DISABLE_STARTMSGS
|
#endif //DEBUG_DISABLE_STARTMSGS
|
||||||
for (int i = 0; i<4; i++) EEPROM_read_B(EEPROM_BOWDEN_LENGTH + i * 2, &bowden_length[i]);
|
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
lcd_update(2);
|
lcd_update(2);
|
||||||
@ -1416,7 +1424,6 @@ static float probe_pt(float x, float y, float z_before) {
|
|||||||
|
|
||||||
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
||||||
|
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
#ifdef LIN_ADVANCE
|
||||||
/**
|
/**
|
||||||
* M900: Set and/or Get advance K factor and WH/D ratio
|
* M900: Set and/or Get advance K factor and WH/D ratio
|
||||||
@ -1454,6 +1461,8 @@ inline void gcode_M900() {
|
|||||||
bool calibrate_z_auto()
|
bool calibrate_z_auto()
|
||||||
{
|
{
|
||||||
//lcd_display_message_fullscreen_P(MSG_CALIBRATE_Z_AUTO);
|
//lcd_display_message_fullscreen_P(MSG_CALIBRATE_Z_AUTO);
|
||||||
|
lcd_implementation_clear();
|
||||||
|
lcd_print_at_PGM(0,1, MSG_CALIBRATE_Z_AUTO);
|
||||||
bool endstops_enabled = enable_endstops(true);
|
bool endstops_enabled = enable_endstops(true);
|
||||||
int axis_up_dir = -home_dir(Z_AXIS);
|
int axis_up_dir = -home_dir(Z_AXIS);
|
||||||
tmc2130_home_enter(Z_AXIS_MASK);
|
tmc2130_home_enter(Z_AXIS_MASK);
|
||||||
@ -1477,7 +1486,7 @@ bool calibrate_z_auto()
|
|||||||
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
enable_endstops(endstops_enabled);
|
enable_endstops(endstops_enabled);
|
||||||
current_position[Z_AXIS] = Z_MAX_POS-3.f;
|
current_position[Z_AXIS] = Z_MAX_POS+2.0;
|
||||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1734,6 +1743,178 @@ void ramming() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
bool gcode_M45(bool onlyZ) {
|
||||||
|
bool final_result = false;
|
||||||
|
// Only Z calibration?
|
||||||
|
|
||||||
|
|
||||||
|
if (!onlyZ) {
|
||||||
|
setTargetBed(0);
|
||||||
|
setTargetHotend(0, 0);
|
||||||
|
setTargetHotend(0, 1);
|
||||||
|
setTargetHotend(0, 2);
|
||||||
|
adjust_bed_reset(); //reset bed level correction
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disable the default update procedure of the display. We will do a modal dialog.
|
||||||
|
lcd_update_enable(false);
|
||||||
|
// Let the planner use the uncorrected coordinates.
|
||||||
|
mbl.reset();
|
||||||
|
// Reset world2machine_rotation_and_skew and world2machine_shift, therefore
|
||||||
|
// the planner will not perform any adjustments in the XY plane.
|
||||||
|
// Wait for the motors to stop and update the current position with the absolute values.
|
||||||
|
world2machine_revert_to_uncorrected();
|
||||||
|
// Reset the baby step value applied without moving the axes.
|
||||||
|
babystep_reset();
|
||||||
|
// Mark all axes as in a need for homing.
|
||||||
|
memset(axis_known_position, 0, sizeof(axis_known_position));
|
||||||
|
|
||||||
|
// Home in the XY plane.
|
||||||
|
//set_destination_to_current();
|
||||||
|
setup_for_endstop_move();
|
||||||
|
lcd_display_message_fullscreen_P(MSG_AUTO_HOME);
|
||||||
|
home_xy();
|
||||||
|
|
||||||
|
// Let the user move the Z axes up to the end stoppers.
|
||||||
|
#ifdef TMC2130
|
||||||
|
if (calibrate_z_auto()) {
|
||||||
|
#else //TMC2130
|
||||||
|
if (lcd_calibrate_z_end_stop_manual(onlyZ)) {
|
||||||
|
#endif //TMC2130
|
||||||
|
refresh_cmd_timeout();
|
||||||
|
//if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ)) {
|
||||||
|
// lcd_wait_for_cool_down();
|
||||||
|
//}
|
||||||
|
if(!onlyZ){
|
||||||
|
bool result = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_STEEL_SHEET_CHECK, false, false);
|
||||||
|
if(result) lcd_show_fullscreen_message_and_wait_P(MSG_REMOVE_STEEL_SHEET);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
// Move the print head close to the bed.
|
||||||
|
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
|
||||||
|
st_synchronize();
|
||||||
|
|
||||||
|
|
||||||
|
//#ifdef TMC2130
|
||||||
|
// tmc2130_home_enter(X_AXIS_MASK | Y_AXIS_MASK);
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
int8_t verbosity_level = 0;
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (onlyZ) {
|
||||||
|
clean_up_after_endstop_move();
|
||||||
|
// Z only calibration.
|
||||||
|
// Load the machine correction matrix
|
||||||
|
world2machine_initialize();
|
||||||
|
// and correct the current_position to match the transformed coordinate system.
|
||||||
|
world2machine_update_current();
|
||||||
|
//FIXME
|
||||||
|
bool result = sample_mesh_and_store_reference();
|
||||||
|
if (result) {
|
||||||
|
if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION)
|
||||||
|
// Shipped, the nozzle height has been set already. The user can start printing now.
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
|
||||||
|
// babystep_apply();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Reset the baby step value and the baby step applied flag.
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
|
||||||
|
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
||||||
|
// Complete XYZ calibration.
|
||||||
|
uint8_t point_too_far_mask = 0;
|
||||||
|
BedSkewOffsetDetectionResultType result = find_bed_offset_and_skew(verbosity_level, point_too_far_mask);
|
||||||
|
clean_up_after_endstop_move();
|
||||||
|
// Print head up.
|
||||||
|
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
|
||||||
|
st_synchronize();
|
||||||
|
if (result >= 0) {
|
||||||
|
point_too_far_mask = 0;
|
||||||
|
// Second half: The fine adjustment.
|
||||||
|
// Let the planner use the uncorrected coordinates.
|
||||||
|
mbl.reset();
|
||||||
|
world2machine_reset();
|
||||||
|
// Home in the XY plane.
|
||||||
|
setup_for_endstop_move();
|
||||||
|
home_xy();
|
||||||
|
result = improve_bed_offset_and_skew(1, verbosity_level, point_too_far_mask);
|
||||||
|
clean_up_after_endstop_move();
|
||||||
|
// Print head up.
|
||||||
|
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
|
||||||
|
st_synchronize();
|
||||||
|
// if (result >= 0) babystep_apply();
|
||||||
|
}
|
||||||
|
lcd_bed_calibration_show_result(result, point_too_far_mask);
|
||||||
|
if (result >= 0) {
|
||||||
|
// Calibration valid, the machine should be able to print. Advise the user to run the V2Calibration.gcode.
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
||||||
|
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) != 1) lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
|
||||||
|
final_result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef TMC2130
|
||||||
|
tmc2130_home_exit();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Timeouted.
|
||||||
|
}
|
||||||
|
lcd_update_enable(true);
|
||||||
|
return final_result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void gcode_M701() {
|
||||||
|
#ifdef SNMM
|
||||||
|
extr_adj(snmm_extruder);//loads current extruder
|
||||||
|
#else
|
||||||
|
enable_z();
|
||||||
|
custom_message = true;
|
||||||
|
custom_message_type = 2;
|
||||||
|
|
||||||
|
lcd_setstatuspgm(MSG_LOADING_FILAMENT);
|
||||||
|
current_position[E_AXIS] += 70;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence
|
||||||
|
|
||||||
|
current_position[E_AXIS] += 25;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
|
||||||
|
st_synchronize();
|
||||||
|
|
||||||
|
if (!farm_mode && loading_flag) {
|
||||||
|
bool clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
|
||||||
|
|
||||||
|
while (!clean) {
|
||||||
|
lcd_update_enable(true);
|
||||||
|
lcd_update(2);
|
||||||
|
current_position[E_AXIS] += 25;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
|
||||||
|
st_synchronize();
|
||||||
|
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
lcd_update_enable(true);
|
||||||
|
lcd_update(2);
|
||||||
|
lcd_setstatuspgm(WELCOME_MSG);
|
||||||
|
disable_z();
|
||||||
|
loading_flag = false;
|
||||||
|
custom_message = false;
|
||||||
|
custom_message_type = 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void process_commands()
|
void process_commands()
|
||||||
{
|
{
|
||||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||||
@ -3586,130 +3767,10 @@ 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
|
||||||
{
|
{
|
||||||
// Only Z calibration?
|
bool only_Z = code_seen('Z');
|
||||||
bool onlyZ = code_seen('Z');
|
gcode_M45(only_Z);
|
||||||
|
|
||||||
if (!onlyZ) {
|
|
||||||
setTargetBed(0);
|
|
||||||
setTargetHotend(0, 0);
|
|
||||||
setTargetHotend(0, 1);
|
|
||||||
setTargetHotend(0, 2);
|
|
||||||
adjust_bed_reset(); //reset bed level correction
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable the default update procedure of the display. We will do a modal dialog.
|
|
||||||
lcd_update_enable(false);
|
|
||||||
// Let the planner use the uncorrected coordinates.
|
|
||||||
mbl.reset();
|
|
||||||
// Reset world2machine_rotation_and_skew and world2machine_shift, therefore
|
|
||||||
// the planner will not perform any adjustments in the XY plane.
|
|
||||||
// Wait for the motors to stop and update the current position with the absolute values.
|
|
||||||
world2machine_revert_to_uncorrected();
|
|
||||||
// Reset the baby step value applied without moving the axes.
|
|
||||||
babystep_reset();
|
|
||||||
// Mark all axes as in a need for homing.
|
|
||||||
memset(axis_known_position, 0, sizeof(axis_known_position));
|
|
||||||
|
|
||||||
// Home in the XY plane.
|
|
||||||
//set_destination_to_current();
|
|
||||||
setup_for_endstop_move();
|
|
||||||
lcd_display_message_fullscreen_P(MSG_AUTO_HOME);
|
|
||||||
home_xy();
|
|
||||||
|
|
||||||
// Let the user move the Z axes up to the end stoppers.
|
|
||||||
#ifdef TMC2130
|
|
||||||
if (calibrate_z_auto()) {
|
|
||||||
#else //TMC2130
|
|
||||||
if (lcd_calibrate_z_end_stop_manual( onlyZ )) {
|
|
||||||
#endif //TMC2130
|
|
||||||
refresh_cmd_timeout();
|
|
||||||
if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ)) {
|
|
||||||
lcd_wait_for_cool_down();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Move the print head close to the bed.
|
|
||||||
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS],current_position[Z_AXIS] , current_position[E_AXIS], homing_feedrate[Z_AXIS]/40, active_extruder);
|
|
||||||
st_synchronize();
|
|
||||||
|
|
||||||
|
|
||||||
//#ifdef TMC2130
|
|
||||||
// tmc2130_home_enter(X_AXIS_MASK | Y_AXIS_MASK);
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
int8_t verbosity_level = 0;
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (onlyZ) {
|
|
||||||
clean_up_after_endstop_move();
|
|
||||||
// Z only calibration.
|
|
||||||
// Load the machine correction matrix
|
|
||||||
world2machine_initialize();
|
|
||||||
// and correct the current_position to match the transformed coordinate system.
|
|
||||||
world2machine_update_current();
|
|
||||||
//FIXME
|
|
||||||
bool result = sample_mesh_and_store_reference();
|
|
||||||
if (result) {
|
|
||||||
if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION)
|
|
||||||
// Shipped, the nozzle height has been set already. The user can start printing now.
|
|
||||||
calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
|
|
||||||
// babystep_apply();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Reset the baby step value and the baby step applied flag.
|
|
||||||
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
|
|
||||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
|
||||||
// Complete XYZ calibration.
|
|
||||||
uint8_t point_too_far_mask = 0;
|
|
||||||
BedSkewOffsetDetectionResultType result = find_bed_offset_and_skew(verbosity_level, point_too_far_mask);
|
|
||||||
clean_up_after_endstop_move();
|
|
||||||
// Print head up.
|
|
||||||
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS],current_position[Z_AXIS] , current_position[E_AXIS], homing_feedrate[Z_AXIS]/40, active_extruder);
|
|
||||||
st_synchronize();
|
|
||||||
if (result >= 0) {
|
|
||||||
point_too_far_mask = 0;
|
|
||||||
// Second half: The fine adjustment.
|
|
||||||
// Let the planner use the uncorrected coordinates.
|
|
||||||
mbl.reset();
|
|
||||||
world2machine_reset();
|
|
||||||
// Home in the XY plane.
|
|
||||||
setup_for_endstop_move();
|
|
||||||
home_xy();
|
|
||||||
result = improve_bed_offset_and_skew(1, verbosity_level, point_too_far_mask);
|
|
||||||
clean_up_after_endstop_move();
|
|
||||||
// Print head up.
|
|
||||||
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS],current_position[Z_AXIS] , current_position[E_AXIS], homing_feedrate[Z_AXIS]/40, active_extruder);
|
|
||||||
st_synchronize();
|
|
||||||
// if (result >= 0) babystep_apply();
|
|
||||||
}
|
|
||||||
lcd_bed_calibration_show_result(result, point_too_far_mask);
|
|
||||||
if (result >= 0) {
|
|
||||||
// Calibration valid, the machine should be able to print. Advise the user to run the V2Calibration.gcode.
|
|
||||||
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifdef TMC2130
|
|
||||||
tmc2130_home_exit();
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
// Timeouted.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lcd_update_enable(true);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
case 46:
|
case 46:
|
||||||
@ -5540,37 +5601,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
|||||||
break;
|
break;
|
||||||
case 701: //M701: load filament
|
case 701: //M701: load filament
|
||||||
{
|
{
|
||||||
enable_z();
|
gcode_M701();
|
||||||
custom_message = true;
|
|
||||||
custom_message_type = 2;
|
|
||||||
|
|
||||||
lcd_setstatuspgm(MSG_LOADING_FILAMENT);
|
|
||||||
current_position[E_AXIS] += 70;
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence
|
|
||||||
|
|
||||||
current_position[E_AXIS] += 25;
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
|
|
||||||
st_synchronize();
|
|
||||||
|
|
||||||
if (!farm_mode && loading_flag) {
|
|
||||||
bool clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
|
|
||||||
|
|
||||||
while (!clean) {
|
|
||||||
lcd_update_enable(true);
|
|
||||||
lcd_update(2);
|
|
||||||
current_position[E_AXIS] += 25;
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
|
|
||||||
st_synchronize();
|
|
||||||
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lcd_update_enable(true);
|
|
||||||
lcd_update(2);
|
|
||||||
lcd_setstatuspgm(WELCOME_MSG);
|
|
||||||
disable_z();
|
|
||||||
loading_flag = false;
|
|
||||||
custom_message = false;
|
|
||||||
custom_message_type = 0;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 702:
|
case 702:
|
||||||
|
@ -310,6 +310,11 @@ void enquecommand(const char *cmd, bool from_progmem)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmd_buffer_empty()
|
||||||
|
{
|
||||||
|
return (buflen == 0);
|
||||||
|
}
|
||||||
|
|
||||||
void enquecommand_front(const char *cmd, bool from_progmem)
|
void enquecommand_front(const char *cmd, bool from_progmem)
|
||||||
{
|
{
|
||||||
int len = from_progmem ? strlen_P(cmd) : strlen(cmd);
|
int len = from_progmem ? strlen_P(cmd) : strlen(cmd);
|
||||||
|
@ -59,6 +59,7 @@ extern bool cmdqueue_could_enqueue_back(int len_asked, bool atomic_update = fals
|
|||||||
extern void cmdqueue_dump_to_serial_single_line(int nr, const char *p);
|
extern void cmdqueue_dump_to_serial_single_line(int nr, const char *p);
|
||||||
extern void cmdqueue_dump_to_serial();
|
extern void cmdqueue_dump_to_serial();
|
||||||
#endif /* CMDBUFFER_DEBUG */
|
#endif /* CMDBUFFER_DEBUG */
|
||||||
|
extern bool cmd_buffer_empty();
|
||||||
extern void enquecommand(const char *cmd, bool from_progmem);
|
extern void enquecommand(const char *cmd, bool from_progmem);
|
||||||
extern void enquecommand_front(const char *cmd, bool from_progmem);
|
extern void enquecommand_front(const char *cmd, bool from_progmem);
|
||||||
extern void repeatcommand_front();
|
extern void repeatcommand_front();
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -302,3 +302,27 @@
|
|||||||
#define MSG_EXTRUDER_2 "Extruder 2"
|
#define MSG_EXTRUDER_2 "Extruder 2"
|
||||||
#define MSG_EXTRUDER_3 "Extruder 3"
|
#define MSG_EXTRUDER_3 "Extruder 3"
|
||||||
#define MSG_EXTRUDER_4 "Extruder 4"
|
#define MSG_EXTRUDER_4 "Extruder 4"
|
||||||
|
|
||||||
|
#define MSG_WIZARD "Wizard"
|
||||||
|
#define MSG_WIZARD_WELCOME "Dobry den, jsem vase tiskarna Original Prusa i3. Chcete abych Vas provedla kalibracnim procesem?"
|
||||||
|
#define MSG_WIZARD_QUIT "Wizarda muzete kdykoliv znovu spustit z menu Calibration -> Wizard"
|
||||||
|
#define MSG_WIZARD_SELFTEST "Nejdriv pomoci selftestu zkontoluji nejcastejsi chyby vznikajici pri sestaveni tiskarny."
|
||||||
|
#define MSG_WIZARD_CALIBRATION_FAILED "Prosim nahlednete do manualu a opravte problem. Po te obnovte Wizarda rebootovanim tiskarny."
|
||||||
|
#define MSG_WIZARD_XYZ_CAL "Nyni provedu xyz kalibraci. Zabere to priblizne 12 min."
|
||||||
|
#define MSG_WIZARD_FILAMENT_LOADED "Je filament zaveden?"
|
||||||
|
#define MSG_WIZARD_Z_CAL "Nyni provedu z kalibraci."
|
||||||
|
#define MSG_WIZARD_WILL_PREHEAT "Nyni predehreji trysku pro PLA."
|
||||||
|
#define MSG_WIZARD_V2_CAL "Nyni zkalibruji vzdalenost mezi koncem trysky a povrchem heatbedu."
|
||||||
|
#define MSG_WIZARD_V2_CAL_2 "Zacnu tisknout linku a Vy budete postupne snizovat trysku otacenim tlacitka dokud nedosahnete optimalni vysky. Prohlednete si obrazky v nasi prirucce v kapitole Kalibrace"
|
||||||
|
#define MSG_V2_CALIBRATION "Kal. prvni vrstvy"
|
||||||
|
#define MSG_WIZARD_DONE "Vse je hotovo."
|
||||||
|
#define MSG_WIZARD_LOAD_FILAMENT "Prosim vlozte PLA filament do extruderu, po te stisknete tlacitko pro zavedeni filamentu."
|
||||||
|
#define MSG_WIZARD_RERUN "Spusteni Wizarda vymaze ulozene vysledky vsech kalibraci a spusti kalibracni proces od zacatku. Pokracovat?"
|
||||||
|
#define MSG_WIZARD_REPEAT_V2_CAL "Chcete opakovat posledni krok a pozmenit vzdalenost mezi tryskou a heatbed?"
|
||||||
|
#define MSG_WIZARD_CLEAN_HEATBED "Prosim ocistete heatbed a stisknete tlacitko."
|
||||||
|
#define MSG_WIZARD_PLA_FILAMENT "Je to PLA filament?"
|
||||||
|
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Prosim zavedte PLA filament a po te obnovte Wizarda stisknutim reset tlacitka."
|
||||||
|
#define MSG_PLA_FILAMENT_LOADED "Je PLA filament zaveden?"
|
||||||
|
#define MSG_PLEASE_LOAD_PLA "Nejdrive zavedte PLA filament prosim."
|
||||||
|
#define MSG_WIZARD_HEATING "Predehrivam trysku. Prosim cekejte."
|
||||||
|
#define MSG_M117_V2_CALIBRATION "M117 Kal. prvni vrstvy"
|
@ -315,3 +315,27 @@
|
|||||||
#define MSG_EXTRUDER_2 "Extruder 2"
|
#define MSG_EXTRUDER_2 "Extruder 2"
|
||||||
#define MSG_EXTRUDER_3 "Extruder 3"
|
#define MSG_EXTRUDER_3 "Extruder 3"
|
||||||
#define MSG_EXTRUDER_4 "Extruder 4"
|
#define MSG_EXTRUDER_4 "Extruder 4"
|
||||||
|
|
||||||
|
#define MSG_WIZARD "Wizard"
|
||||||
|
#define MSG_WIZARD_WELCOME "Hallo, ich bin dein Original Prusa i3 Drucker. Moechten Sie meine Hilfe durch den Setup-Prozess?"
|
||||||
|
#define MSG_WIZARD_QUIT "Sie koennen immer den Asistenten im Menu neu aufrufen: Kalibrierung -> Assistant"
|
||||||
|
#define MSG_WIZARD_SELFTEST "Zunaechst fuehre ich den Selbsttest durch um die haeufigsten Probleme bei der Aufbau zu ueberpruefen."
|
||||||
|
#define MSG_WIZARD_CALIBRATION_FAILED "Bitte ueberpruefen Sie unser Handbuch und beheben Sie das Problem. Fahren Sie dann mit dem Assistenten fort, indem Sie den Drucker neu starten."
|
||||||
|
#define MSG_WIZARD_XYZ_CAL "Ich werde jetzt die XYZ-Kalibrierung durchfuehren. Es wird ca. 12 Minuten dauern"
|
||||||
|
#define MSG_WIZARD_FILAMENT_LOADED "Ist das Filament geladen?"
|
||||||
|
#define MSG_WIZARD_Z_CAL "Ich werde jetzt die Z Kalibrierung durchfuehren."
|
||||||
|
#define MSG_WIZARD_WILL_PREHEAT "Jetzt werde ich die Duese fuer PLA vorheizen. "
|
||||||
|
#define MSG_WIZARD_V2_CAL "Jetzt werde ich den Abstand zwischen Duesenspitze und Druckbett kalibrieren."
|
||||||
|
#define MSG_WIZARD_V2_CAL_2 "Ich werde jetzt erste Linie drucken. Waehrend des Druckes koennen Sie die Duese allmaehlich senken indem Sie den Knopf drehen, bis Sie die optimale Hoehe erreichen. Ueberpruefen Sie die Bilder in unserem Handbuch im Kapitel Kalibrierung"
|
||||||
|
#define MSG_V2_CALIBRATION "Erste-Schicht Kal"
|
||||||
|
#define MSG_WIZARD_DONE "Alles wurde getan. Viel Spass beim Drucken!"
|
||||||
|
#define MSG_WIZARD_LOAD_FILAMENT "Fuehren Sie bitte PLA Filament in den Extruder und bestaetigen Sie den Knopf um es zu laden."
|
||||||
|
#define MSG_WIZARD_RERUN "Der laufende Assistent loescht die aktuelle Kalibrierergebnisse und wird von Anfang an beginnen. Fortsetzen?"
|
||||||
|
#define MSG_WIZARD_REPEAT_V2_CAL "Moechten Sie den letzten Schritt wiederholen um den Abstand zwischen Duese und Druckbett neu einzustellen?"
|
||||||
|
#define MSG_WIZARD_CLEAN_HEATBED "Bitte reinigen Sie das Heizbett und druecken Sie dann den Knopf."
|
||||||
|
#define MSG_WIZARD_PLA_FILAMENT "Ist es wirklich PLA Filament?"
|
||||||
|
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Bitte laden Sie PLA-Filament und fahren Sie mit dem Assistenten fort, indem Sie den Drucker neu starten."
|
||||||
|
#define MSG_PLA_FILAMENT_LOADED "Ist PLA Filament geladen?"
|
||||||
|
#define MSG_PLEASE_LOAD_PLA "Bitte laden Sie zuerst PLA Filament."
|
||||||
|
#define MSG_WIZARD_HEATING "Vorheizen der Duese. Bitte warten."
|
||||||
|
#define MSG_M117_V2_CALIBRATION "M117 Erste-Schicht Kal."
|
@ -314,3 +314,40 @@
|
|||||||
#define(length=11, lines=1) MSG_INFO_PRINT_FAN "Print FAN: "
|
#define(length=11, lines=1) MSG_INFO_PRINT_FAN "Print FAN: "
|
||||||
#define(length=11, lines=1) MSG_INFO_FILAMENT_XDIFF "Fil. Xd:"
|
#define(length=11, lines=1) MSG_INFO_FILAMENT_XDIFF "Fil. Xd:"
|
||||||
#define(length=11, lines=1) MSG_INFO_FILAMENT_YDIFF "Fil. Ydiff:"
|
#define(length=11, lines=1) MSG_INFO_FILAMENT_YDIFF "Fil. Ydiff:"
|
||||||
|
|
||||||
|
//Wizard messages which has tranlsations
|
||||||
|
|
||||||
|
#define(length=17, lines=1) MSG_WIZARD "Wizard"
|
||||||
|
#define(length=20, lines=7) MSG_WIZARD_WELCOME "Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"
|
||||||
|
#define(length=20, lines=8) MSG_WIZARD_QUIT "You can always resume the Wizard from Calibration -> Wizard."
|
||||||
|
#define(length=20, lines=8) MSG_WIZARD_SELFTEST "First, I will run the selftest to check most common assembly problems."
|
||||||
|
#define(length=20, lines=8) MSG_WIZARD_CALIBRATION_FAILED "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."
|
||||||
|
#define(length=20, lines=8) MSG_WIZARD_XYZ_CAL "I will run xyz calibration now. It will take approx. 12 mins."
|
||||||
|
#define(length=20, lines=2) MSG_WIZARD_FILAMENT_LOADED "Is filament loaded?"
|
||||||
|
#define(length=20, lines=8) MSG_WIZARD_Z_CAL "I will run z calibration now."
|
||||||
|
#define(length=20, lines=4) MSG_WIZARD_WILL_PREHEAT "Now I will preheat nozzle for PLA."
|
||||||
|
#define(length=20, lines=3) MSG_WIZARD_HEATING "Preheating nozzle. Please wait."
|
||||||
|
#define(lenght=20, lines=8) MSG_WIZARD_V2_CAL "Now I will calibrate distance between tip of the nozzle and heatbed surface."
|
||||||
|
#define(lenght=20, lines=12) MSG_WIZARD_V2_CAL_2 "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration."
|
||||||
|
#define(lenght=17, lines=1) MSG_V2_CALIBRATION "First layer cal."
|
||||||
|
#define(lenght=20, lines=8) MSG_WIZARD_DONE "All is done. Happy printing!"
|
||||||
|
#define(lenght=20, lines=8) MSG_WIZARD_LOAD_FILAMENT "Please insert PLA filament to the extruder, then press knob to load it."
|
||||||
|
#define(lenght=20, lines=7) MSG_WIZARD_RERUN "Running Wizard will delete current calibration results and start from the beginning. Continue?"
|
||||||
|
#define(lenght=20, lines=7) MSG_WIZARD_REPEAT_V2_CAL "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
|
||||||
|
#define(lenght=20, lines=8) MSG_WIZARD_CLEAN_HEATBED "Please clean heatbed and then press the knob."
|
||||||
|
#define(lenght=20, lines=2) MSG_WIZARD_PLA_FILAMENT "Is it PLA filament?"
|
||||||
|
#define(lenght=20, lines=8) MSG_WIZARD_INSERT_CORRECT_FILAMENT "Please load PLA filament and then resume Wizard by rebooting the printer."
|
||||||
|
#define(lenght=20, lines=2) MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?"
|
||||||
|
#define(lenght=20, lines=4) MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
|
||||||
|
#define(length=25, lines=1) MSG_M117_V2_CALIBRATION "M117 First layer cal."
|
||||||
|
//messages bellow has no translation yet
|
||||||
|
|
||||||
|
#define MSG_CRASHDETECT_OFF "Crash det. [off]"
|
||||||
|
#define MSG_CRASHDETECT_ON "Crash det. [on]"
|
||||||
|
#define MSG_FSENSOR_OFF "Fil. sensor [off]"
|
||||||
|
#define MSG_FSENSOR_ON "Fil. sensor [on]"
|
||||||
|
|
||||||
|
#define(length=20, lines=4) MSG_PLACE_STEEL_SHEET "Please place steel sheet on heatbed."
|
||||||
|
#define(length=20, lines=4) MSG_REMOVE_STEEL_SHEET "Please remove steel sheet from heatbed."
|
||||||
|
#define(length=20, lines=2) MSG_CALIBRATE_Z_AUTO "Calibrating Z"
|
||||||
|
#define(length=20, lines=2) MSG_STEEL_SHEET_CHECK "Is steel sheet on heatbed?"
|
||||||
|
@ -296,3 +296,27 @@
|
|||||||
#define MSG_EXTRUDER_2 "Extrusor 2"
|
#define MSG_EXTRUDER_2 "Extrusor 2"
|
||||||
#define MSG_EXTRUDER_3 "Extrusor 3"
|
#define MSG_EXTRUDER_3 "Extrusor 3"
|
||||||
#define MSG_EXTRUDER_4 "Extrusor 4"
|
#define MSG_EXTRUDER_4 "Extrusor 4"
|
||||||
|
|
||||||
|
#define MSG_WIZARD "Wizard"
|
||||||
|
#define MSG_WIZARD_WELCOME "Hola, soy tu impresora Original Prusa i3. Quieres que te guie a traves de la configuracion?"
|
||||||
|
#define MSG_WIZARD_QUIT "Siempre puedes acceder al asistente desde Calibracion -> Wizard"
|
||||||
|
#define MSG_WIZARD_SELFTEST "Primero, hare el Selftest para comprobar los problemas de montaje mas comunes."
|
||||||
|
#define MSG_WIZARD_CALIBRATION_FAILED "Lee el manual y resuelve el problema. Despues, reinicia la impresora y continua con el Wizard"
|
||||||
|
#define MSG_WIZARD_XYZ_CAL "Hare la calibracion XYZ. Tardara 12 min. aproximadamente."
|
||||||
|
#define MSG_WIZARD_FILAMENT_LOADED "Esta el filamento cargado?"
|
||||||
|
#define MSG_WIZARD_Z_CAL "Voy a hacer Calibracion Z ahora."
|
||||||
|
#define MSG_WIZARD_WILL_PREHEAT "Voy a precalentar el nozzle para PLA ahora."
|
||||||
|
#define MSG_WIZARD_V2_CAL "Voy a calibrar la distancia entre la punta del nozzle y la superficie de la heatbed."
|
||||||
|
#define MSG_WIZARD_V2_CAL_2 "Voy a comenzar a imprimir la linea y tu bajaras el nozzle gradualmente al rotar el mando, hasta que llegues a la altura optima. Mira las imagenes del capitulo Calibracion en el manual."
|
||||||
|
#define MSG_V2_CALIBRATION "Cal. primera cap."
|
||||||
|
#define MSG_WIZARD_DONE "Terminado! Feliz impresion!"
|
||||||
|
#define MSG_WIZARD_LOAD_FILAMENT "Inserta, por favor, filamento PLA en el extrusor. Despues haz clic para cargarlo."
|
||||||
|
#define MSG_WIZARD_RERUN "Ejecutar el Wizard borrara los valores de calibracion actuales y comenzara de nuevo. Continuar?"
|
||||||
|
#define MSG_WIZARD_REPEAT_V2_CAL "Quieres repetir el ultimo paso para reajustar la distancia nozzle-heatbed?"
|
||||||
|
#define MSG_WIZARD_CLEAN_HEATBED "Limpia la superficie de la heatbed, por favor, y haz clic"
|
||||||
|
#define MSG_WIZARD_PLA_FILAMENT "Es el filamento PLA?"
|
||||||
|
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Carga filamento PLA, por favor, y reinicia la impresora para continuar con el Wizard"
|
||||||
|
#define MSG_PLA_FILAMENT_LOADED "Esta el filamento PLA cargado?"
|
||||||
|
#define MSG_PLEASE_LOAD_PLA "Carga el filamento PLA primero por favor."
|
||||||
|
#define MSG_WIZARD_HEATING "Precalentando nozzle. Espera por favor."
|
||||||
|
#define MSG_M117_V2_CALIBRATION "M117 Cal. primera cap."
|
@ -287,3 +287,27 @@
|
|||||||
#define MSG_EXTRUDER_2 "Estrusore 2"
|
#define MSG_EXTRUDER_2 "Estrusore 2"
|
||||||
#define MSG_EXTRUDER_3 "Estrusore 3"
|
#define MSG_EXTRUDER_3 "Estrusore 3"
|
||||||
#define MSG_EXTRUDER_4 "Estrusore 4"
|
#define MSG_EXTRUDER_4 "Estrusore 4"
|
||||||
|
|
||||||
|
#define MSG_WIZARD "Wizard"
|
||||||
|
#define MSG_WIZARD_WELCOME "Ciao, sono la tua stampante Original Prusa i3. Gradiresti aiuto attraverso il processo di configurazione?"
|
||||||
|
#define MSG_WIZARD_QUIT "E possibile proseguire la guide Wizard in qualsiasi momento attraverso Calibrazione -> Wizard."
|
||||||
|
#define MSG_WIZARD_SELFTEST "Anzitutto avviero il Self Test per controllare gli errori di assemblaggio piu comuni."
|
||||||
|
#define MSG_WIZARD_CALIBRATION_FAILED "Per favore consulta il nostro manuale per risolvere il problema. Poi riprendi il Wizard dopo aver riavviato la stampante."
|
||||||
|
#define MSG_WIZARD_XYZ_CAL "Adesso avviero una Calibrazione XYZ. Puo durare circa 12 min."
|
||||||
|
#define MSG_WIZARD_FILAMENT_LOADED "Il filamento e stato caricato?"
|
||||||
|
#define MSG_WIZARD_Z_CAL "Adesso avviero una Calibrazione Z."
|
||||||
|
#define MSG_WIZARD_WILL_PREHEAT "Adesso preriscaldero l'ugello per PLA."
|
||||||
|
#define MSG_WIZARD_V2_CAL "Adesso tarero lo stacco fra ugello e superfice del piatto."
|
||||||
|
#define MSG_WIZARD_V2_CAL_2 "Adesso iniziero a stampare una linea e tu dovrai abbassare l'ugello poco per volta ruotando la manopola sino a raggiungere una altezza ottimale. Per favore dai uno sguardo all'immagine del nostro manuale, cap.Calibrazione."
|
||||||
|
#define MSG_V2_CALIBRATION "Cal. primo layer."
|
||||||
|
#define MSG_WIZARD_DONE "Ben fatto. Buona stampa!"
|
||||||
|
#define MSG_WIZARD_LOAD_FILAMENT "Per favore inserisci il filamento di PLA nell'estrusore, poi premi la manopola per caricare."
|
||||||
|
#define MSG_WIZARD_RERUN "Se avvi il Wizard perderai la calibrazione preesistente e dovrai ricominciare dall'inizio. Continuare?"
|
||||||
|
#define MSG_WIZARD_REPEAT_V2_CAL "Desideri ripetere l'ultimo passaggio per migliorare la distanza fra ugello e piatto?"
|
||||||
|
#define MSG_WIZARD_CLEAN_HEATBED "Per favore pulisci il piatto, poi premi la manopola."
|
||||||
|
#define MSG_WIZARD_PLA_FILAMENT "E questo un filamento di PLA?"
|
||||||
|
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Per favore carica filamento di PLA e riprendi il Wizard dopo aver riavviato la stampante."
|
||||||
|
#define MSG_PLA_FILAMENT_LOADED "Il PLA e stato caricato?"
|
||||||
|
#define MSG_PLEASE_LOAD_PLA "Per favore prima caricare filamento di PLA."
|
||||||
|
#define MSG_WIZARD_HEATING "Sto preriscaldando l'ugello. Per favore attendi."
|
||||||
|
#define MSG_M117_V2_CALIBRATION "M117 Cal. primo layer."
|
@ -299,3 +299,27 @@
|
|||||||
#define MSG_EXTRUDER_2 "Ekstruder 2"
|
#define MSG_EXTRUDER_2 "Ekstruder 2"
|
||||||
#define MSG_EXTRUDER_3 "Ekstruder 3"
|
#define MSG_EXTRUDER_3 "Ekstruder 3"
|
||||||
#define MSG_EXTRUDER_4 "Ekstruder 4"
|
#define MSG_EXTRUDER_4 "Ekstruder 4"
|
||||||
|
|
||||||
|
#define MSG_WIZARD "Wizard"
|
||||||
|
#define MSG_WIZARD_WELCOME "Czesc, jestem Twoja drukarka Original Prusa i3. Czy potrzebujesz pomocy z instalacja?"
|
||||||
|
#define MSG_WIZARD_QUIT "Zawsze mozesz przywrocic Wizard przez Kalibracja -> Wizard."
|
||||||
|
#define MSG_WIZARD_SELFTEST "Najpierw wlacze autotest w celu kontrolli najczestszych problemow z montazem."
|
||||||
|
#define MSG_WIZARD_CALIBRATION_FAILED "Prosze sprawdz nasz poradnik i napraw problem. Potem przywroc Wizard restartujac drukarke."
|
||||||
|
#define MSG_WIZARD_XYZ_CAL "Wlaczam kalibracje xyz. Zajmie to ok. 12 min."
|
||||||
|
#define MSG_WIZARD_FILAMENT_LOADED "Filament jest zaladowany?"
|
||||||
|
#define MSG_WIZARD_Z_CAL "Wlaczam kalibracje z."
|
||||||
|
#define MSG_WIZARD_WILL_PREHEAT "Nagrzewam dysze dla PLA."
|
||||||
|
#define MSG_WIZARD_V2_CAL "Kalibruje odleglosc miedzy koncowka dyszy a stolikiem."
|
||||||
|
#define MSG_WIZARD_V2_CAL_2 "Zaczne drukowac linie. Stopniowo opuszczaj dysze przekrecajac guzik, poki nie uzyskasz optymalnej wysokosci. Sprawdz obrazki w naszym poradniku w rozdz. Kalibracja"
|
||||||
|
#define MSG_V2_CALIBRATION "Kal. 1. warstwy"
|
||||||
|
#define MSG_WIZARD_DONE "Gotowe. Udanego druku!"
|
||||||
|
#define MSG_WIZARD_LOAD_FILAMENT "Prosze umiesc filament PLA w ekstruderze i nacisnij przycisk by zaladowac."
|
||||||
|
#define MSG_WIZARD_RERUN "Wlaczenie Wizard usunie obecne dane kalibracyjne i zacznie od nowa. Kontynuowac?"
|
||||||
|
#define MSG_WIZARD_REPEAT_V2_CAL "Chcesz powtorzyc ostatni krok i przestawic odleglosc miedzy dysza a stolikiem?"
|
||||||
|
#define MSG_WIZARD_CLEAN_HEATBED "Prosze oczysc stolik i nacisnij guzik."
|
||||||
|
#define MSG_WIZARD_PLA_FILAMENT "Czy to filament PLA?"
|
||||||
|
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Prosze zaladuj filament PLA i przywroc Wizard przez restart drukarki."
|
||||||
|
#define MSG_PLA_FILAMENT_LOADED "Fialment PLA jest zaladowany?"
|
||||||
|
#define MSG_PLEASE_LOAD_PLA "Prosze, najpierw zaladuj filament PLA."
|
||||||
|
#define MSG_WIZARD_HEATING "Nagrzewanie dyszy. Prosze czekac."
|
||||||
|
#define MSG_M117_V2_CALIBRATION "M117 Kal. 1. warstwy"
|
@ -2294,6 +2294,13 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
|
|||||||
}
|
}
|
||||||
#endif // SUPPORT_VERBOSITY
|
#endif // SUPPORT_VERBOSITY
|
||||||
|
|
||||||
|
//make space
|
||||||
|
current_position[Z_AXIS] += 150;
|
||||||
|
go_to_current(homing_feedrate[Z_AXIS] / 60);
|
||||||
|
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate, active_extruder););
|
||||||
|
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_PLACE_STEEL_SHEET);
|
||||||
|
|
||||||
// Sample Z heights for the mesh bed leveling.
|
// Sample Z heights for the mesh bed leveling.
|
||||||
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
|
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
|
||||||
if (! sample_mesh_and_store_reference())
|
if (! sample_mesh_and_store_reference())
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "mesh_bed_leveling.h"
|
#include "mesh_bed_leveling.h"
|
||||||
//#include "Configuration.h"
|
//#include "Configuration.h"
|
||||||
|
#include "cmdqueue.h"
|
||||||
|
|
||||||
#include "SdFatUtil.h"
|
#include "SdFatUtil.h"
|
||||||
|
|
||||||
@ -625,6 +626,504 @@ void lcd_commands()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SNMM
|
||||||
|
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
||||||
|
{
|
||||||
|
char cmd1[30];
|
||||||
|
float width = 0.4;
|
||||||
|
float length = 20 - width;
|
||||||
|
float extr = count_e(0.2, width, length);
|
||||||
|
float extr_short_segment = count_e(0.2, width, width);
|
||||||
|
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
if (lcd_commands_step == 0)
|
||||||
|
{
|
||||||
|
lcd_commands_step = 10;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 10 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
enquecommand_P(PSTR("M107"));
|
||||||
|
enquecommand_P(PSTR("M104 S210"));
|
||||||
|
enquecommand_P(PSTR("M140 S55"));
|
||||||
|
enquecommand_P(PSTR("M190 S55"));
|
||||||
|
enquecommand_P(PSTR("M109 S210"));
|
||||||
|
enquecommand_P(PSTR("T0"));
|
||||||
|
enquecommand_P(MSG_M117_V2_CALIBRATION);
|
||||||
|
enquecommand_P(PSTR("G87")); //sets calibration status
|
||||||
|
enquecommand_P(PSTR("G28"));
|
||||||
|
enquecommand_P(PSTR("G21")); //set units to millimeters
|
||||||
|
enquecommand_P(PSTR("G90")); //use absolute coordinates
|
||||||
|
enquecommand_P(PSTR("M83")); //use relative distances for extrusion
|
||||||
|
enquecommand_P(PSTR("G92 E0"));
|
||||||
|
enquecommand_P(PSTR("M203 E100"));
|
||||||
|
enquecommand_P(PSTR("M92 E140"));
|
||||||
|
lcd_commands_step = 9;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 9 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
enquecommand_P(PSTR("G1 Z0.250 F7200.000"));
|
||||||
|
enquecommand_P(PSTR("G1 X50.0 E80.0 F1000.0"));
|
||||||
|
enquecommand_P(PSTR("G1 X160.0 E20.0 F1000.0"));
|
||||||
|
enquecommand_P(PSTR("G1 Z0.200 F7200.000"));
|
||||||
|
enquecommand_P(PSTR("G1 X220.0 E13 F1000.0"));
|
||||||
|
enquecommand_P(PSTR("G1 X240.0 E0 F1000.0"));
|
||||||
|
enquecommand_P(PSTR("G92 E0.0"));
|
||||||
|
enquecommand_P(PSTR("G21"));
|
||||||
|
enquecommand_P(PSTR("G90"));
|
||||||
|
enquecommand_P(PSTR("M83"));
|
||||||
|
enquecommand_P(PSTR("G1 E-4 F2100.00000"));
|
||||||
|
enquecommand_P(PSTR("G1 Z0.150 F7200.000"));
|
||||||
|
enquecommand_P(PSTR("M204 S1000"));
|
||||||
|
enquecommand_P(PSTR("G1 F4000"));
|
||||||
|
|
||||||
|
lcd_implementation_clear();
|
||||||
|
lcd_goto_menu(lcd_babystep_z, 0, false);
|
||||||
|
|
||||||
|
|
||||||
|
lcd_commands_step = 8;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 8 && !blocks_queued() && cmd_buffer_empty()) //draw meander
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
|
||||||
|
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y155"));
|
||||||
|
enquecommand_P(PSTR("G1 X60 Y155 E4"));
|
||||||
|
enquecommand_P(PSTR("G1 F1080"));
|
||||||
|
enquecommand_P(PSTR("G1 X75 Y155 E2.5"));
|
||||||
|
enquecommand_P(PSTR("G1 X100 Y155 E2"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y155 E2.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y135 E0.66174"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y135 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y115 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y115 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y95 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y95 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y75 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y75 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y55 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y55 E3.62773"));
|
||||||
|
|
||||||
|
lcd_commands_step = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 7 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
strcpy(cmd1, "G1 X50 Y35 E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 6 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 4; i < 8; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 5 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 8; i < 12; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 4 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 12; i < 16; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 3 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
enquecommand_P(PSTR("G1 E-0.07500 F2100.00000"));
|
||||||
|
enquecommand_P(PSTR("G4 S0"));
|
||||||
|
enquecommand_P(PSTR("G1 E-4 F2100.00000"));
|
||||||
|
enquecommand_P(PSTR("G1 Z0.5 F7200.000"));
|
||||||
|
enquecommand_P(PSTR("G1 X245 Y1"));
|
||||||
|
enquecommand_P(PSTR("G1 X240 E4"));
|
||||||
|
enquecommand_P(PSTR("G1 F4000"));
|
||||||
|
enquecommand_P(PSTR("G1 X190 E2.7"));
|
||||||
|
enquecommand_P(PSTR("G1 F4600"));
|
||||||
|
enquecommand_P(PSTR("G1 X110 E2.8"));
|
||||||
|
enquecommand_P(PSTR("G1 F5200"));
|
||||||
|
enquecommand_P(PSTR("G1 X40 E3"));
|
||||||
|
enquecommand_P(PSTR("G1 E-15.0000 F5000"));
|
||||||
|
enquecommand_P(PSTR("G1 E-50.0000 F5400"));
|
||||||
|
enquecommand_P(PSTR("G1 E-15.0000 F3000"));
|
||||||
|
enquecommand_P(PSTR("G1 E-12.0000 F2000"));
|
||||||
|
enquecommand_P(PSTR("G1 F1600"));
|
||||||
|
|
||||||
|
lcd_commands_step = 2;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 2 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
|
||||||
|
enquecommand_P(PSTR("G1 X0 Y1 E3.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y1 E-5.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 F2000"));
|
||||||
|
enquecommand_P(PSTR("G1 X0 Y1 E5.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y1 E-5.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 F2400"));
|
||||||
|
enquecommand_P(PSTR("G1 X0 Y1 E5.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y1 E - 5.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 F2400"));
|
||||||
|
enquecommand_P(PSTR("G1 X0 Y1 E5.0000"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y1 E-3.0000"));
|
||||||
|
enquecommand_P(PSTR("G4 S0"));
|
||||||
|
enquecommand_P(PSTR("M107"));
|
||||||
|
enquecommand_P(PSTR("M104 S0"));
|
||||||
|
enquecommand_P(PSTR("M140 S0"));
|
||||||
|
enquecommand_P(PSTR("G1 X10 Y180 F4000"));
|
||||||
|
enquecommand_P(PSTR("G1 Z10 F1300.000"));
|
||||||
|
enquecommand_P(PSTR("M84"));
|
||||||
|
|
||||||
|
lcd_commands_step = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 1 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_setstatuspgm(WELCOME_MSG);
|
||||||
|
lcd_commands_step = 0;
|
||||||
|
lcd_commands_type = 0;
|
||||||
|
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 1) {
|
||||||
|
lcd_wizard(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#else //if not SNMM
|
||||||
|
|
||||||
|
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
||||||
|
{
|
||||||
|
char cmd1[30];
|
||||||
|
float width = 0.4;
|
||||||
|
float length = 20 - width;
|
||||||
|
float extr = count_e(0.2, width, length);
|
||||||
|
float extr_short_segment = count_e(0.2, width, width);
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
if (lcd_commands_step == 0)
|
||||||
|
{
|
||||||
|
lcd_commands_step = 9;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 9 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
enquecommand_P(PSTR("M107"));
|
||||||
|
enquecommand_P(PSTR("M104 S210"));
|
||||||
|
enquecommand_P(PSTR("M140 S55"));
|
||||||
|
enquecommand_P(PSTR("M190 S55"));
|
||||||
|
enquecommand_P(PSTR("M109 S210"));
|
||||||
|
enquecommand_P(MSG_M117_V2_CALIBRATION);
|
||||||
|
enquecommand_P(PSTR("G87")); //sets calibration status
|
||||||
|
enquecommand_P(PSTR("G28"));
|
||||||
|
enquecommand_P(PSTR("G92 E0.0"));
|
||||||
|
lcd_commands_step = 8;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 8 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
|
||||||
|
lcd_implementation_clear();
|
||||||
|
lcd_goto_menu(lcd_babystep_z, 0, false);
|
||||||
|
enquecommand_P(PSTR("G1 X60.0 E9.0 F1000.0")); //intro line
|
||||||
|
enquecommand_P(PSTR("G1 X100.0 E12.5 F1000.0")); //intro line
|
||||||
|
enquecommand_P(PSTR("G92 E0.0"));
|
||||||
|
enquecommand_P(PSTR("G21")); //set units to millimeters
|
||||||
|
enquecommand_P(PSTR("G90")); //use absolute coordinates
|
||||||
|
enquecommand_P(PSTR("M83")); //use relative distances for extrusion
|
||||||
|
enquecommand_P(PSTR("G1 E-1.50000 F2100.00000"));
|
||||||
|
enquecommand_P(PSTR("G1 Z0.150 F7200.000"));
|
||||||
|
enquecommand_P(PSTR("M204 S1000")); //set acceleration
|
||||||
|
enquecommand_P(PSTR("G1 F4000"));
|
||||||
|
lcd_commands_step = 7;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 7 && !blocks_queued() && cmd_buffer_empty()) //draw meander
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
|
||||||
|
|
||||||
|
//just opposite direction
|
||||||
|
/*enquecommand_P(PSTR("G1 X50 Y55"));
|
||||||
|
enquecommand_P(PSTR("G1 F1080"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y55 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y75 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y75 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y95 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y95 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y115 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y115 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y135 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y135 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y155 E0.66174"));
|
||||||
|
enquecommand_P(PSTR("G1 X100 Y155 E2.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X75 Y155 E2"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y155 E2.5"));
|
||||||
|
enquecommand_P(PSTR("G1 E - 0.07500 F2100.00000"));*/
|
||||||
|
|
||||||
|
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y155"));
|
||||||
|
enquecommand_P(PSTR("G1 F1080"));
|
||||||
|
enquecommand_P(PSTR("G1 X75 Y155 E2.5"));
|
||||||
|
enquecommand_P(PSTR("G1 X100 Y155 E2"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y155 E2.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y135 E0.66174"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y135 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y115 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y115 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y95 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y95 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y75 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y75 E3.62773"));
|
||||||
|
enquecommand_P(PSTR("G1 X200 Y55 E0.49386"));
|
||||||
|
enquecommand_P(PSTR("G1 X50 Y55 E3.62773"));
|
||||||
|
|
||||||
|
lcd_commands_step = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 6 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
strcpy(cmd1, "G1 X50 Y35 E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 5 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 4; i < 8; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 4 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 8; i < 12; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 3 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 12; i < 16; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 2 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
enquecommand_P(PSTR("G1 E-0.07500 F2100.00000"));
|
||||||
|
enquecommand_P(PSTR("M107")); //turn off printer fan
|
||||||
|
enquecommand_P(PSTR("M104 S0")); // turn off temperature
|
||||||
|
enquecommand_P(PSTR("M140 S0")); // turn off heatbed
|
||||||
|
enquecommand_P(PSTR("G1 Z10 F1300.000"));
|
||||||
|
enquecommand_P(PSTR("G1 X10 Y180 F4000")); //home X axis
|
||||||
|
enquecommand_P(PSTR("M84"));// disable motors
|
||||||
|
lcd_commands_step = 1;
|
||||||
|
}
|
||||||
|
if (lcd_commands_step == 1 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_setstatuspgm(WELCOME_MSG);
|
||||||
|
lcd_commands_step = 0;
|
||||||
|
lcd_commands_type = 0;
|
||||||
|
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 1) {
|
||||||
|
lcd_wizard(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // not SNMM
|
||||||
|
|
||||||
if (lcd_commands_type == LCD_COMMAND_STOP_PRINT) /// stop print
|
if (lcd_commands_type == LCD_COMMAND_STOP_PRINT) /// stop print
|
||||||
{
|
{
|
||||||
uint8_t stopped_extruder;
|
uint8_t stopped_extruder;
|
||||||
@ -811,6 +1310,12 @@ void lcd_commands()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length) {
|
||||||
|
//returns filament length in mm which needs to be extrude to form line with extrusion_length * extrusion_width * layer heigth dimensions
|
||||||
|
float extr = extrusion_length * layer_heigth * extrusion_width / (M_PI * pow(1.75, 2) / 4);
|
||||||
|
return extr;
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_return_to_status() {
|
static void lcd_return_to_status() {
|
||||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||||
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
||||||
@ -1860,7 +2365,7 @@ void lcd_adjust_z() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_wait_for_cool_down() {
|
/*void lcd_wait_for_cool_down() {
|
||||||
lcd_set_custom_characters_degree();
|
lcd_set_custom_characters_degree();
|
||||||
while ((degHotend(0)>MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) {
|
while ((degHotend(0)>MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) {
|
||||||
lcd_display_message_fullscreen_P(MSG_WAITING_TEMP);
|
lcd_display_message_fullscreen_P(MSG_WAITING_TEMP);
|
||||||
@ -1880,11 +2385,13 @@ void lcd_wait_for_cool_down() {
|
|||||||
delay_keep_alive(1000);
|
delay_keep_alive(1000);
|
||||||
}
|
}
|
||||||
lcd_set_custom_characters_arrows();
|
lcd_set_custom_characters_arrows();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Lets the user move the Z carriage up to the end stoppers.
|
// Lets the user move the Z carriage up to the end stoppers.
|
||||||
// When done, it sets the current Z to Z_MAX_POS and returns true.
|
// When done, it sets the current Z to Z_MAX_POS and returns true.
|
||||||
// Otherwise the Z calibration is not changed and false is returned.
|
// Otherwise the Z calibration is not changed and false is returned.
|
||||||
|
|
||||||
|
#ifndef TMC2130
|
||||||
bool lcd_calibrate_z_end_stop_manual(bool only_z)
|
bool lcd_calibrate_z_end_stop_manual(bool only_z)
|
||||||
{
|
{
|
||||||
bool clean_nozzle_asked = false;
|
bool clean_nozzle_asked = false;
|
||||||
@ -1976,6 +2483,8 @@ canceled:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // TMC2130
|
||||||
|
|
||||||
static inline bool pgm_is_whitespace(const char *c_addr)
|
static inline bool pgm_is_whitespace(const char *c_addr)
|
||||||
{
|
{
|
||||||
const char c = pgm_read_byte(c_addr);
|
const char c = pgm_read_byte(c_addr);
|
||||||
@ -2049,9 +2558,14 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg)
|
|||||||
{
|
{
|
||||||
const char *msg_next = lcd_display_message_fullscreen_P(msg);
|
const char *msg_next = lcd_display_message_fullscreen_P(msg);
|
||||||
bool multi_screen = msg_next != NULL;
|
bool multi_screen = msg_next != NULL;
|
||||||
|
lcd_set_custom_characters_nextpage();
|
||||||
// Until confirmed by a button click.
|
// Until confirmed by a button click.
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
if (!multi_screen) {
|
||||||
|
lcd.setCursor(19, 3);
|
||||||
|
// Display the confirm char.
|
||||||
|
lcd.print(char(2));
|
||||||
|
}
|
||||||
// Wait for 5 seconds before displaying the next text.
|
// Wait for 5 seconds before displaying the next text.
|
||||||
for (uint8_t i = 0; i < 100; ++ i) {
|
for (uint8_t i = 0; i < 100; ++ i) {
|
||||||
delay_keep_alive(50);
|
delay_keep_alive(50);
|
||||||
@ -2059,6 +2573,9 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg)
|
|||||||
while (lcd_clicked()) ;
|
while (lcd_clicked()) ;
|
||||||
delay(10);
|
delay(10);
|
||||||
while (lcd_clicked()) ;
|
while (lcd_clicked()) ;
|
||||||
|
lcd_set_custom_characters();
|
||||||
|
lcd_update_enable(true);
|
||||||
|
lcd_update(2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2066,6 +2583,12 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg)
|
|||||||
if (msg_next == NULL)
|
if (msg_next == NULL)
|
||||||
msg_next = msg;
|
msg_next = msg;
|
||||||
msg_next = lcd_display_message_fullscreen_P(msg_next);
|
msg_next = lcd_display_message_fullscreen_P(msg_next);
|
||||||
|
if (msg_next == NULL) {
|
||||||
|
|
||||||
|
lcd.setCursor(19, 3);
|
||||||
|
// Display the confirm char.
|
||||||
|
lcd.print(char(2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2084,6 +2607,76 @@ void lcd_wait_for_click()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting, bool default_yes) //currently just max. n*4 + 3 lines supported (set in language header files)
|
||||||
|
{
|
||||||
|
const char *msg_next = lcd_display_message_fullscreen_P(msg);
|
||||||
|
bool multi_screen = msg_next != NULL;
|
||||||
|
bool yes = default_yes ? true : false;
|
||||||
|
|
||||||
|
// Wait for user confirmation or a timeout.
|
||||||
|
unsigned long previous_millis_cmd = millis();
|
||||||
|
int8_t enc_dif = encoderDiff;
|
||||||
|
//KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||||
|
for (;;) {
|
||||||
|
for (uint8_t i = 0; i < 100; ++i) {
|
||||||
|
delay_keep_alive(50);
|
||||||
|
if (allow_timeouting && millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS)
|
||||||
|
return -1;
|
||||||
|
manage_heater();
|
||||||
|
manage_inactivity(true);
|
||||||
|
|
||||||
|
if (abs(enc_dif - encoderDiff) > 4) {
|
||||||
|
if (msg_next == NULL) {
|
||||||
|
lcd.setCursor(0, 3);
|
||||||
|
if (enc_dif < encoderDiff && yes) {
|
||||||
|
lcd_printPGM((PSTR(" ")));
|
||||||
|
lcd.setCursor(7, 3);
|
||||||
|
lcd_printPGM((PSTR(">")));
|
||||||
|
yes = false;
|
||||||
|
}
|
||||||
|
else if (enc_dif > encoderDiff && !yes) {
|
||||||
|
lcd_printPGM((PSTR(">")));
|
||||||
|
lcd.setCursor(7, 3);
|
||||||
|
lcd_printPGM((PSTR(" ")));
|
||||||
|
yes = true;
|
||||||
|
}
|
||||||
|
enc_dif = encoderDiff;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break; //turning knob skips waiting loop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lcd_clicked()) {
|
||||||
|
while (lcd_clicked());
|
||||||
|
delay(10);
|
||||||
|
while (lcd_clicked());
|
||||||
|
if (msg_next == NULL) {
|
||||||
|
//KEEPALIVE_STATE(IN_HANDLER);
|
||||||
|
lcd_set_custom_characters();
|
||||||
|
return yes;
|
||||||
|
}
|
||||||
|
else break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (multi_screen) {
|
||||||
|
if (msg_next == NULL) {
|
||||||
|
msg_next = msg;
|
||||||
|
}
|
||||||
|
msg_next = lcd_display_message_fullscreen_P(msg_next);
|
||||||
|
}
|
||||||
|
if (msg_next == NULL) {
|
||||||
|
lcd.setCursor(0, 3);
|
||||||
|
if (yes) lcd_printPGM(PSTR(">"));
|
||||||
|
lcd.setCursor(1, 3);
|
||||||
|
lcd_printPGM(MSG_YES);
|
||||||
|
lcd.setCursor(7, 3);
|
||||||
|
if (!yes) lcd_printPGM(PSTR(">"));
|
||||||
|
lcd.setCursor(8, 3);
|
||||||
|
lcd_printPGM(MSG_NO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting, bool default_yes)
|
int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting, bool default_yes)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -2798,6 +3391,206 @@ void lcd_toshiba_flash_air_compatibility_toggle()
|
|||||||
eeprom_update_byte((uint8_t*)EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY, card.ToshibaFlashAir_isEnabled());
|
eeprom_update_byte((uint8_t*)EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY, card.ToshibaFlashAir_isEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lcd_v2_calibration() {
|
||||||
|
bool loaded = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_PLA_FILAMENT_LOADED, false, true);
|
||||||
|
if (loaded) {
|
||||||
|
lcd_commands_type = LCD_COMMAND_V2_CAL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lcd_display_message_fullscreen_P(MSG_PLEASE_LOAD_PLA);
|
||||||
|
for (int i = 0; i < 20; i++) { //wait max. 2s
|
||||||
|
delay_keep_alive(100);
|
||||||
|
if (lcd_clicked()) {
|
||||||
|
while (lcd_clicked());
|
||||||
|
delay(10);
|
||||||
|
while (lcd_clicked());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lcd_return_to_status();
|
||||||
|
lcd_update_enable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_wizard() {
|
||||||
|
bool result = true;
|
||||||
|
if (calibration_status() != CALIBRATION_STATUS_ASSEMBLED) {
|
||||||
|
result = lcd_show_multiscreen_message_yes_no_and_wait_P(MSG_WIZARD_RERUN, true, false);
|
||||||
|
}
|
||||||
|
if (result) {
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
|
||||||
|
lcd_wizard(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lcd_return_to_status();
|
||||||
|
lcd_update_enable(true);
|
||||||
|
lcd_update(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_wizard(int state) {
|
||||||
|
|
||||||
|
bool end = false;
|
||||||
|
int wizard_event;
|
||||||
|
const char *msg = NULL;
|
||||||
|
while (!end) {
|
||||||
|
switch (state) {
|
||||||
|
case 0: // run wizard?
|
||||||
|
wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(MSG_WIZARD_WELCOME, false, true);
|
||||||
|
if (wizard_event) {
|
||||||
|
state = 1;
|
||||||
|
eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0);
|
||||||
|
end = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1: // restore calibration status
|
||||||
|
switch (calibration_status()) {
|
||||||
|
case CALIBRATION_STATUS_ASSEMBLED: state = 2; break; //run selftest
|
||||||
|
case CALIBRATION_STATUS_XYZ_CALIBRATION: state = 3; break; //run xyz cal.
|
||||||
|
case CALIBRATION_STATUS_Z_CALIBRATION: state = 4; break; //run z cal.
|
||||||
|
case CALIBRATION_STATUS_LIVE_ADJUST: state = 5; break; //run live adjust
|
||||||
|
case CALIBRATION_STATUS_CALIBRATED: end = true; eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0); break;
|
||||||
|
default: state = 2; break; //if calibration status is unknown, run wizard from the beginning
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2: //selftest
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_SELFTEST);
|
||||||
|
wizard_event = lcd_selftest();
|
||||||
|
if (wizard_event) {
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_XYZ_CALIBRATION);
|
||||||
|
state = 3;
|
||||||
|
}
|
||||||
|
else end = true;
|
||||||
|
break;
|
||||||
|
case 3: //xyz cal.
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_XYZ_CAL);
|
||||||
|
wizard_event = gcode_M45(false);
|
||||||
|
if (wizard_event) state = 5;
|
||||||
|
else end = true;
|
||||||
|
break;
|
||||||
|
case 4: //z cal.
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_Z_CAL);
|
||||||
|
wizard_event = gcode_M45(true);
|
||||||
|
if (wizard_event) state = 11; //shipped, no need to set first layer, go to final message directly
|
||||||
|
else end = true;
|
||||||
|
break;
|
||||||
|
case 5: //is filament loaded?
|
||||||
|
//start to preheat nozzle and bed to save some time later
|
||||||
|
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0);
|
||||||
|
setTargetBed(PLA_PREHEAT_HPB_TEMP);
|
||||||
|
wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_WIZARD_FILAMENT_LOADED, false);
|
||||||
|
if (wizard_event) state = 8;
|
||||||
|
else state = 6;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 6: //waiting for preheat nozzle for PLA;
|
||||||
|
#ifndef SNMM
|
||||||
|
lcd_display_message_fullscreen_P(MSG_WIZARD_WILL_PREHEAT);
|
||||||
|
current_position[Z_AXIS] = 100; //move in z axis to make space for loading filament
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 60, active_extruder);
|
||||||
|
delay_keep_alive(2000);
|
||||||
|
lcd_display_message_fullscreen_P(MSG_WIZARD_HEATING);
|
||||||
|
while (abs(degHotend(0) - PLA_PREHEAT_HOTEND_TEMP) > 3) {
|
||||||
|
lcd_display_message_fullscreen_P(MSG_WIZARD_HEATING);
|
||||||
|
|
||||||
|
lcd.setCursor(0, 4);
|
||||||
|
lcd.print(LCD_STR_THERMOMETER[0]);
|
||||||
|
lcd.print(ftostr3(degHotend(0)));
|
||||||
|
lcd.print("/");
|
||||||
|
lcd.print(PLA_PREHEAT_HOTEND_TEMP);
|
||||||
|
lcd.print(LCD_STR_DEGREE);
|
||||||
|
lcd_set_custom_characters();
|
||||||
|
delay_keep_alive(1000);
|
||||||
|
}
|
||||||
|
#endif //not SNMM
|
||||||
|
state = 7;
|
||||||
|
break;
|
||||||
|
case 7: //load filament
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_LOAD_FILAMENT);
|
||||||
|
lcd_implementation_clear();
|
||||||
|
lcd_print_at_PGM(0, 2, MSG_LOADING_FILAMENT);
|
||||||
|
loading_flag = true;
|
||||||
|
#ifdef SNMM
|
||||||
|
change_extr(0);
|
||||||
|
#endif
|
||||||
|
gcode_M701();
|
||||||
|
state = 9;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_WIZARD_PLA_FILAMENT, false, true);
|
||||||
|
if (wizard_event) state = 9;
|
||||||
|
else end = true;
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_V2_CAL);
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_V2_CAL_2);
|
||||||
|
lcd_commands_type = LCD_COMMAND_V2_CAL;
|
||||||
|
end = true;
|
||||||
|
break;
|
||||||
|
case 10: //repeat first layer cal.?
|
||||||
|
wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(MSG_WIZARD_REPEAT_V2_CAL, false);
|
||||||
|
if (wizard_event) {
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_CLEAN_HEATBED);
|
||||||
|
state = 9;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
state = 11;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 11: //we are finished
|
||||||
|
eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0);
|
||||||
|
end = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SERIAL_ECHOPGM("State: ");
|
||||||
|
MYSERIAL.println(state);
|
||||||
|
switch (state) { //final message
|
||||||
|
case 0: //user dont want to use wizard
|
||||||
|
msg = MSG_WIZARD_QUIT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: //printer was already calibrated
|
||||||
|
msg = MSG_WIZARD_DONE;
|
||||||
|
break;
|
||||||
|
case 2: //selftest
|
||||||
|
msg = MSG_WIZARD_CALIBRATION_FAILED;
|
||||||
|
break;
|
||||||
|
case 3: //xyz cal.
|
||||||
|
msg = MSG_WIZARD_CALIBRATION_FAILED;
|
||||||
|
break;
|
||||||
|
case 4: //z cal.
|
||||||
|
msg = MSG_WIZARD_CALIBRATION_FAILED;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
msg = MSG_WIZARD_INSERT_CORRECT_FILAMENT;
|
||||||
|
break;
|
||||||
|
case 9: break; //exit wizard for v2 calibration, which is implemted in lcd_commands (we need lcd_update running)
|
||||||
|
case 11: //we are finished
|
||||||
|
|
||||||
|
msg = MSG_WIZARD_DONE;
|
||||||
|
lcd_reset_alert_level();
|
||||||
|
lcd_setstatuspgm(WELCOME_MSG);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
msg = MSG_WIZARD_QUIT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (state != 9) lcd_show_fullscreen_message_and_wait_P(msg);
|
||||||
|
lcd_update_enable(true);
|
||||||
|
lcd_return_to_status();
|
||||||
|
lcd_update(2);
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_crash_menu()
|
static void lcd_crash_menu()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -2866,6 +3659,7 @@ static void lcd_calibration_menu()
|
|||||||
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
|
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
|
||||||
if (!isPrintPaused)
|
if (!isPrintPaused)
|
||||||
{
|
{
|
||||||
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28 W"));
|
||||||
MENU_ITEM(function, MSG_SELFTEST, lcd_selftest);
|
MENU_ITEM(function, MSG_SELFTEST, lcd_selftest);
|
||||||
#ifdef MK1BP
|
#ifdef MK1BP
|
||||||
// MK1
|
// MK1
|
||||||
@ -2876,14 +3670,15 @@ static void lcd_calibration_menu()
|
|||||||
MENU_ITEM(function, MSG_CALIBRATE_BED, lcd_mesh_calibration);
|
MENU_ITEM(function, MSG_CALIBRATE_BED, lcd_mesh_calibration);
|
||||||
// "Calibrate Z" with storing the reference values to EEPROM.
|
// "Calibrate Z" with storing the reference values to EEPROM.
|
||||||
MENU_ITEM(submenu, MSG_HOMEYZ, lcd_mesh_calibration_z);
|
MENU_ITEM(submenu, MSG_HOMEYZ, lcd_mesh_calibration_z);
|
||||||
|
MENU_ITEM(submenu, MSG_V2_CALIBRATION, lcd_v2_calibration);
|
||||||
|
|
||||||
#ifndef SNMM
|
#ifndef SNMM
|
||||||
//MENU_ITEM(function, MSG_CALIBRATE_E, lcd_calibrate_extruder);
|
//MENU_ITEM(function, MSG_CALIBRATE_E, lcd_calibrate_extruder);
|
||||||
#endif
|
#endif
|
||||||
// "Mesh Bed Leveling"
|
// "Mesh Bed Leveling"
|
||||||
MENU_ITEM(submenu, MSG_MESH_BED_LEVELING, lcd_mesh_bedleveling);
|
MENU_ITEM(submenu, MSG_MESH_BED_LEVELING, lcd_mesh_bedleveling);
|
||||||
|
MENU_ITEM(function, MSG_WIZARD, lcd_wizard);
|
||||||
#endif //MK1BP
|
#endif //MK1BP
|
||||||
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28 W"));
|
|
||||||
MENU_ITEM(submenu, MSG_BED_CORRECTION_MENU, lcd_adjust_bed);
|
MENU_ITEM(submenu, MSG_BED_CORRECTION_MENU, lcd_adjust_bed);
|
||||||
#ifndef MK1BP
|
#ifndef MK1BP
|
||||||
MENU_ITEM(submenu, MSG_CALIBRATION_PINDA_MENU, lcd_pinda_calibration_menu);
|
MENU_ITEM(submenu, MSG_CALIBRATION_PINDA_MENU, lcd_pinda_calibration_menu);
|
||||||
@ -4483,7 +5278,7 @@ menu_edit_type(float, float51, ftostr51, 10)
|
|||||||
menu_edit_type(float, float52, ftostr52, 100)
|
menu_edit_type(float, float52, ftostr52, 100)
|
||||||
menu_edit_type(unsigned long, long5, ftostr5, 0.01)
|
menu_edit_type(unsigned long, long5, ftostr5, 0.01)
|
||||||
|
|
||||||
static void lcd_selftest()
|
static bool lcd_selftest()
|
||||||
{
|
{
|
||||||
int _progress = 0;
|
int _progress = 0;
|
||||||
bool _result = false;
|
bool _result = false;
|
||||||
@ -4560,7 +5355,10 @@ static void lcd_selftest()
|
|||||||
st_synchronize();
|
st_synchronize();
|
||||||
_progress = lcd_selftest_screen(6, _progress, 3, true, 1500);
|
_progress = lcd_selftest_screen(6, _progress, 3, true, 1500);
|
||||||
_result = lcd_selfcheck_axis(2, Z_MAX_POS);
|
_result = lcd_selfcheck_axis(2, Z_MAX_POS);
|
||||||
|
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) != 1) {
|
||||||
enquecommand_P(PSTR("G28 W"));
|
enquecommand_P(PSTR("G28 W"));
|
||||||
|
enquecommand_P(PSTR("G1 Z15"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_result)
|
if (_result)
|
||||||
@ -4589,6 +5387,7 @@ static void lcd_selftest()
|
|||||||
{
|
{
|
||||||
LCD_ALERTMESSAGERPGM(MSG_SELFTEST_FAILED);
|
LCD_ALERTMESSAGERPGM(MSG_SELFTEST_FAILED);
|
||||||
}
|
}
|
||||||
|
return(_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4603,28 +5402,18 @@ static bool lcd_selfcheck_axis_sg(char axis) {
|
|||||||
case 1: axis_length = Y_MAX_POS + 8; break;
|
case 1: axis_length = Y_MAX_POS + 8; break;
|
||||||
default: axis_length = 210; break;
|
default: axis_length = 210; break;
|
||||||
}
|
}
|
||||||
/*SERIAL_ECHOPGM("Current position 1:");
|
//tmc2130_sg_stop_on_crash = false;
|
||||||
MYSERIAL.println(current_position[axis]);*/
|
crashdet_disable();
|
||||||
|
|
||||||
current_position[axis] = 0;
|
|
||||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
tmc2130_home_exit();
|
tmc2130_home_exit();
|
||||||
enable_endstops(true);
|
enable_endstops(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (char i = 0; i < 2; i++) {
|
for (char i = 0; i < 2; i++) {
|
||||||
/*SERIAL_ECHOPGM("i = ");
|
|
||||||
MYSERIAL.println(int(i));
|
|
||||||
SERIAL_ECHOPGM("Current position 2:");
|
|
||||||
MYSERIAL.println(current_position[axis]);*/
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
tmc2130_home_enter(X_AXIS_MASK << axis);
|
tmc2130_home_enter(X_AXIS_MASK << axis);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
current_position[axis] -= (axis_length + margin);
|
current_position[axis] -= (axis_length + margin);
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
||||||
|
|
||||||
@ -4639,7 +5428,7 @@ static bool lcd_selfcheck_axis_sg(char axis) {
|
|||||||
|
|
||||||
current_position_init = st_get_position_mm(axis);
|
current_position_init = st_get_position_mm(axis);
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
current_position[axis] += margin;
|
current_position[axis] += 2 * margin;
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
current_position[axis] += axis_length;
|
current_position[axis] += axis_length;
|
||||||
@ -4655,12 +5444,14 @@ static bool lcd_selfcheck_axis_sg(char axis) {
|
|||||||
//plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
//plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||||
|
|
||||||
current_position_final = st_get_position_mm(axis);
|
current_position_final = st_get_position_mm(axis);
|
||||||
|
|
||||||
|
current_position[axis] -= margin;
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
||||||
|
st_synchronize();
|
||||||
}
|
}
|
||||||
measured_axis_length[i] = abs(current_position_final - current_position_init);
|
measured_axis_length[i] = abs(current_position_final - current_position_init);
|
||||||
SERIAL_ECHOPGM("Measured axis length:");
|
SERIAL_ECHOPGM("Measured axis length:");
|
||||||
MYSERIAL.println(measured_axis_length[i]);
|
MYSERIAL.println(measured_axis_length[i]);
|
||||||
|
|
||||||
|
|
||||||
if (abs(measured_axis_length[i] - axis_length) > max_error_mm) {
|
if (abs(measured_axis_length[i] - axis_length) > max_error_mm) {
|
||||||
//axis length
|
//axis length
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
@ -4675,6 +5466,8 @@ static bool lcd_selfcheck_axis_sg(char axis) {
|
|||||||
if (axis == Z_AXIS) _error_1 = "Z";
|
if (axis == Z_AXIS) _error_1 = "Z";
|
||||||
|
|
||||||
lcd_selftest_error(9, _error_1, _error_2);
|
lcd_selftest_error(9, _error_1, _error_2);
|
||||||
|
//crashdet_enable();
|
||||||
|
//uint8_t crashdet = eeprom_read_byte((uint8_t*)EEPROM_CRASH_DET);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4692,9 +5485,10 @@ static bool lcd_selfcheck_axis_sg(char axis) {
|
|||||||
if (axis == Z_AXIS) _error_1 = "Z";
|
if (axis == Z_AXIS) _error_1 = "Z";
|
||||||
|
|
||||||
lcd_selftest_error(8, _error_1, _error_2);
|
lcd_selftest_error(8, _error_1, _error_2);
|
||||||
|
//crashdet_enable();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
//crashdet_enable();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5502,6 +6296,7 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
|
|||||||
}
|
}
|
||||||
if (!SdFatUtil::test_stack_integrity()) stack_error();
|
if (!SdFatUtil::test_stack_integrity()) stack_error();
|
||||||
lcd_ping(); //check that we have received ping command if we are in farm mode
|
lcd_ping(); //check that we have received ping command if we are in farm mode
|
||||||
|
if (lcd_commands_type == LCD_COMMAND_V2_CAL) lcd_commands();
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_printer_connected() {
|
void lcd_printer_connected() {
|
||||||
|
@ -35,7 +35,7 @@ void lcd_mylang();
|
|||||||
bool lcd_detected(void);
|
bool lcd_detected(void);
|
||||||
|
|
||||||
|
|
||||||
static void lcd_selftest();
|
static bool lcd_selftest();
|
||||||
static bool lcd_selfcheck_endstops();
|
static bool lcd_selfcheck_endstops();
|
||||||
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
||||||
static bool lcd_selfcheck_axis_sg(char axis);
|
static bool lcd_selfcheck_axis_sg(char axis);
|
||||||
@ -55,10 +55,12 @@ void lcd_mylang();
|
|||||||
extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
|
extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
|
||||||
// 0: no, 1: yes, -1: timeouted
|
// 0: no, 1: yes, -1: timeouted
|
||||||
extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
|
extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
|
||||||
|
extern int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
|
||||||
// Ask the user to move the Z axis up to the end stoppers and let
|
// Ask the user to move the Z axis up to the end stoppers and let
|
||||||
// the user confirm that it has been done.
|
// the user confirm that it has been done.
|
||||||
|
#ifndef TMC2130
|
||||||
extern bool lcd_calibrate_z_end_stop_manual(bool only_z);
|
extern bool lcd_calibrate_z_end_stop_manual(bool only_z);
|
||||||
|
#endif
|
||||||
// Show the result of the calibration process on the LCD screen.
|
// Show the result of the calibration process on the LCD screen.
|
||||||
extern void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask);
|
extern void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask);
|
||||||
|
|
||||||
@ -98,6 +100,7 @@ void lcd_mylang();
|
|||||||
#define LCD_COMMAND_LONG_PAUSE 5
|
#define LCD_COMMAND_LONG_PAUSE 5
|
||||||
#define LCD_COMMAND_LONG_PAUSE_RESUME 6
|
#define LCD_COMMAND_LONG_PAUSE_RESUME 6
|
||||||
#define LCD_COMMAND_PID_EXTRUDER 7
|
#define LCD_COMMAND_PID_EXTRUDER 7
|
||||||
|
#define LCD_COMMAND_V2_CAL 8
|
||||||
|
|
||||||
extern unsigned long lcd_timeoutToStatus;
|
extern unsigned long lcd_timeoutToStatus;
|
||||||
extern int lcd_commands_type;
|
extern int lcd_commands_type;
|
||||||
@ -231,6 +234,8 @@ void extr_unload_all();
|
|||||||
void extr_unload_used();
|
void extr_unload_used();
|
||||||
void extr_unload();
|
void extr_unload();
|
||||||
static char snmm_stop_print_menu();
|
static char snmm_stop_print_menu();
|
||||||
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
|
||||||
|
static void lcd_babystep_z();
|
||||||
|
|
||||||
void stack_error();
|
void stack_error();
|
||||||
static void lcd_ping_allert();
|
static void lcd_ping_allert();
|
||||||
@ -245,7 +250,7 @@ void lcd_farm_sdcard_menu();
|
|||||||
void lcd_farm_sdcard_menu_w();
|
void lcd_farm_sdcard_menu_w();
|
||||||
//void get_description();
|
//void get_description();
|
||||||
|
|
||||||
void lcd_wait_for_cool_down();
|
//void lcd_wait_for_cool_down();
|
||||||
void adjust_bed_reset();
|
void adjust_bed_reset();
|
||||||
void lcd_extr_cal_reset();
|
void lcd_extr_cal_reset();
|
||||||
|
|
||||||
@ -263,4 +268,7 @@ void display_loading();
|
|||||||
|
|
||||||
void lcd_service_mode_show_result();
|
void lcd_service_mode_show_result();
|
||||||
|
|
||||||
|
void lcd_wizard();
|
||||||
|
void lcd_wizard(int state);
|
||||||
|
|
||||||
#endif //ULTRALCD_H
|
#endif //ULTRALCD_H
|
@ -476,7 +476,18 @@ void lcd_set_custom_characters_nextpage()
|
|||||||
B00100
|
B00100
|
||||||
};
|
};
|
||||||
|
|
||||||
|
byte confirm[8] = {
|
||||||
|
B00000,
|
||||||
|
B00001,
|
||||||
|
B00011,
|
||||||
|
B10110,
|
||||||
|
B11100,
|
||||||
|
B01000,
|
||||||
|
B00000
|
||||||
|
};
|
||||||
|
|
||||||
lcd.createChar(1, arrdown);
|
lcd.createChar(1, arrdown);
|
||||||
|
lcd.createChar(2, confirm);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_set_custom_characters_degree()
|
void lcd_set_custom_characters_degree()
|
||||||
|
Loading…
Reference in New Issue
Block a user