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.

bedlevel_tools.h 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  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. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * Bed Level Tools for Pro UI
  24. * Extended by: Miguel A. Risco-Castillo (MRISCOC)
  25. * Version: 2.0.0
  26. * Date: 2022/05/23
  27. *
  28. * Based on the original work of: Henri-J-Norden
  29. * https://github.com/Jyers/Marlin/pull/126
  30. */
  31. #pragma once
  32. #include "../../../inc/MarlinConfigPre.h"
  33. #if ENABLED(AUTO_BED_LEVELING_UBL)
  34. //#define USE_UBL_VIEWER 1
  35. #endif
  36. #define MESH_Z_OFFSET_MIN -3.0
  37. #define MESH_Z_OFFSET_MAX 3.0
  38. class BedLevelToolsClass {
  39. public:
  40. #if USE_UBL_VIEWER
  41. static bool viewer_asymmetric_range;
  42. static bool viewer_print_value;
  43. #endif
  44. static bool goto_mesh_value;
  45. static uint8_t mesh_x;
  46. static uint8_t mesh_y;
  47. static uint8_t tilt_grid;
  48. #if ENABLED(AUTO_BED_LEVELING_UBL)
  49. static void manual_value_update(const uint8_t mesh_x, const uint8_t mesh_y, bool undefined=false);
  50. static bool create_plane_from_mesh();
  51. #else
  52. static void manual_value_update(const uint8_t mesh_x, const uint8_t mesh_y);
  53. #endif
  54. static void manual_move(const uint8_t mesh_x, const uint8_t mesh_y, bool zmove=false);
  55. static void MoveToXYZ();
  56. static void MoveToXY();
  57. static void MoveToZ();
  58. static void ProbeXY();
  59. static float get_max_value();
  60. static float get_min_value();
  61. static bool meshvalidate();
  62. #if USE_UBL_VIEWER
  63. static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7);
  64. static void Set_Mesh_Viewer_Status();
  65. #endif
  66. };
  67. extern BedLevelToolsClass BedLevelTools;
  68. void Goto_MeshViewer();