From 81cd4c66cc52788ea23a34ed939b68971c36bc0c Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Thu, 31 May 2018 09:15:08 -0400 Subject: [PATCH] Added toggle for filament sensor or laser --- Marlin/Configuration.h | 10 +++++++++- Marlin/Configuration_adv.h | 5 +++-- Marlin/pins_RUMBA.h | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2cf6793e84..eba39f17d9 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -26,6 +26,11 @@ //#define BedAC //#define tallVersion + +/* + * Enables a filament sensor plugged into the laser pin. Disables the laser + */ +#define FilamentSensor /** * Configuration.h * @@ -890,11 +895,14 @@ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. * By default the firmware assumes HIGH=FILAMENT PRESENT. */ -//#define FILAMENT_RUNOUT_SENSOR + #if(ENABLED(FilamentSensor)) + #define FILAMENT_RUNOUT_SENSOR +#endif #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + #define FILAMENT_RUNOUT_PIN 4 #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 67e712b47a..70ab1a1d47 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1379,8 +1379,9 @@ //#define SPEED_POWER_MAX 100 // 0-100% #endif - -#define FAN_AS_LASER +#if(!ENABLED(FilamentSensor)) + #define FAN_AS_LASER +#endif #if ENABLED(FAN_AS_LASER) #define FAN_NUM_AS_LASER 1 #define LASER_PIN_DEDICATED true diff --git a/Marlin/pins_RUMBA.h b/Marlin/pins_RUMBA.h index 05b6400966..40013cb4c2 100644 --- a/Marlin/pins_RUMBA.h +++ b/Marlin/pins_RUMBA.h @@ -147,7 +147,9 @@ #define LASER_PIN -1 #define FAN_PIN 9 -#define FAN1_PIN 4 +#if(!ENABLED(FilamentSensor)) + #define FAN1_PIN 4 +#endif // // Misc. Functions