mmu2_reporting.h 909 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /// @file mmu2_reporting.h
  2. #pragma once
  3. #include <stdint.h>
  4. namespace MMU2 {
  5. enum CommandInProgress : uint8_t {
  6. NoCommand = 0,
  7. CutFilament = 'C',
  8. EjectFilament = 'E',
  9. Homing = 'H',
  10. LoadFilament = 'L',
  11. Reset = 'X',
  12. ToolChange = 'T',
  13. UnloadFilament = 'U',
  14. };
  15. /// Called at the begin of every MMU operation
  16. void BeginReport(CommandInProgress cip, uint16_t ec);
  17. /// Called at the end of every MMU operation
  18. void EndReport(CommandInProgress cip, uint16_t ec);
  19. /// Called when the MMU sends operation error (even repeatedly)
  20. void ReportErrorHook(uint16_t ec);
  21. /// Called when the MMU sends operation progress update
  22. void ReportProgressHook(CommandInProgress cip, uint16_t ec);
  23. /// @returns true if the MMU is communicating and available
  24. /// can change at runtime
  25. bool MMUAvailable();
  26. /// Global Enable/Disable use MMU (to be stored in EEPROM)
  27. bool UseMMU();
  28. } // namespace