Merge pull request #52 from PavelSindler/MK3
fan error during print improved
This commit is contained in:
commit
03b7a8e765
3 changed files with 34 additions and 20 deletions
|
@ -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);
|
extern void restore_print_from_ram_and_continue(float e_move);
|
||||||
|
|
||||||
void fanSpeedError(unsigned char _fan) {
|
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 (card.sdprinting) {
|
||||||
if(heating_status != 0) lcd_print_stop();
|
if (heating_status != 0) {
|
||||||
else lcd_sdcard_pause();
|
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;
|
SERIAL_ERROR_START;
|
||||||
switch (_fan) {
|
switch (_fan) {
|
||||||
case 0:
|
case 0:
|
||||||
fanSpeed = 255;
|
SERIAL_ERRORLNPGM("ERROR: Extruder fan speed is lower then expected");
|
||||||
//lcd_print_stop();
|
if (get_message_level() == 0) {
|
||||||
SERIAL_ERRORLNPGM("ERROR: Extruder fan speed is lower then expected");
|
WRITE(BEEPER, HIGH);
|
||||||
LCD_ALERTMESSAGEPGM("Err: EXTR. FAN ERROR");
|
delayMicroseconds(200);
|
||||||
|
WRITE(BEEPER, LOW);
|
||||||
|
delayMicroseconds(100);
|
||||||
|
LCD_ALERTMESSAGEPGM("Err: EXTR. FAN ERROR");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
//stop_and_save_print_to_ram(0, 0);
|
SERIAL_ERRORLNPGM("ERROR: Print fan speed is lower then expected");
|
||||||
SERIAL_ERRORLNPGM("ERROR: Print fan speed is lower then expected");
|
if (get_message_level() == 0) {
|
||||||
LCD_ALERTMESSAGEPGM("Err: PRINT FAN ERROR");
|
WRITE(BEEPER, HIGH);
|
||||||
|
delayMicroseconds(200);
|
||||||
|
WRITE(BEEPER, LOW);
|
||||||
|
delayMicroseconds(100);
|
||||||
|
LCD_ALERTMESSAGEPGM("Err: PRINT FAN ERROR");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -828,6 +828,7 @@ void lcd_sdcard_pause() {
|
||||||
|
|
||||||
static void lcd_sdcard_resume() {
|
static void lcd_sdcard_resume() {
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
|
lcd_reset_alert_level(); //for fan speed error
|
||||||
lcd_commands_type = LCD_COMMAND_LONG_PAUSE_RESUME;
|
lcd_commands_type = LCD_COMMAND_LONG_PAUSE_RESUME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5498,6 +5499,10 @@ void lcd_reset_alert_level()
|
||||||
lcd_status_message_level = 0;
|
lcd_status_message_level = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t get_message_level()
|
||||||
|
{
|
||||||
|
return lcd_status_message_level;
|
||||||
|
}
|
||||||
#ifdef DOGLCD
|
#ifdef DOGLCD
|
||||||
void lcd_setcontrast(uint8_t value)
|
void lcd_setcontrast(uint8_t value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
void lcd_setstatuspgm(const char* message);
|
void lcd_setstatuspgm(const char* message);
|
||||||
void lcd_setalertstatuspgm(const char* message);
|
void lcd_setalertstatuspgm(const char* message);
|
||||||
void lcd_reset_alert_level();
|
void lcd_reset_alert_level();
|
||||||
|
uint8_t get_message_level();
|
||||||
void lcd_adjust_z();
|
void lcd_adjust_z();
|
||||||
void lcd_pick_babystep();
|
void lcd_pick_babystep();
|
||||||
void lcd_alright();
|
void lcd_alright();
|
||||||
|
|
Loading…
Reference in a new issue