Avoid calling fsensor_update() one level earlier
Move the common checks between filament sensors out of fsensor_update(). Disable the runout check if a saved state is already present (this check was missing in the PAT9125 variant) as this is currently not supported. Note that the CHECK_FSENSOR looks completely redundant besides e_active().
This commit is contained in:
parent
bd80ee88a0
commit
186f881600
@ -8606,7 +8606,8 @@ if(0)
|
||||
#ifdef PAT9125
|
||||
fsensor_autoload_check_stop();
|
||||
#endif //PAT9125
|
||||
fsensor_update();
|
||||
if (fsensor_enabled && !saved_printing)
|
||||
fsensor_update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ void fsensor_enque_M600(){
|
||||
void fsensor_update(void)
|
||||
{
|
||||
#ifdef PAT9125
|
||||
if (fsensor_enabled && fsensor_watch_runout && (fsensor_err_cnt > FSENSOR_ERR_MAX))
|
||||
if (fsensor_watch_runout && (fsensor_err_cnt > FSENSOR_ERR_MAX))
|
||||
{
|
||||
fsensor_stop_and_save_print();
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
@ -621,7 +621,7 @@ void fsensor_update(void)
|
||||
fsensor_enque_M600();
|
||||
}
|
||||
#else //PAT9125
|
||||
if (CHECK_FSENSOR && fsensor_enabled && ir_sensor_detected)
|
||||
if (CHECK_FSENSOR && ir_sensor_detected)
|
||||
{
|
||||
if(digitalRead(IR_SENSOR_PIN))
|
||||
{ // IR_SENSOR_PIN ~ H
|
||||
|
Loading…
Reference in New Issue
Block a user