Prusa MINI Firmware overview
TFilamentMonitor< RESPONSE_T, SENSOR_T > Class Template Reference

#include <runout.h>

Inheritance diagram for TFilamentMonitor< RESPONSE_T, SENSOR_T >:
Collaboration diagram for TFilamentMonitor< RESPONSE_T, SENSOR_T >:

Static Public Member Functions

static void setup ()
 
static void reset ()
 
static void filament_present (const uint8_t extruder)
 
static void block_completed (const block_t *const b)
 
static void run ()
 

Additional Inherited Members

- Static Public Attributes inherited from FilamentMonitorBase
static bool enabled
 
static bool filament_ran_out
 
static constexpr bool host_handling = false
 

Member Function Documentation

◆ setup()

template<class RESPONSE_T , class SENSOR_T >
static void TFilamentMonitor< RESPONSE_T, SENSOR_T >::setup ( )
static
71  {
72  sensor.setup();
73  reset();
74  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

template<class RESPONSE_T , class SENSOR_T >
static void TFilamentMonitor< RESPONSE_T, SENSOR_T >::reset ( )
static
76  {
77  filament_ran_out = false;
78  response.reset();
79  }
Here is the caller graph for this function:

◆ filament_present()

template<class RESPONSE_T , class SENSOR_T >
static void TFilamentMonitor< RESPONSE_T, SENSOR_T >::filament_present ( const uint8_t  extruder)
static
83  {
84  response.filament_present(extruder);
85  }

◆ block_completed()

template<class RESPONSE_T , class SENSOR_T >
static void TFilamentMonitor< RESPONSE_T, SENSOR_T >::block_completed ( const block_t *const  b)
static
94  {
95  if (enabled) {
96  response.block_completed(b);
97  sensor.block_completed(b);
98  }
99  }
Here is the caller graph for this function:

◆ run()

template<class RESPONSE_T , class SENSOR_T >
static void TFilamentMonitor< RESPONSE_T, SENSOR_T >::run ( )
static
102  {
105  || did_pause_print
106  #endif
107  )) {
108  #ifdef FILAMENT_RUNOUT_DISTANCE_MM
109  cli(); // Prevent RunoutResponseDelayed::block_completed from accumulating here
110  #endif
111  response.run();
112  sensor.run();
113  const bool ran_out = response.has_run_out();
114  #ifdef FILAMENT_RUNOUT_DISTANCE_MM
115  sei();
116  #endif
117  if (ran_out) {
118  filament_ran_out = true;
121  }
122  }
123  }
Here is the call graph for this function:
Here is the caller graph for this function:
Planner::synchronize
static void synchronize()
Definition: planner.cpp:1556
FilamentMonitorBase::filament_ran_out
static bool filament_ran_out
Definition: runout.h:53
TFilamentMonitor::reset
static void reset()
Definition: runout.h:76
cli
void cli()
event_filament_runout
void event_filament_runout()
sei
void sei()
ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE
Definition: Configuration_A3ides_2209_MINI_adv.h:1311
FilamentMonitorBase::enabled
static bool enabled
Definition: runout.h:53
printingIsActive
bool printingIsActive()
Definition: Marlin.cpp:349
createSpeedLookupTable.b
list b
Definition: createSpeedLookupTable.py:30
ENABLED
#define ENABLED(V...)
Definition: macros.h:177
planner
Planner planner
Definition: planner.cpp:111