Merge pull request #1897 from NotaRobotexe/farm_mode

PFW-571 send PRN:4 instead PRN:1, PFW-874 new firmware version alert with 30s timeout
This commit is contained in:
Marek Běl 2019-06-14 20:05:30 +02:00 committed by GitHub
commit aff020a6d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View File

@ -3175,6 +3175,11 @@ void gcode_M701()
{ {
printf_P(PSTR("gcode_M701 begin\n")); printf_P(PSTR("gcode_M701 begin\n"));
if (farm_mode)
{
prusa_statistics(22);
}
if (mmu_enabled) if (mmu_enabled)
{ {
extr_adj(tmp_extruder);//loads current extruder extr_adj(tmp_extruder);//loads current extruder
@ -5964,7 +5969,7 @@ Sigma_Exit:
SERIAL_PROTOCOLLNRPGM(FW_VERSION_STR_P()); SERIAL_PROTOCOLLNRPGM(FW_VERSION_STR_P());
} else if (code_seen('U')) { } else if (code_seen('U')) {
// Check the firmware version provided. If the firmware version provided by the U code is higher than the currently running firmware, // Check the firmware version provided. If the firmware version provided by the U code is higher than the currently running firmware,
// pause the print and ask the user to upgrade the firmware. // pause the print for 30s and ask the user to upgrade the firmware.
show_upgrade_dialog_if_version_newer(++ strchr_pointer); show_upgrade_dialog_if_version_newer(++ strchr_pointer);
} else { } else {
SERIAL_ECHOPGM("FIRMWARE_NAME:Prusa-Firmware "); SERIAL_ECHOPGM("FIRMWARE_NAME:Prusa-Firmware ");

View File

@ -988,6 +988,8 @@ static void lcd_status_screen()
{ {
case 8: case 8:
prusa_statistics(21); prusa_statistics(21);
if(loading_flag)
prusa_statistics(22);
break; break;
case 5: case 5:
if (IS_SD_PRINTING) if (IS_SD_PRINTING)
@ -3961,7 +3963,7 @@ void prusa_statistics(int _message, uint8_t _fil_nr) {
SERIAL_ECHOLN("}"); SERIAL_ECHOLN("}");
status_number = 14; status_number = 14;
} }
else if (IS_SD_PRINTING) else if (IS_SD_PRINTING || loading_flag)
{ {
SERIAL_ECHO("{"); SERIAL_ECHO("{");
prusa_stat_printerstatus(4); prusa_stat_printerstatus(4);
@ -4000,7 +4002,7 @@ void prusa_statistics(int _message, uint8_t _fil_nr) {
status_number = 3; status_number = 3;
farm_timer = 1; farm_timer = 1;
if (IS_SD_PRINTING) if (IS_SD_PRINTING || loading_flag)
{ {
farm_status = 4; farm_status = 4;
SERIAL_ECHO("{"); SERIAL_ECHO("{");

View File

@ -304,7 +304,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
_tone(BEEPER, 1000); _tone(BEEPER, 1000);
delay_keep_alive(50); delay_keep_alive(50);
_noTone(BEEPER); _noTone(BEEPER);
lcd_wait_for_click(); lcd_wait_for_click_delay(30);
lcd_update_enable(true); lcd_update_enable(true);
lcd_clear(); lcd_clear();
lcd_update(0); lcd_update(0);