Просмотр исходного кода

Merge pull request #912 from MRprusa3d/MK3

ShippingPrep Reset
PavelSindler 5 лет назад
Родитель
Сommit
efa5f49f66
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      Firmware/Marlin_main.cpp

+ 9 - 0
Firmware/Marlin_main.cpp

@@ -849,6 +849,15 @@ void factory_reset(char level, bool quiet)
 			farm_mode = false;
 			eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode);
             EEPROM_save_B(EEPROM_FARM_NUMBER, &farm_no);
+
+            eeprom_update_dword((uint32_t *)EEPROM_TOTALTIME, 0);
+            eeprom_update_dword((uint32_t *)EEPROM_FILAMENTUSED, 0);
+            eeprom_update_word((uint16_t *)EEPROM_CRASH_COUNT_X_TOT, 0);
+            eeprom_update_word((uint16_t *)EEPROM_CRASH_COUNT_Y_TOT, 0);
+            eeprom_update_word((uint16_t *)EEPROM_FERROR_COUNT_TOT, 0);
+            eeprom_update_word((uint16_t *)EEPROM_POWER_COUNT_TOT, 0);
+
+            fsensor_enable();
                        
             WRITE(BEEPER, HIGH);
             _delay_ms(100);