暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

flash.sh 424B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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. #pragma once
  23. #include "../inc/MarlinConfig.h"
  24. #include "../module/probe.h"
  25. #if !WITHIN(TRAMMING_SCREW_THREAD, 30, 51) || TRAMMING_SCREW_THREAD % 10 > 1
  26. #error "TRAMMING_SCREW_THREAD must be equal to 30, 31, 40, 41, 50, or 51."
  27. #endif
  28. constexpr xy_pos_t tramming_points[] = TRAMMING_POINT_XY;
  29. #define G35_PROBE_COUNT COUNT(tramming_points)
  30. static_assert(WITHIN(G35_PROBE_COUNT, 3, 6), "TRAMMING_POINT_XY requires between 3 and 6 XY positions.");
  31. #define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(tramming_points[N]), \
  32. "TRAMMING_POINT_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
  33. VALIDATE_TRAMMING_POINT(0); VALIDATE_TRAMMING_POINT(1); VALIDATE_TRAMMING_POINT(2); VALIDATE_TRAMMING_POINT(3); VALIDATE_TRAMMING_POINT(4); VALIDATE_TRAMMING_POINT(5);
  34. extern const char point_name_1[], point_name_2[], point_name_3[]
  35. #ifdef TRAMMING_POINT_NAME_4
  36. , point_name_4[]
  37. #ifdef TRAMMING_POINT_NAME_5
  38. , point_name_5[]
  39. #ifdef TRAMMING_POINT_NAME_6
  40. , point_name_6[]
  41. #endif
  42. #endif
  43. #endif
  44. ;
  45. #define _NR_TRAM_NAMES 2
  46. #ifdef TRAMMING_POINT_NAME_3
  47. #undef _NR_TRAM_NAMES
  48. #define _NR_TRAM_NAMES 3
  49. #ifdef TRAMMING_POINT_NAME_4
  50. #undef _NR_TRAM_NAMES
  51. #define _NR_TRAM_NAMES 4
  52. #ifdef TRAMMING_POINT_NAME_5
  53. #undef _NR_TRAM_NAMES
  54. #define _NR_TRAM_NAMES 5
  55. #ifdef TRAMMING_POINT_NAME_6
  56. #undef _NR_TRAM_NAMES
  57. #define _NR_TRAM_NAMES 6
  58. #endif
  59. #endif
  60. #endif
  61. #endif
  62. static_assert(_NR_TRAM_NAMES >= G35_PROBE_COUNT, "Define enough TRAMMING_POINT_NAME_s for all TRAMMING_POINT_XY entries.");
  63. #undef _NR_TRAM_NAMES
  64. extern PGM_P const tramming_point_name[];
  65. #ifdef ASSISTED_TRAMMING_WAIT_POSITION
  66. void move_to_tramming_wait_pos();
  67. #else
  68. inline void move_to_tramming_wait_pos() {}
  69. #endif