Prusa MINI Firmware overview
FilamentSensorSwitch Class Reference

#include <runout.h>

Inheritance diagram for FilamentSensorSwitch:
Collaboration diagram for FilamentSensorSwitch:

Static Public Member Functions

static void block_completed (const block_t *const)
 
static void run ()
 
- Static Public Member Functions inherited from FilamentSensorBase
static void setup ()
 
static uint8_t poll_runout_pins ()
 
static uint8_t poll_runout_states ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from FilamentSensorBase
static void filament_present (const uint8_t extruder)
 

Detailed Description

This is a simple endstop switch in the path of the filament. It can detect filament runout, but not stripouts or jams.

Member Function Documentation

◆ block_completed()

static void FilamentSensorSwitch::block_completed ( const block_t * const  )
static
271 {}

◆ run()

static void FilamentSensorSwitch::run ( )
static
273  {
274  const bool out = poll_runout_state(active_extruder);
276  #ifdef FILAMENT_RUNOUT_SENSOR_DEBUG
277  static bool was_out = false;
278  if (out != was_out) {
279  was_out = out;
280  SERIAL_ECHOPGM("Filament ");
281  serialprintPGM(out ? PSTR("OUT\n") : PSTR("IN\n"));
282  }
283  #endif
284  }
Here is the call graph for this function:
PSTR
#define PSTR(str)
Definition: pgmspace.h:31
SERIAL_ECHOPGM
#define SERIAL_ECHOPGM(S)
Definition: serial.h:173
FilamentSensorBase::filament_present
static void filament_present(const uint8_t extruder)
serialprintPGM
void serialprintPGM(PGM_P str)
Definition: serial.cpp:35
active_extruder
constexpr uint8_t active_extruder
Definition: motion.h:107