From 5e120e6e52f6bc75fc075392fe618ef48c9c199d Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Fri, 8 Jun 2018 18:13:50 +0200 Subject: [PATCH] power panic flow factor hotfix --- .gitignore | 5 +++++ Firmware/Configuration.h | 2 ++ Firmware/Marlin_main.cpp | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8bb12431..98f5b0b1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ Debug Firmware/Configuration_prusa.h Firmware/Doc +/Firmware/.vs/Firmware/v14 +/Firmware/__vm +/Firmware/Firmware.sln +/Firmware/Firmware.vcxproj +/Firmware/Firmware.vcxproj.filters diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index 2cdbe12b..628c139a 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -178,6 +178,8 @@ #define EEPROM_EXTRUDER_MULTIPLIER_0 (EEPROM_BOARD_TYPE - 4) //float #define EEPROM_EXTRUDER_MULTIPLIER_1 (EEPROM_EXTRUDER_MULTIPLIER_0 - 4) //float #define EEPROM_EXTRUDER_MULTIPLIER_2 (EEPROM_EXTRUDER_MULTIPLIER_1 - 4) //float +#define EEPROM_EXTRUDEMULTIPLY (EEPROM_EXTRUDER_MULTIPLIER_2 - 2) // uint16 + //TMC2130 configuration #define EEPROM_TMC_AXIS_SIZE //axis configuration block size diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 4d3cb9e8..a3afde0a 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -8287,6 +8287,7 @@ void uvlo_() eeprom_update_float((float*)(EEPROM_EXTRUDER_MULTIPLIER_2), extruder_multiplier[2]); #endif #endif + eeprom_update_word((uint16_t*)(EEPROM_EXTRUDEMULTIPLY), (uint16_t)extrudemultiply); // Finaly store the "power outage" flag. if(sd_print) eeprom_update_byte((uint8_t*)EEPROM_UVLO, 1); @@ -8502,7 +8503,7 @@ void recover_machine_state_after_power_panic() extruder_multiplier[2] = eeprom_read_float((float*)(EEPROM_EXTRUDER_MULTIPLIER_2)); #endif #endif - + extrudemultiply = (int)eeprom_read_word((uint16_t*)(EEPROM_EXTRUDEMULTIPLY)); } void restore_print_from_eeprom() {