Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
feed_to_finda.h
Go to the documentation of this file.
1 #pragma once
3 #include <stdint.h>
4 
5 namespace logic {
6 
13 struct FeedToFinda {
15  enum {
16  EngagingIdler,
17  PushingFilament,
18  PushingFilamentUnlimited,
19  UnloadBackToPTFE,
20  DisengagingIdler,
21  OK,
22  Failed,
23  Stopped
24  };
25 
26  inline constexpr FeedToFinda()
27  : state(OK)
28  , feedPhaseLimited(true)
29  , haltAtEnd(0) {}
30 
40  bool Reset(bool feedPhaseLimited, bool haltAtEnd);
41 
43  bool Step();
44 
48  inline uint8_t State() const { return state; }
49 
50 private:
51  uint8_t state;
52  bool feedPhaseLimited;
53  bool haltAtEnd;
54 };
55 
56 } // namespace logic
The logic namespace handles the application logic on top of the modules.
Definition: application.h:8
Feed filament to FINDA.
Definition: feed_to_finda.h:13
bool Reset(bool feedPhaseLimited, bool haltAtEnd)
Definition: feed_to_finda.cpp:15
uint8_t State() const
Definition: feed_to_finda.h:48
bool Step()
Definition: feed_to_finda.cpp:32