Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
eject_filament.h
Go to the documentation of this file.
1 #pragma once
3 #include <stdint.h>
4 #include "command_base.h"
5 #include "unload_filament.h"
6 #include "../modules/axisunit.h"
7 
8 namespace logic {
9 
23 class EjectFilament : public CommandBase {
24 public:
25  inline constexpr EjectFilament()
26  : CommandBase()
27  , slot(0) {}
28 
31  bool Reset(uint8_t param) override;
32 
34  bool StepInner() override;
35 
36  ProgressCode State() const override;
37 
38  ErrorCode Error() const override;
39 
40 #ifndef UNITTEST
41 private:
42 #endif
43  UnloadFilament unl;
44  uint8_t slot;
45  void MoveSelectorAside();
46 };
47 
50 
51 } // namespace logic
Base class defining common API for high-level operations/commands/state machines.
Definition: command_base.h:29
A high-level command state machine - handles the complex logic of ejecting filament.
Definition: eject_filament.h:23
bool StepInner() override
Definition: eject_filament.cpp:44
bool Reset(uint8_t param) override
Definition: eject_filament.cpp:18
ErrorCode Error() const override
Definition: eject_filament.cpp:116
ProgressCode State() const override
Definition: eject_filament.cpp:107
A high-level command state machine - handles the complex logic of unloading filament.
Definition: unload_filament.h:12
ErrorCode
Definition: error_codes.h:17
The logic namespace handles the application logic on top of the modules.
Definition: application.h:8
EjectFilament ejectFilament
The one and only instance of EjectFilament state machine in the FW.
Definition: eject_filament.cpp:16
ProgressCode
Definition: progress_codes.h:11