Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
unload_filament.h
Go to the documentation of this file.
1 #pragma once
3 #include <stdint.h>
4 #include "command_base.h"
5 #include "feed_to_finda.h"
6 #include "unload_to_finda.h"
7 #include "retract_from_finda.h"
8 
9 namespace logic {
10 
12 class UnloadFilament : public CommandBase {
13 public:
14  inline constexpr UnloadFilament()
15  : CommandBase() {}
16 
19  bool Reset(uint8_t param) override;
20 
22  bool StepInner() override;
23 
24 private:
25  constexpr static const uint8_t maxRetries = 1;
26 
28  void UnloadFinishedCorrectly();
29  void GoToRetractingFromFinda();
30  void GoToRecheckFilamentAgainstFINDA();
31 
32  UnloadToFinda unl;
33  FeedToFinda feed;
34  RetractFromFinda retract;
35 };
36 
39 
40 } // 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 unloading filament.
Definition: unload_filament.h:12
bool StepInner() override
Definition: unload_filament.cpp:57
bool Reset(uint8_t param) override
Definition: unload_filament.cpp:19
The logic namespace handles the application logic on top of the modules.
Definition: application.h:8
UnloadFilament unloadFilament
The one and only instance of UnloadFilament state machine in the FW.
Definition: unload_filament.cpp:17
Feed filament to FINDA.
Definition: feed_to_finda.h:13
Retract filament from FINDA to PTFE.
Definition: retract_from_finda.h:14
Unload to FINDA "small" state machine.
Definition: unload_to_finda.h:14