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.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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: <http://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(
  46. #if ENABLED(BABYSTEPPING)
  47. true
  48. #endif
  49. )
  50. .tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_NUDGE_NOZZLE))
  51. .enabled(!isPrinting()).tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME))
  52. .enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RAISE_PLUNGER))
  53. .enabled(!isPrinting()).tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS))
  54. .colors(action_btn) .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
  55. }
  56. #undef GRID_COLS
  57. #undef GRID_ROWS
  58. }
  59. bool TuneMenu::onTouchEnd(uint8_t tag) {
  60. switch (tag) {
  61. case 1: GOTO_PREVIOUS(); break;
  62. case 2: GOTO_SCREEN(FeedratePercentScreen); break;
  63. case 3: GOTO_SCREEN(TemperatureScreen); break;
  64. case 4: GOTO_SCREEN(NudgeNozzleScreen); break;
  65. case 5: GOTO_SCREEN(BioConfirmHomeXYZ); break;
  66. case 6: SpinnerDialogBox::enqueueAndWait_P(F("G0 E0 F120")); break;
  67. case 7: StatusScreen::unlockMotors(); break;
  68. default:
  69. return false;
  70. }
  71. return true;
  72. }
  73. #endif // TOUCH_UI_FTDI_EVE