Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavelSindler <pavel@prusa3d.cz>2018-02-01 14:20:59 +0300
committerGitHub <noreply@github.com>2018-02-01 14:20:59 +0300
commita256a8ff19018bddf9505c35df5ab52e1a2175da (patch)
treef2633434b66e9de8a1d375aff0de2d170570d25c
parent9d8191323b70c2ee67dc8be9bbe44baded5a95d9 (diff)
parente20ee149b0505835ba3acb57a704ccceff505901 (diff)
Merge pull request #450 from XPila/3.1.1-RC6
filament sensor additional check after runout (3mm back, 3mm forward …
-rw-r--r--Firmware/fsensor.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/Firmware/fsensor.cpp b/Firmware/fsensor.cpp
index c69e5d16f..ce5b4ad7e 100644
--- a/Firmware/fsensor.cpp
+++ b/Firmware/fsensor.cpp
@@ -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")));