UVLO recover E absolute mode

build number 119
This commit is contained in:
Robert Pelnar 2017-11-28 23:41:58 +01:00
parent 13f1684a4c
commit 9413eca52c
4 changed files with 29753 additions and 1 deletions

View file

@ -9,7 +9,7 @@
// Firmware version
#define FW_version "3.1.1-RC1"
#define FW_build 117
#define FW_build 119
//#define FW_build --BUILD-NUMBER--
#define FW_version_build FW_version " b" STR(FW_build)
@ -66,6 +66,8 @@
#define EEPROM_FAN_CHECK_ENABLED (EEPROM_UVLO_FAN_SPEED - 1)
#define EEPROM_UVLO_MESH_BED_LEVELING (EEPROM_FAN_CHECK_ENABLED - 9*2)
#define EEPROM_UVLO_Z_MICROSTEPS (EEPROM_UVLO_MESH_BED_LEVELING - 2)
#define EEPROM_UVLO_E_ABS (EEPROM_UVLO_Z_MICROSTEPS - 1)
#define EEPROM_UVLO_CURRENT_POSITION_E (EEPROM_UVLO_E_ABS - 4) //float for current position in E
// Crash detection mode EEPROM setting
#define EEPROM_CRASH_DET (EEPROM_UVLO_MESH_BED_LEVELING-12)

View file

@ -7148,6 +7148,8 @@ void uvlo_()
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 0), current_position[X_AXIS]);
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 4), current_position[Y_AXIS]);
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_Z), current_position[Z_AXIS]);
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E), current_position[E_AXIS]);
eeprom_update_byte((uint8_t*)EEPROM_UVLO_E_ABS, axis_relative_modes[3]?0:1);
// Store the current feed rate, temperatures and fan speed.
EEPROM_save_B(EEPROM_UVLO_FEEDRATE, &feedrate_bckp);
eeprom_update_byte((uint8_t*)EEPROM_UVLO_TARGET_HOTEND, target_temperature[active_extruder]);
@ -7255,6 +7257,15 @@ void recover_print(uint8_t automatic) {
enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure
}
enquecommand_P(PSTR("G1 E" STRINGIFY(-DEFAULT_RETRACTION)" F480"));
if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_E_ABS))
{
float extruder_abs_pos = eeprom_read_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E));
enquecommand_P(PSTR("M82")); //E axis abslute mode
sprintf_P(cmd, PSTR("G92 E"));
dtostrf(extruder_abs_pos, 6, 3, cmd + strlen(cmd));
enquecommand(cmd);
}
// Mark the power panic status as inactive.
eeprom_update_byte((uint8_t*)EEPROM_UVLO, 0);
/*while ((abs(degHotend(0)- target_temperature[0])>5) || (abs(degBed() -target_temperature_bed)>3)) { //wait for heater and bed to reach target temp

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff