|
Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
|
The selector model - handles asynchronnous move operations between filament individual slots and keeps track of selector's current state. More...
#include <selector.h>


Public Member Functions | |
| OperationResult | MoveToSlot (uint8_t slot) |
| bool | Step () |
| void | Init () |
Public Member Functions inherited from modules::motion::MovableBase | |
| constexpr | MovableBase (config::Axis axis) |
| uint8_t | Slot () const |
| virtual ~MovableBase(); intentionally disabled, see description in logic::CommandBase More... | |
| uint8_t | State () const |
| hal::tmc2130::ErrorFlags | TMCErrorFlags () const |
| void | InvalidateHoming () |
| OperationResult | PlanHome () |
| bool | HomingValid () const |
| config::Axis | Axis () const |
| void | SetCurrents (uint8_t iRun, uint8_t iHold) |
| void | HoldOn () |
| bool | IsOnHold () const |
| void | Resume () |
| Allows the movable to move/home again after begin suspended by HoldOn. | |
Static Public Member Functions | |
| static constexpr mm::S_pos_t | SlotPosition (uint8_t slot) |
| static constexpr uint8_t | IdleSlotIndex () |
Protected Member Functions | |
| virtual void | PrepareMoveToPlannedSlot () override |
| virtual void | PlanHomingMoveForward () override |
| virtual void | PlanHomingMoveBack () override |
| virtual bool | FinishHomingAndPlanMoveToParkPos () override |
| virtual void | FinishMove () override |
Protected Member Functions inherited from modules::motion::MovableBase | |
| virtual bool | StallGuardAllowed (bool forward) const |
| OperationResult | InitMovement () |
| OperationResult | InitMovementNoReinitAxis () |
| Initializes movement of a movable module without reinitializing the axis/TMC driver. | |
| void | PerformMove () |
| void | PerformHomeForward () |
| void | PerformHomeBack () |
| void | HomeFailed () |
| void | CheckTMC () |
| uint16_t | AxisDistance (int32_t curPos) const |
Additional Inherited Members | |
Public Types inherited from modules::motion::MovableBase | |
| enum | { Ready = 0 , Moving = 1 , PlannedHome = 2 , HomeForward = 3 , HomeBack = 4 , TMCFailed = 5 , HomingFailed = 6 , OnHold = 0x80 } |
| Internal states of the state machine. More... | |
| enum class | OperationResult : uint8_t { Accepted , Refused , Failed } |
| Operation (Engage/Disengage/MoveToSlot) return values. More... | |
Protected Attributes inherited from modules::motion::MovableBase | |
| uint8_t | state |
| internal state of the automaton | |
| uint8_t | plannedSlot |
| planned slot - where to move to | |
| uint8_t | currentSlot |
| current slot | |
| bool | homingValid |
| true if the axis is considered as homed | |
| hal::tmc2130::ErrorFlags | tmcErrorFlags |
| cached TMC2130 error flags - being read only if the axis is enabled and doing something (moving) | |
| config::Axis | axis |
| int32_t | axisStart |
The selector model - handles asynchronnous move operations between filament individual slots and keeps track of selector's current state.
|
overrideprotectedvirtual |
Implements modules::motion::MovableBase.
|
inlinestaticconstexpr |
| void modules::selector::Selector::Init | ( | ) |
Initializes the selector after restart/cold boot Reads the active slot from the EEPROM and decides if the selector is free or blocked by a piece of filament
| Selector::OperationResult modules::selector::Selector::MoveToSlot | ( | uint8_t | slot | ) |
Plan move of the selector to a specific filament slot
| slot | index to move to |
|
inlinestaticconstexpr |
| bool modules::selector::Selector::Step | ( | ) |
Performs one step of the state machine according to currently planned operation.