Fix filament sensor, but disable host action commands.

This commit is contained in:
Knutwurst
2023-05-24 19:22:58 +02:00
parent c01193bf40
commit 62fcc2ff35
4 changed files with 18 additions and 16 deletions

View File

@@ -2377,15 +2377,15 @@
* RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/
// #define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
// #define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
// #define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder.
#define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
// #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
// #define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
// #define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder.
// This is automatically enabled for MIXING_EXTRUDERs.
// Override individually if the runout sensors vary

View File

@@ -4007,12 +4007,12 @@
* Host Prompt Support enables Marlin to use the host for user prompts so
* filament runout and other processes can be managed from the host side.
*/
#define HOST_ACTION_COMMANDS
//#define HOST_ACTION_COMMANDS
#if ENABLED(HOST_ACTION_COMMANDS)
#define HOST_PAUSE_M76 // Tell the host to pause in response to M76
#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback
#if ENABLED(HOST_PROMPT_SUPPORT)
// #define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
#endif
// #define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
// #define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down

View File

@@ -214,16 +214,13 @@
LCD_SERIAL.begin(LCD_BAUDRATE);
#if DISABLED(KNUTWURST_4MAXP2)
SENDLINE_PGM("");
SENDLINE_PGM("J17"); // J17 Main board reset
delay(10);
SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
delay_ms(10);
#endif
mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
mediaPauseState = AMPAUSESTATE_NOT_PAUSED;
SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12"); // J12 Ready
currentTouchscreenSelection[0] = 0;
currentFileOrDirectory[0] = '\0';
SpecialMenu = false;
@@ -239,6 +236,7 @@
#if BOTH(SDSUPPORT, HAS_SD_DETECT)
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
SET_INPUT_PULLUP(FIL_RUNOUT1_PIN);
#endif
@@ -251,6 +249,10 @@
setup_OutageTestPin();
setup_PowerOffPin();
SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12"); // J12 Ready
DoFilamentRunoutCheck();
#ifdef STARTUP_CHIME
BUZZ(100, 554);
BUZZ(100, 740);
@@ -545,7 +547,7 @@
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PAUSE_L)) != NULL)
) {
SERIAL_ECHOLNPGM("Special Menu: Fil. Change Pause");
ResumePrint();
PausePrint();
}
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESUME_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESUME_S)) != NULL)
@@ -557,7 +559,7 @@
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_DIS_FILSENS_S)) != NULL)
) {
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
queue.inject_P(PSTR("M412 H0 S0\nM500"));
BUZZ(105, 1108);
BUZZ(105, 1108);
BUZZ(105, 1108);
@@ -566,7 +568,7 @@
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EN_FILSENS_S)) != NULL)
) {
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
queue.inject_P(PSTR("M412 H0 S1\nM500"));
BUZZ(105, 1108);
BUZZ(105, 1108);
}

View File

@@ -288,7 +288,7 @@
// RAMPS 1.4 DIO 4 on the servos connector
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 4
#define FIL_RUNOUT_PIN 19
#endif
#ifndef PS_ON_PIN