mmu2_fsensor.h 817 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <stdint.h>
  3. namespace MMU2 {
  4. /// Possible states of filament from the perspective of presence in various parts of the printer
  5. /// Beware, the numeric codes are important and sent into the MMU
  6. enum class FilamentState : uint_fast8_t {
  7. NOT_PRESENT = 0, ///< filament sensor doesn't see the filament
  8. AT_FSENSOR = 1, ///< filament detected by the filament sensor, but the nozzle has not detected the filament yet
  9. IN_NOZZLE = 2 ///< filament detected by the filament sensor and also loaded in the nozzle
  10. };
  11. FilamentState WhereIsFilament();
  12. /// Can be used to block printer's filament sensor handling - to avoid errorneous injecting of M600
  13. /// while doing a toolchange with the MMU
  14. class BlockRunoutRAII {
  15. public:
  16. BlockRunoutRAII();
  17. ~BlockRunoutRAII();
  18. };
  19. } // namespace MMU2