Some M600 and Filament Runout Fixes.

This commit is contained in:
Knutwurst
2022-02-01 12:29:25 +01:00
parent 8e2c5513d1
commit e32e753ebf
2 changed files with 13 additions and 1 deletions

View File

@@ -237,10 +237,12 @@ void AnycubicTouchscreenClass::Setup() {
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
if ((READ(FILAMENT_RUNOUT_PIN) == true) && FilamentSensorEnabled) {
/*
#ifndef ANYCUBIC_TFT_DEBUG
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
HARDWARE_SERIAL_ENTER();
#endif
*/
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
#endif
@@ -1394,6 +1396,15 @@ void AnycubicTouchscreenClass::StateHandler() {
}
}
/*
* TODO: Refactoring of the filamentsensor-Stuff.
*
* Every cycle a timer should be reset if the sensor reads "filament is present"
* If the timer is not reset within a period of time, the filament runout state
* should be triggered.
*/
void AnycubicTouchscreenClass::FilamentRunout() {
if (FilamentSensorEnabled == true) {
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)