|
@@ -205,10 +205,6 @@ static LongTimer crashDetTimer;
|
|
|
|
|
|
bool mesh_bed_leveling_flag = false;
|
|
|
|
|
|
-#ifdef PRUSA_M28
|
|
|
-bool prusa_sd_card_upload = false;
|
|
|
-#endif
|
|
|
-
|
|
|
unsigned long total_filament_used;
|
|
|
HeatingStatus heating_status;
|
|
|
uint8_t heating_status_counter;
|
|
@@ -1677,79 +1673,6 @@ void stack_error() {
|
|
|
crash_and_burn(dump_crash_reason::stack_error);
|
|
|
}
|
|
|
|
|
|
-#ifdef PRUSA_M28
|
|
|
-void trace();
|
|
|
-
|
|
|
-#define CHUNK_SIZE 64
|
|
|
-#define SAFETY_MARGIN 1
|
|
|
-char chunk[CHUNK_SIZE+SAFETY_MARGIN];
|
|
|
-
|
|
|
-void serial_read_stream() {
|
|
|
-
|
|
|
- setAllTargetHotends(0);
|
|
|
- setTargetBed(0);
|
|
|
-
|
|
|
- lcd_clear();
|
|
|
- lcd_puts_P(PSTR(" Upload in progress"));
|
|
|
-
|
|
|
-
|
|
|
- uint32_t bytesToReceive;
|
|
|
-
|
|
|
-
|
|
|
- char bytesToReceiveBuffer[4];
|
|
|
- for (int i=0; i<4; i++) {
|
|
|
- int data;
|
|
|
- while ((data = MYSERIAL.read()) == -1) {};
|
|
|
- bytesToReceiveBuffer[i] = data;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- memcpy(&bytesToReceive, &bytesToReceiveBuffer, 4);
|
|
|
-
|
|
|
-
|
|
|
- MYSERIAL.write('+');
|
|
|
-
|
|
|
-
|
|
|
- uint32_t receivedBytes = 0;
|
|
|
- while (prusa_sd_card_upload) {
|
|
|
- int i;
|
|
|
- for (i=0; i<CHUNK_SIZE; i++) {
|
|
|
- int data;
|
|
|
-
|
|
|
-
|
|
|
- if (receivedBytes == bytesToReceive) {
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- while ((data = MYSERIAL.read()) == -1) {};
|
|
|
- receivedBytes++;
|
|
|
-
|
|
|
-
|
|
|
- chunk[i] = data;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- card.write_command_no_newline(&chunk[0]);
|
|
|
-
|
|
|
-
|
|
|
- MYSERIAL.write('+');
|
|
|
-
|
|
|
-
|
|
|
- manage_heater();
|
|
|
-
|
|
|
-
|
|
|
- if(receivedBytes == bytesToReceive) {
|
|
|
- trace();
|
|
|
- card.closefile();
|
|
|
- prusa_sd_card_upload = false;
|
|
|
- SERIAL_PROTOCOLLNRPGM(MSG_FILE_SAVED);
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
|
|
|
|
|
|
* Output autoreport values according to features requested in M155
|
|
@@ -2481,96 +2404,7 @@ void retract(bool retracting, bool swapretract = false) {
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-#ifdef PRUSA_M28
|
|
|
-void trace() {
|
|
|
- Sound_MakeCustom(25,440,true);
|
|
|
-}
|
|
|
-#endif
|
|
|
|
|
|
-
|
|
|
-void ramming() {
|
|
|
-
|
|
|
- if (current_temperature[0] < 230) {
|
|
|
-
|
|
|
-
|
|
|
- max_feedrate[E_AXIS] = 50;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- current_position[E_AXIS] += 5.4;
|
|
|
- plan_buffer_line_curposXYZE(2800 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 3.2;
|
|
|
- plan_buffer_line_curposXYZE(3000 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 3;
|
|
|
- plan_buffer_line_curposXYZE(3400 / 60, active_extruder);
|
|
|
- st_synchronize();
|
|
|
- max_feedrate[E_AXIS] = 80;
|
|
|
- current_position[E_AXIS] -= 82;
|
|
|
- plan_buffer_line_curposXYZE(9500 / 60, active_extruder);
|
|
|
- max_feedrate[E_AXIS] = 50;
|
|
|
- current_position[E_AXIS] -= 20;
|
|
|
- plan_buffer_line_curposXYZE(1200 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 5;
|
|
|
- plan_buffer_line_curposXYZE(400 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 5;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] -= 10;
|
|
|
- st_synchronize();
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 10;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] -= 10;
|
|
|
- plan_buffer_line_curposXYZE(800 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 10;
|
|
|
- plan_buffer_line_curposXYZE(800 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] -= 10;
|
|
|
- plan_buffer_line_curposXYZE(800 / 60, active_extruder);
|
|
|
- st_synchronize();
|
|
|
- }
|
|
|
- else {
|
|
|
-
|
|
|
- max_feedrate[E_AXIS] = 50;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- current_position[E_AXIS] += 3.1;
|
|
|
- plan_buffer_line_curposXYZE(2000 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 3.1;
|
|
|
- plan_buffer_line_curposXYZE(2500 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 4;
|
|
|
- plan_buffer_line_curposXYZE(3000 / 60, active_extruder);
|
|
|
- st_synchronize();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- _delay(4700);
|
|
|
- max_feedrate[E_AXIS] = 80;
|
|
|
- current_position[E_AXIS] -= 92;
|
|
|
- plan_buffer_line_curposXYZE(9900 / 60, active_extruder);
|
|
|
- max_feedrate[E_AXIS] = 50;
|
|
|
- current_position[E_AXIS] -= 5;
|
|
|
- plan_buffer_line_curposXYZE(800 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 5;
|
|
|
- plan_buffer_line_curposXYZE(400 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] -= 5;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- st_synchronize();
|
|
|
- current_position[E_AXIS] += 5;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] -= 5;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] += 5;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- current_position[E_AXIS] -= 5;
|
|
|
- plan_buffer_line_curposXYZE(600 / 60, active_extruder);
|
|
|
- st_synchronize();
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-*/
|
|
|
|
|
|
#ifdef TMC2130
|
|
|
void force_high_power_mode(bool start_high_power_section) {
|
|
@@ -4384,10 +4218,9 @@ void process_commands()
|
|
|
|
|
|
Set of internal PRUSA commands
|
|
|
#### Usage
|
|
|
- PRUSA [ Ping | PRN | FAN | thx | uvlo | MMURES | RESET | fv | M28 | SN | Fir | Rev | Lang | Lz | FR ]
|
|
|
+ PRUSA [ PRN | FAN | thx | uvlo | MMURES | RESET | fv | M28 | SN | Fir | Rev | Lang | Lz | FR ]
|
|
|
|
|
|
#### Parameters
|
|
|
- - `Ping`
|
|
|
- `PRN` - Prints revision of the printer
|
|
|
- `FAN` - Prints fan details
|
|
|
- `thx`
|
|
@@ -4408,7 +4241,7 @@ void process_commands()
|
|
|
*/
|
|
|
|
|
|
if (farm_prusa_code_seen()) {}
|
|
|
- else if( code_seen_P(PSTR("FANPINTST"))) {
|
|
|
+ else if(code_seen_P(PSTR("FANPINTST"))) {
|
|
|
gcode_PRUSA_BadRAMBoFanTest();
|
|
|
}
|
|
|
else if (code_seen_P(PSTR("FAN"))) {
|
|
@@ -4432,30 +4265,7 @@ void process_commands()
|
|
|
#elif defined(BOOTAPP)
|
|
|
asm volatile("jmp 0x3E000");
|
|
|
#endif
|
|
|
- } else if (code_seen_P(PSTR("fv"))) {
|
|
|
-
|
|
|
- #ifdef SDSUPPORT
|
|
|
- card.openFileReadFilteredGcode(strchr_pointer + 3,true);
|
|
|
- while (true) {
|
|
|
- uint16_t readByte = card.getFilteredGcodeChar();
|
|
|
- MYSERIAL.write(readByte);
|
|
|
- if (readByte=='\n') {
|
|
|
- break;
|
|
|
- }
|
|
|
}
|
|
|
- card.closefile();
|
|
|
-
|
|
|
- #endif
|
|
|
-
|
|
|
- }
|
|
|
-#ifdef PRUSA_M28
|
|
|
- else if (code_seen_P(PSTR("M28"))) {
|
|
|
- trace();
|
|
|
- prusa_sd_card_upload = true;
|
|
|
- card.openFileWrite(strchr_pointer+4);
|
|
|
-
|
|
|
- }
|
|
|
-#endif
|
|
|
#ifdef PRUSA_SN_SUPPORT
|
|
|
else if (code_seen_P(PSTR("SN"))) {
|
|
|
char SN[20];
|