Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
Public Types | Public Member Functions | List of all members
logic::FeedToFinda Struct Reference

Feed filament to FINDA. More...

#include <feed_to_finda.h>

Public Types

enum  {
  EngagingIdler , PushingFilament , PushingFilamentUnlimited , UnloadBackToPTFE ,
  DisengagingIdler , OK , Failed , Stopped
}
 internal states of the state machine
 

Public Member Functions

bool Reset (bool feedPhaseLimited, bool haltAtEnd)
 
bool Step ()
 
uint8_t State () const
 

Detailed Description

Feed filament to FINDA.

Continuously feed filament until FINDA is not switched ON and than retract to align filament 600 steps away from FINDA. Leaves the Idler engaged for chaining potential next operations. Leaves the Pulley axis enabled for chaining potential next operations

Member Function Documentation

◆ Reset()

bool logic::FeedToFinda::Reset ( bool  feedPhaseLimited,
bool  haltAtEnd 
)

Restart the automaton

Parameters
feedPhaseLimited
  • true feed phase is limited, doesn't react on button press
  • false feed phase is unlimited, can be interrupted by any button press after blanking time Beware: the function returns immediately without actually doing anything if the FINDA is "pressed", i.e. the filament is already at the FINDA
haltAtEndtrue if the Pulley's motion shall be brought into a halt (which is what LoadFilament wants, but not ToolChange)
Returns
  • true if the operation has been successfully started.
  • false if the selector refused to move to the desired spot (which can be caused by pressed FINDA)

◆ State()

uint8_t logic::FeedToFinda::State ( ) const
inline

This method may be used to check the result of the automaton

Returns
OK if everything went OK and FINDA triggered (or the user pressed a button)
Failed if the FINDA didn't trigger

◆ Step()

bool logic::FeedToFinda::Step ( )
Returns
true if the state machine finished its job, false otherwise

The documentation for this struct was generated from the following files: