Refer to runout 1
This commit is contained in:
parent
7b66e05f67
commit
e86213f2a9
5 changed files with 5 additions and 7 deletions
|
|
@ -163,7 +163,7 @@ uint8_t MMU2::get_current_tool() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EITHER(PRUSA_MMU2_S_MODE, MMU_EXTRUDER_SENSOR)
|
#if EITHER(PRUSA_MMU2_S_MODE, MMU_EXTRUDER_SENSOR)
|
||||||
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE)
|
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void MMU2::mmu_loop() {
|
void MMU2::mmu_loop() {
|
||||||
|
|
|
||||||
|
|
@ -677,7 +677,6 @@
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
#if NUM_RUNOUT_SENSORS >= 1
|
#if NUM_RUNOUT_SENSORS >= 1
|
||||||
#define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN
|
|
||||||
#ifndef FIL_RUNOUT1_STATE
|
#ifndef FIL_RUNOUT1_STATE
|
||||||
#define FIL_RUNOUT1_STATE FIL_RUNOUT_STATE
|
#define FIL_RUNOUT1_STATE FIL_RUNOUT_STATE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -808,7 +808,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||||
* Filament Runout needs one or more pins and either SD Support or Auto print start detection
|
* Filament Runout needs one or more pins and either SD Support or Auto print start detection
|
||||||
*/
|
*/
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if HAS_FILAMENT_SENSOR
|
||||||
|
|
||||||
#if !PIN_EXISTS(FIL_RUNOUT)
|
#if !PIN_EXISTS(FIL_RUNOUT)
|
||||||
#error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
|
#error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
|
||||||
#elif NUM_RUNOUT_SENSORS > E_STEPPERS
|
#elif NUM_RUNOUT_SENSORS > E_STEPPERS
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ void AnycubicTFTClass::OnSetup() {
|
||||||
SET_INPUT_PULLUP(SD_DETECT_PIN);
|
SET_INPUT_PULLUP(SD_DETECT_PIN);
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
SET_INPUT_PULLUP(FIL_RUNOUT_PIN);
|
SET_INPUT_PULLUP(FIL_RUNOUT1_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
|
mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
|
||||||
|
|
@ -935,7 +935,7 @@ void AnycubicTFTClass::DoFilamentRunoutCheck() {
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
// NOTE: ExtUI::getFilamentRunoutState() only returns the runout state if the job is printing
|
// NOTE: ExtUI::getFilamentRunoutState() only returns the runout state if the job is printing
|
||||||
// we want to actually check the status of the pin here, regardless of printstate
|
// we want to actually check the status of the pin here, regardless of printstate
|
||||||
if (READ(FIL_RUNOUT_PIN)) {
|
if (READ(FIL_RUNOUT1_PIN)) {
|
||||||
if (mediaPrintingState == AMPRINTSTATE_PRINTING || mediaPrintingState == AMPRINTSTATE_PAUSED || mediaPrintingState == AMPRINTSTATE_PAUSE_REQUESTED) {
|
if (mediaPrintingState == AMPRINTSTATE_PRINTING || mediaPrintingState == AMPRINTSTATE_PAUSED || mediaPrintingState == AMPRINTSTATE_PAUSE_REQUESTED) {
|
||||||
// play tone to indicate filament is out
|
// play tone to indicate filament is out
|
||||||
ExtUI::injectCommands_P(PSTR("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567"));
|
ExtUI::injectCommands_P(PSTR("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567"));
|
||||||
|
|
@ -983,7 +983,7 @@ void AnycubicTFTClass::PausePrint() {
|
||||||
void AnycubicTFTClass::ResumePrint() {
|
void AnycubicTFTClass::ResumePrint() {
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
if (READ(FIL_RUNOUT_PIN)) {
|
if (READ(FIL_RUNOUT1_PIN)) {
|
||||||
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... ");
|
SERIAL_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... ");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ void _O2 Endstops::report_states() {
|
||||||
#endif
|
#endif
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if HAS_FILAMENT_SENSOR
|
||||||
#if NUM_RUNOUT_SENSORS == 1
|
#if NUM_RUNOUT_SENSORS == 1
|
||||||
print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
|
print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
|
||||||
#else
|
#else
|
||||||
#define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; state = FIL_RUNOUT##N##_STATE; break;
|
#define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; state = FIL_RUNOUT##N##_STATE; break;
|
||||||
LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) {
|
LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue