Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
Public Member Functions | List of all members
modules::user_input::UserInput Class Reference

Public Member Functions

void Step ()
 collects the buttons' state and enqueues the corresponding event
 
void ProcessMessage (uint8_t ev)
 enqueues a user event coming from a communication
 
Event ConsumeEvent ()
 
Event ConsumeEventForPrinter ()
 
bool AnyEvent () const
 
void Clear ()
 Remove all buffered events from the event queue.
 
void SetPrinterInCharge (bool pc)
 
bool PrinterInCharge () const
 

Member Function Documentation

◆ AnyEvent()

bool modules::user_input::UserInput::AnyEvent ( ) const
inline
Returns
true if there is at least one event in the event queue

◆ ConsumeEvent()

Event modules::user_input::UserInput::ConsumeEvent ( )

Dequeues the most recent event from the queue for processing. This is what all the state machines shall call as is encapsulates the logic of not providing the buttons for the MMU FW in case the printer is in charge of UI processing.

◆ ConsumeEventForPrinter()

Event modules::user_input::UserInput::ConsumeEventForPrinter ( )

Dequeues the most recent event from the queue for sending to the printer. Beware - use this call wisely, it is intended only for extraction of events to be sent to the printer.

◆ PrinterInCharge()

bool modules::user_input::UserInput::PrinterInCharge ( ) const
inline
Returns
true if the printer is in charge of the buttons

◆ SetPrinterInCharge()

void modules::user_input::UserInput::SetPrinterInCharge ( bool  pc)
inline

Sets the UI module into a mode when the printer is in charge of processing the buttons (from all sources). That means the MMU will detect its buttons but it will not react upon them. This mode is important for error recovery when the printer needs to do some stuff before the MMU (like preheating the nozzle).


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