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_tune_menu.cpp 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*********************
  2. * bio_tune_menu.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: <https://www.gnu.org/licenses/>. *
  20. ****************************************************************************/
  21. #include "../config.h"
  22. #if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO)
  23. #include "screens.h"
  24. using namespace FTDI;
  25. using namespace Theme;
  26. using namespace ExtUI;
  27. void TuneMenu::onRedraw(draw_mode_t what) {
  28. #define GRID_ROWS 8
  29. #define GRID_COLS 2
  30. if (what & BACKGROUND) {
  31. CommandProcessor cmd;
  32. cmd.cmd(CLEAR_COLOR_RGB(bg_color))
  33. .cmd(CLEAR(true,true,true))
  34. .cmd(COLOR_RGB(bg_text_enabled))
  35. .tag(0)
  36. .font(font_large)
  37. .text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_MENU));
  38. }
  39. if (what & FOREGROUND) {
  40. CommandProcessor cmd;
  41. cmd.colors(normal_btn)
  42. .font(font_medium)
  43. .enabled( isPrinting()).tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_SPEED))
  44. .tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_BED_TEMPERATURE))
  45. .enabled(TERN_(BABYSTEPPING, true))
  46. .tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_NUDGE_NOZZLE))
  47. .enabled(!isPrinting()).tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME))
  48. .enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RAISE_PLUNGER))
  49. .enabled(!isPrinting()).tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS))
  50. .colors(action_btn) .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
  51. }
  52. #undef GRID_COLS
  53. #undef GRID_ROWS
  54. }
  55. bool TuneMenu::onTouchEnd(uint8_t tag) {
  56. switch (tag) {
  57. case 1: GOTO_PREVIOUS(); break;
  58. case 2: GOTO_SCREEN(FeedratePercentScreen); break;
  59. case 3: GOTO_SCREEN(TemperatureScreen); break;
  60. case 4: GOTO_SCREEN(NudgeNozzleScreen); break;
  61. case 5: GOTO_SCREEN(BioConfirmHomeXYZ); break;
  62. case 6: SpinnerDialogBox::enqueueAndWait_P(F("G0 E0 F120")); break;
  63. case 7: StatusScreen::unlockMotors(); break;
  64. default:
  65. return false;
  66. }
  67. return true;
  68. }
  69. #endif // TOUCH_UI_FTDI_EVE