Allow SN get only on the Einsy
This commit is contained in:
parent
42ac9c0ec3
commit
6689581364
|
|
@ -1130,6 +1130,7 @@ void setup()
|
||||||
}
|
}
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
|
||||||
|
#ifdef PRUSA_SN_SUPPORT
|
||||||
//Check for valid SN in EEPROM. Try to retrieve it in case it's invalid.
|
//Check for valid SN in EEPROM. Try to retrieve it in case it's invalid.
|
||||||
//SN is valid only if it is NULL terminated and starts with "CZPX".
|
//SN is valid only if it is NULL terminated and starts with "CZPX".
|
||||||
{
|
{
|
||||||
|
|
@ -1146,6 +1147,7 @@ void setup()
|
||||||
puts_P(PSTR("SN update failed"));
|
puts_P(PSTR("SN update failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif //PRUSA_SN_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
#ifndef XFLASH
|
#ifndef XFLASH
|
||||||
|
|
@ -4570,13 +4572,15 @@ void process_commands()
|
||||||
prusa_sd_card_upload = true;
|
prusa_sd_card_upload = true;
|
||||||
card.openFileWrite(strchr_pointer+4);
|
card.openFileWrite(strchr_pointer+4);
|
||||||
|
|
||||||
} else if (code_seen_P(PSTR("SN"))) { // PRUSA SN
|
#ifdef PRUSA_SN_SUPPORT
|
||||||
|
} else if (code_seen_P(PSTR("SN"))) { // PRUSA SN
|
||||||
char SN[20];
|
char SN[20];
|
||||||
eeprom_read_block(SN, (uint8_t*)EEPROM_PRUSA_SN, 20);
|
eeprom_read_block(SN, (uint8_t*)EEPROM_PRUSA_SN, 20);
|
||||||
if (SN[19])
|
if (SN[19])
|
||||||
puts_P(PSTR("SN invalid"));
|
puts_P(PSTR("SN invalid"));
|
||||||
else
|
else
|
||||||
puts(SN);
|
puts(SN);
|
||||||
|
#endif //PRUSA_SN_SUPPORT
|
||||||
|
|
||||||
} else if(code_seen_P(PSTR("Fir"))){ // PRUSA Fir
|
} else if(code_seen_P(PSTR("Fir"))){ // PRUSA Fir
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
#define AMBIENT_THERMISTOR
|
#define AMBIENT_THERMISTOR
|
||||||
#define PINDA_THERMISTOR
|
#define PINDA_THERMISTOR
|
||||||
|
|
||||||
|
#define PRUSA_SN_SUPPORT //enables the "PRUSA SN" command and 32u2 enhanced firmware support
|
||||||
|
|
||||||
#define XFLASH // external 256kB flash
|
#define XFLASH // external 256kB flash
|
||||||
#define BOOTAPP // bootloader support
|
#define BOOTAPP // bootloader support
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue