farm mode activation and farm number initialization handled when upgrading firmware versions and when flashing to new eeprom
This commit is contained in:
parent
803d19aa86
commit
70b6e13de4
@ -1130,7 +1130,8 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
|
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
|
||||||
EEPROM_read_B(EEPROM_FARM_NUMBER, &farm_no);
|
EEPROM_read_B(EEPROM_FARM_NUMBER, &farm_no);
|
||||||
if (farm_mode == 0xFF && farm_no == 0) farm_mode = false; //if farm_mode has not been stored to eeprom yet and farm number is set to zero, deactivate farm mode
|
if ((farm_mode == 0xFF && farm_no == 0) || (farm_no == 0xFFFF)) farm_mode = false; //if farm_mode has not been stored to eeprom yet and farm number is set to zero or EEPROM is fresh, deactivate farm mode
|
||||||
|
if (farm_no == 0xFFFF) farm_no = 0;
|
||||||
if (farm_mode)
|
if (farm_mode)
|
||||||
{
|
{
|
||||||
prusa_statistics(8);
|
prusa_statistics(8);
|
||||||
|
Loading…
Reference in New Issue
Block a user