My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bio_confirm_home_e.cpp 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /****************************
  2. * bio_confirm_home_xyz.cpp *
  3. ****************************/
  4. /****************************************************************************
  5. * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
  6. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  7. * *
  8. * This program is free software: you can redistribute it and/or modify *
  9. * it under the terms of the GNU General Public License as published by *
  10. * the Free Software Foundation, either version 3 of the License, or *
  11. * (at your option) any later version. *
  12. * *
  13. * This program is distributed in the hope that it will be useful, *
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU General Public License for more details. *
  17. * *
  18. * To view a copy of the GNU General Public License, go to the following *
  19. * location: <http://www.gnu.org/licenses/>. *
  20. ****************************************************************************/
  21. #include "../config.h"
  22. #if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
  23. #include "screens.h"
  24. using namespace FTDI;
  25. void BioConfirmHomeE::onRedraw(draw_mode_t) {
  26. drawMessage(GET_TEXTF(HOMING_WARNING));
  27. drawYesNoButtons(1);
  28. }
  29. bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
  30. switch (tag) {
  31. case 1:
  32. SpinnerDialogBox::enqueueAndWait_P(F(
  33. "G112\n" /* Home extruder */
  34. LULZBOT_AXIS_LEVELING_COMMANDS /* Level X axis */
  35. "G0 X115 Z50 F6000\n" /* Goto loading position */
  36. "M400\n" /* Wait for moves to finish */
  37. "M18 X Y" /* Unlock motors */
  38. ));
  39. current_screen.forget();
  40. break;
  41. case 2:
  42. GOTO_SCREEN(StatusScreen);
  43. break;
  44. default:
  45. return DialogBoxBaseClass::onTouchEnd(tag);
  46. }
  47. return true;
  48. }
  49. #endif // LULZBOT_TOUCH_UI