cleanup: remove dead code lcd_adjust_z()
It's only used when MESH_BED_LEVELING is not defined. According to the configuration files, all printers supported use MESH_BED_LEVELING. So I think we are safe in removing this dead code.
This commit is contained in:
parent
411d1da3c8
commit
d592586d94
|
|
@ -2725,13 +2725,6 @@ static void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, lon
|
|||
|
||||
clean_up_after_endstop_move(l_feedmultiply);
|
||||
endstops_hit_on_purpose();
|
||||
#ifndef MESH_BED_LEVELING
|
||||
//-// Oct 2019 :: this part of code is (from) now probably un-compilable
|
||||
// If MESH_BED_LEVELING is not active, then it is the original Prusa i3.
|
||||
// Offer the user to load the baby step value, which has been adjusted at the previous print session.
|
||||
if(card.sdprinting && eeprom_read_word((uint16_t *)EEPROM_BABYSTEP_Z))
|
||||
lcd_adjust_z();
|
||||
#endif
|
||||
|
||||
// Load the machine correction matrix
|
||||
world2machine_initialize();
|
||||
|
|
|
|||
|
|
@ -2752,90 +2752,6 @@ void pid_extruder()
|
|||
}
|
||||
|
||||
}
|
||||
/*
|
||||
void lcd_adjust_z() {
|
||||
int enc_dif = 0;
|
||||
int cursor_pos = 1;
|
||||
int fsm = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
lcd_clear();
|
||||
lcd_set_cursor(0, 0);
|
||||
lcd_puts_P(_n("Auto adjust Z?"));////MSG_ADJUSTZ
|
||||
lcd_set_cursor(1, 1);
|
||||
lcd_puts_P(_T(MSG_YES));
|
||||
|
||||
lcd_set_cursor(1, 2);
|
||||
|
||||
lcd_puts_P(_T(MSG_NO));
|
||||
|
||||
lcd_set_cursor(0, 1);
|
||||
|
||||
lcd_print('>');
|
||||
|
||||
|
||||
enc_dif = lcd_encoder_diff;
|
||||
|
||||
while (fsm == 0) {
|
||||
|
||||
manage_heater();
|
||||
manage_inactivity(true);
|
||||
|
||||
if ( abs((enc_dif - lcd_encoder_diff)) > 4 ) {
|
||||
|
||||
if ( (abs(enc_dif - lcd_encoder_diff)) > 1 ) {
|
||||
if (enc_dif > lcd_encoder_diff ) {
|
||||
cursor_pos --;
|
||||
}
|
||||
|
||||
if (enc_dif < lcd_encoder_diff ) {
|
||||
cursor_pos ++;
|
||||
}
|
||||
|
||||
if (cursor_pos > 2) {
|
||||
cursor_pos = 2;
|
||||
}
|
||||
|
||||
if (cursor_pos < 1) {
|
||||
cursor_pos = 1;
|
||||
}
|
||||
lcd_set_cursor(0, 1);
|
||||
lcd_print(' ');
|
||||
lcd_set_cursor(0, 2);
|
||||
lcd_print(' ');
|
||||
lcd_set_cursor(0, cursor_pos);
|
||||
lcd_print('>');
|
||||
enc_dif = lcd_encoder_diff;
|
||||
_delay(100);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (lcd_clicked()) {
|
||||
fsm = cursor_pos;
|
||||
if (fsm == 1) {
|
||||
int babystepLoadZ = 0;
|
||||
babystepLoadZ = eeprom_read_word((uint16_t*)EEPROM_BABYSTEP_Z);
|
||||
CRITICAL_SECTION_START
|
||||
babystepsTodo[Z_AXIS] = babystepLoadZ;
|
||||
CRITICAL_SECTION_END
|
||||
} else {
|
||||
int zero = 0;
|
||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_X, zero);
|
||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Y, zero);
|
||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, zero);
|
||||
}
|
||||
_delay(500);
|
||||
}
|
||||
};
|
||||
|
||||
lcd_clear();
|
||||
lcd_return_to_status();
|
||||
|
||||
}*/
|
||||
|
||||
#ifdef PINDA_THERMISTOR
|
||||
bool lcd_wait_for_pinda(float temp) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ void lcd_setalertstatuspgm(const char* message, uint8_t severity = LCD_STATUS_AL
|
|||
uint8_t get_message_level();
|
||||
void lcd_reset_alert_level();
|
||||
|
||||
void lcd_adjust_z();
|
||||
void lcd_pick_babystep();
|
||||
uint8_t lcd_alright();
|
||||
void show_preheat_nozzle_warning();
|
||||
|
|
|
|||
Loading…
Reference in New Issue