Merge pull request #450 from XPila/3.1.1-RC6
filament sensor additional check after runout (3mm back, 3mm forward …
This commit is contained in:
commit
a256a8ff19
@ -4,8 +4,10 @@
|
||||
|
||||
#include "fsensor.h"
|
||||
#include "pat9125.h"
|
||||
#include "stepper.h"
|
||||
#include "planner.h"
|
||||
#include "fastio.h"
|
||||
#include "cmdqueue.h"
|
||||
|
||||
//#include "LiquidCrystal.h"
|
||||
//extern LiquidCrystal lcd;
|
||||
@ -257,15 +259,26 @@ void fsensor_update()
|
||||
if (!fsensor_enabled) return;
|
||||
if (fsensor_err_cnt > FSENSOR_ERR_MAX)
|
||||
{
|
||||
// MYSERIAL.println("fsensor_update (fsensor_err_cnt > FSENSOR_ERR_MAX)");
|
||||
/* if (fsensor_ignore_error)
|
||||
fsensor_stop_and_save_print();
|
||||
|
||||
fsensor_err_cnt = 0;
|
||||
|
||||
enquecommand_front_P((PSTR("G1 E-3 F200")));
|
||||
process_commands();
|
||||
cmdqueue_pop_front();
|
||||
st_synchronize();
|
||||
|
||||
enquecommand_front_P((PSTR("G1 E3 F200")));
|
||||
process_commands();
|
||||
cmdqueue_pop_front();
|
||||
st_synchronize();
|
||||
|
||||
if (fsensor_err_cnt == 0)
|
||||
{
|
||||
MYSERIAL.println("fsensor_update - error ignored)");
|
||||
fsensor_ignore_error = false;
|
||||
fsensor_restore_print_and_continue();
|
||||
}
|
||||
else*/
|
||||
else
|
||||
{
|
||||
fsensor_stop_and_save_print();
|
||||
eeprom_update_byte((uint8_t*)EEPROM_FERROR_COUNT, eeprom_read_byte((uint8_t*)EEPROM_FERROR_COUNT) + 1);
|
||||
eeprom_update_word((uint16_t*)EEPROM_FERROR_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT) + 1);
|
||||
enquecommand_front_P((PSTR("M600")));
|
||||
|
Loading…
Reference in New Issue
Block a user