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.

bed_mesh_edit_screen.h 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**************************
  2. * bed_mesh_edit_screen.h *
  3. *************************/
  4. /****************************************************************************
  5. * Written By Marcio Teixeira 2020 *
  6. * *
  7. * This program is free software: you can redistribute it and/or modify *
  8. * it under the terms of the GNU General Public License as published by *
  9. * the Free Software Foundation, either version 3 of the License, or *
  10. * (at your option) any later version. *
  11. * *
  12. * This program is distributed in the hope that it will be useful, *
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  15. * GNU General Public License for more details. *
  16. * *
  17. * To view a copy of the GNU General Public License, go to the following *
  18. * location: <https://www.gnu.org/licenses/>. *
  19. ****************************************************************************/
  20. #pragma once
  21. #define FTDI_BED_MESH_EDIT_SCREEN
  22. #define FTDI_BED_MESH_EDIT_SCREEN_CLASS BedMeshEditScreen
  23. struct BedMeshEditScreenData {
  24. bool needSave, savedMeshLevelingState, savedEndstopState;
  25. xy_uint8_t highlight;
  26. float zAdjustment;
  27. };
  28. class BedMeshEditScreen : public BedMeshBase, public CachedScreen<BED_MESH_EDIT_SCREEN_CACHE> {
  29. private:
  30. static void makeMeshValid();
  31. static float getHighlightedValue();
  32. static void setHighlightedValue(float value);
  33. static void moveToHighlightedValue();
  34. static void adjustHighlightedValue(float increment);
  35. static void saveAdjustedHighlightedValue();
  36. static bool changeHighlightedValue(uint8_t tag);
  37. static void drawHighlightedPointValue();
  38. public:
  39. static void onEntry();
  40. static void onExit();
  41. static void onRedraw(draw_mode_t);
  42. static bool onTouchHeld(uint8_t tag);
  43. static bool onTouchEnd(uint8_t tag);
  44. static void show();
  45. };