From cc0249126a89cff7b48010133c23d554756c5261 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Wed, 15 Aug 2018 21:36:23 +0200 Subject: [PATCH] Document fsensor_update, remove disabled code. --- Firmware/fsensor.cpp | 18 +++++------------- Firmware/fsensor.h | 1 - 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Firmware/fsensor.cpp b/Firmware/fsensor.cpp index 34fab48f..8800dbb0 100644 --- a/Firmware/fsensor.cpp +++ b/Firmware/fsensor.cpp @@ -430,6 +430,11 @@ void fsensor_st_block_chunk(block_t* bl, int cnt) } } +//! update (perform M600 on filament runout) +//! +//! Works only if filament sensor is enabled. +//! When the filament sensor error count is larger then FSENSOR_ERR_MAX, pauses print, tries to move filament back and forth. +//! If there is still no plausible signal from filament sensor plans M600 (Filament change). void fsensor_update(void) { if (fsensor_enabled) @@ -452,19 +457,6 @@ void fsensor_update(void) fsensor_err_cnt = 0; fsensor_oq_meassure_start(0); -// st_synchronize(); -// for (int axis = X_AXIS; axis <= E_AXIS; axis++) -// current_position[axis] = st_get_position_mm(axis); -/* - current_position[E_AXIS] -= 3; - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 200 / 60, active_extruder); - st_synchronize(); - - current_position[E_AXIS] += 3; - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 200 / 60, active_extruder); - st_synchronize(); -*/ - enquecommand_front_P((PSTR("G1 E-3 F200"))); process_commands(); cmdqueue_pop_front(); diff --git a/Firmware/fsensor.h b/Firmware/fsensor.h index df58def2..0b262a51 100644 --- a/Firmware/fsensor.h +++ b/Firmware/fsensor.h @@ -27,7 +27,6 @@ extern void fsensor_disable(void); extern bool fsensor_autoload_enabled; extern void fsensor_autoload_set(bool State); -//update (perform M600 on filament runout) extern void fsensor_update(void); //setup pin-change interrupt