Merge pull request #52 from PavelSindler/MK3

fan error during print improved
This commit is contained in:
PavelSindler 2017-09-22 21:22:17 +02:00 committed by GitHub
commit 03b7a8e765
3 changed files with 34 additions and 20 deletions

View file

@ -460,33 +460,41 @@ extern void stop_and_save_print_to_ram(float z_move, float e_move);
extern void restore_print_from_ram_and_continue(float e_move);
void fanSpeedError(unsigned char _fan) {
if (get_message_level() != 0 && isPrintPaused) return;
//to ensure that target temp. is not set to zero in case taht we are resuming print
if (card.sdprinting) {
if(heating_status != 0) lcd_print_stop();
else lcd_sdcard_pause();
if (heating_status != 0) {
lcd_print_stop();
}
else {
isPrintPaused = true;
lcd_sdcard_pause();
}
}
else {
setTargetHotend0(0);
}
setTargetHotend0(0);
//lcd_update();
WRITE(BEEPER, HIGH);
delayMicroseconds(2000);
WRITE(BEEPER, LOW);
delayMicroseconds(100);
SERIAL_ERROR_START;
switch (_fan) {
case 0:
fanSpeed = 255;
//lcd_print_stop();
SERIAL_ERRORLNPGM("ERROR: Extruder fan speed is lower then expected");
LCD_ALERTMESSAGEPGM("Err: EXTR. FAN ERROR");
SERIAL_ERRORLNPGM("ERROR: Extruder fan speed is lower then expected");
if (get_message_level() == 0) {
WRITE(BEEPER, HIGH);
delayMicroseconds(200);
WRITE(BEEPER, LOW);
delayMicroseconds(100);
LCD_ALERTMESSAGEPGM("Err: EXTR. FAN ERROR");
}
break;
case 1:
//stop_and_save_print_to_ram(0, 0);
SERIAL_ERRORLNPGM("ERROR: Print fan speed is lower then expected");
LCD_ALERTMESSAGEPGM("Err: PRINT FAN ERROR");
SERIAL_ERRORLNPGM("ERROR: Print fan speed is lower then expected");
if (get_message_level() == 0) {
WRITE(BEEPER, HIGH);
delayMicroseconds(200);
WRITE(BEEPER, LOW);
delayMicroseconds(100);
LCD_ALERTMESSAGEPGM("Err: PRINT FAN ERROR");
}
break;
}
}

View file

@ -828,6 +828,7 @@ void lcd_sdcard_pause() {
static void lcd_sdcard_resume() {
lcd_return_to_status();
lcd_reset_alert_level(); //for fan speed error
lcd_commands_type = LCD_COMMAND_LONG_PAUSE_RESUME;
}
@ -5498,6 +5499,10 @@ void lcd_reset_alert_level()
lcd_status_message_level = 0;
}
uint8_t get_message_level()
{
return lcd_status_message_level;
}
#ifdef DOGLCD
void lcd_setcontrast(uint8_t value)
{

View file

@ -14,6 +14,7 @@
void lcd_setstatuspgm(const char* message);
void lcd_setalertstatuspgm(const char* message);
void lcd_reset_alert_level();
uint8_t get_message_level();
void lcd_adjust_z();
void lcd_pick_babystep();
void lcd_alright();