Add HAS_FILAMENT_SENSOR ahead of 12962

This commit is contained in:
Scott Lahteine
2019-02-12 20:08:34 -06:00
parent 2c8d12d3ec
commit 7cf9b93f26
22 changed files with 36 additions and 35 deletions

View File

@ -65,7 +65,7 @@ void GcodeSuite::M600() {
int8_t DXC_ext = target_extruder;
if (!parser.seen('T')) { // If no tool index is specified, M600 was (probably) sent in response to filament runout.
// In this case, for duplicating modes set DXC_ext to the extruder that ran out.
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && NUM_RUNOUT_SENSORS > 1
#if HAS_FILAMENT_SENSOR && NUM_RUNOUT_SENSORS > 1
if (dxc_is_duplicating())
DXC_ext = (READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT_INVERTING) ? 1 : 0;
#else

View File

@ -22,7 +22,7 @@
#include "../../../inc/MarlinConfig.h"
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#if HAS_FILAMENT_SENSOR
#include "../../gcode.h"
#include "../../../feature/runout.h"
@ -50,4 +50,4 @@ void GcodeSuite::M412() {
}
}
#endif // FILAMENT_RUNOUT_SENSOR
#endif // HAS_FILAMENT_SENSOR

View File

@ -576,7 +576,7 @@ void GcodeSuite::process_parsed_command(
case 407: M407(); break; // M407: Display measured filament diameter
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#if HAS_FILAMENT_SENSOR
case 412: M412(); break; // M412: Enable/Disable filament runout detection
#endif

View File

@ -723,7 +723,7 @@ private:
static void M407();
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#if HAS_FILAMENT_SENSOR
static void M412();
#endif