diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index d7375b511..0b8181241 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -213,7 +213,9 @@ static LongTimer crashDetTimer; bool mesh_bed_leveling_flag = false; bool mesh_bed_run_from_menu = false; +#ifdef PRUSA_M28 bool prusa_sd_card_upload = false; +#endif unsigned int status_number = 0; @@ -1721,6 +1723,7 @@ void setup() #endif //WATCHDOG } +#ifdef PRUSA_M28 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 +#ifdef PRUSA_M28 if (prusa_sd_card_upload) { //we read byte-by byte serial_read_stream(); } - else + else +#endif { get_command(); @@ -2559,9 +2565,12 @@ void retract(bool retracting, bool swapretract = false) { } //retract #endif //FWRETRACT +#ifdef PRUSA_M28 void trace() { Sound_MakeCustom(25,440,true); } +#endif + /* void ramming() { // float tmp[4] = DEFAULT_MAX_FEEDRATE; @@ -4564,12 +4573,16 @@ void process_commands() #endif // SDSUPPORT - } else if (code_seen_P(PSTR("M28"))) { // PRUSA M28 + } +#ifdef PRUSA_M28 + else if (code_seen_P(PSTR("M28"))) { // PRUSA M28 trace(); prusa_sd_card_upload = true; 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]; eeprom_read_block(SN, (uint8_t*)EEPROM_PRUSA_SN, 20); if (SN[19])