Disable PRUSA M28

This commit is contained in:
Voinea Dragos 2021-05-30 14:57:49 +03:00 committed by Guðni Már Gilbert
parent f22b9260ae
commit 6dd59985ee
1 changed files with 16 additions and 3 deletions

View File

@ -213,7 +213,9 @@ static LongTimer crashDetTimer;
bool mesh_bed_leveling_flag = false; bool mesh_bed_leveling_flag = false;
bool mesh_bed_run_from_menu = false; bool mesh_bed_run_from_menu = false;
#ifdef PRUSA_M28
bool prusa_sd_card_upload = false; bool prusa_sd_card_upload = false;
#endif
unsigned int status_number = 0; unsigned int status_number = 0;
@ -1721,6 +1723,7 @@ void setup()
#endif //WATCHDOG #endif //WATCHDOG
} }
#ifdef PRUSA_M28
static inline void crash_and_burn(dump_crash_reason reason) static inline void crash_and_burn(dump_crash_reason reason)
{ {
@ -1825,6 +1828,7 @@ void serial_read_stream() {
} }
} }
} }
#endif //PRUSA_M28
/** /**
@ -1915,12 +1919,14 @@ void loop()
} }
#endif #endif
#ifdef PRUSA_M28
if (prusa_sd_card_upload) if (prusa_sd_card_upload)
{ {
//we read byte-by byte //we read byte-by byte
serial_read_stream(); serial_read_stream();
} }
else else
#endif
{ {
get_command(); get_command();
@ -2559,9 +2565,12 @@ void retract(bool retracting, bool swapretract = false) {
} //retract } //retract
#endif //FWRETRACT #endif //FWRETRACT
#ifdef PRUSA_M28
void trace() { void trace() {
Sound_MakeCustom(25,440,true); Sound_MakeCustom(25,440,true);
} }
#endif
/* /*
void ramming() { void ramming() {
// float tmp[4] = DEFAULT_MAX_FEEDRATE; // float tmp[4] = DEFAULT_MAX_FEEDRATE;
@ -4564,12 +4573,16 @@ void process_commands()
#endif // SDSUPPORT #endif // SDSUPPORT
} else if (code_seen_P(PSTR("M28"))) { // PRUSA M28 }
#ifdef PRUSA_M28
else if (code_seen_P(PSTR("M28"))) { // PRUSA M28
trace(); trace();
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 }
#endif //PRUSA_M28
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])