My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

z_offset_screen.cpp 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /***********************
  2. * z_offset_screen.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 BOTH(TOUCH_UI_FTDI_EVE, HAS_BED_PROBE)
  23. #include "screens.h"
  24. using namespace FTDI;
  25. using namespace ExtUI;
  26. using namespace Theme;
  27. void ZOffsetScreen::onRedraw(draw_mode_t what) {
  28. widgets_t w(what);
  29. w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXT_F(MSG_UNITS_MM));
  30. w.heading( GET_TEXT_F(MSG_ZPROBE_ZOFFSET));
  31. w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm());
  32. w.increments();
  33. }
  34. bool ZOffsetScreen::onTouchHeld(uint8_t tag) {
  35. const float increment = getIncrement();
  36. switch (tag) {
  37. case 4: UI_DECREMENT(ZOffset_mm); break;
  38. case 5: UI_INCREMENT(ZOffset_mm); break;
  39. default:
  40. return false;
  41. }
  42. SaveSettingsDialogBox::settingsChanged();
  43. return true;
  44. }
  45. #endif // TOUCH_UI_FTDI_EVE && HAS_BED_PROBE