Merge pull request #2231 from MRprusa3d/PFW-873c

default nozzle diameter for farm mode
This commit is contained in:
DRracer 2019-09-30 18:36:25 +02:00 committed by GitHub
commit aa50479da5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -25,6 +25,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
#endif
#define EEPROM_EMPTY_VALUE 0xFF
#define EEPROM_EMPTY_VALUE16 0xFFFF
// The total size of the EEPROM is
// 4096 for the Atmega2560
#define EEPROM_TOP 4096

View File

@ -341,13 +341,17 @@ if(oCheckMode==ClCheckMode::_Undef)
eeprom_update_byte((uint8_t*)EEPROM_CHECK_MODE,(uint8_t)oCheckMode);
}
if(farm_mode)
{
oCheckMode=ClCheckMode::_Strict;
if(eeprom_read_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM)==EEPROM_EMPTY_VALUE16)
eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,EEPROM_NOZZLE_DIAMETER_uM_DEFAULT);
}
oNozzleDiameter=(ClNozzleDiameter)eeprom_read_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER);
if((oNozzleDiameter==ClNozzleDiameter::_Diameter_Undef)&& !farm_mode)
{
oNozzleDiameter=ClNozzleDiameter::_Diameter_400;
eeprom_update_byte((uint8_t*)EEPROM_NOZZLE_DIAMETER,(uint8_t)oNozzleDiameter);
eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,400);
eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,EEPROM_NOZZLE_DIAMETER_uM_DEFAULT);
}
oCheckModel=(ClCheckModel)eeprom_read_byte((uint8_t*)EEPROM_CHECK_MODEL);
if(oCheckModel==ClCheckModel::_Undef)

View File

@ -35,6 +35,8 @@ inline void eeprom_update_int8(unsigned char* addr, int8_t v) {
//-//
#define EEPROM_NOZZLE_DIAMETER_uM_DEFAULT 400
enum class ClPrintChecking:uint_least8_t
{
_Nozzle=1,