瀏覽代碼

temp calibration on/off initialization when updating firmware

PavelSindler 8 年之前
父節點
當前提交
4de9b1c9f6
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      Firmware/Marlin_main.cpp

+ 6 - 2
Firmware/Marlin_main.cpp

@@ -1151,10 +1151,10 @@ void setup()
       // Once a firmware boots up, it forces at least a language selection, which changes
       // EEPROM_LANG to number lower than 0x0ff.
       // 1) Set a high power mode.
-      eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0);
-	  eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
+      eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0);	  
   }
 
+
   // In the future, somewhere here would one compare the current firmware version against the firmware version stored in the EEPROM.
   // If they differ, an update procedure may need to be performed. At the end of this block, the current firmware version
   // is being written into the EEPROM, so the update procedure will be triggered only once.
@@ -1163,6 +1163,10 @@ void setup()
       lcd_mylang();
     }
 	temp_cal_active = eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE);
+	if (temp_cal_active == 0xFF) {
+		eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
+		temp_cal_active = 0;
+	}
 	check_babystep(); //checking if Z babystep is in allowed range
 	
   if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||