mmu2_reporting.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #include "mmu2_reporting.h"
  2. #include "ultralcd.h"
  3. namespace MMU2 {
  4. const char * const ProgressCodeToText(uint16_t pc); // we may join progress convertor and reporter together
  5. void BeginReport(CommandInProgress cip, uint16_t ec) {
  6. custom_message_type = CustomMsg::MMUProgress;
  7. lcd_setstatuspgm( ProgressCodeToText(ec) );
  8. }
  9. void EndReport(CommandInProgress cip, uint16_t ec) {
  10. // clear the status msg line - let the printed filename get visible again
  11. custom_message_type = CustomMsg::Status;
  12. }
  13. void ReportErrorHook(CommandInProgress cip, uint16_t ec) {
  14. // @@TODO - display an error screen - we still don't know how that will look like
  15. // The only thing we know is the fact, that the screen must not block the MMU automaton
  16. }
  17. void ReportProgressHook(CommandInProgress cip, uint16_t ec) {
  18. custom_message_type = CustomMsg::MMUProgress;
  19. lcd_setstatuspgm( ProgressCodeToText(ec) );
  20. }
  21. Buttons ButtonPressed(uint16_t ec) {
  22. // query the MMU error screen if a button has been pressed/selected
  23. }
  24. } // namespace MMU2