Markus пре 3 година
родитељ
комит
d4ac8bc67b
No account linked to committer's email address
2 измењених фајлова са 15 додато и 2 уклоњено
  1. 6
    0
      Marlin/src/feature/tramming.cpp
  2. 9
    2
      Marlin/src/feature/tramming.h

+ 6
- 0
Marlin/src/feature/tramming.cpp Прегледај датотеку

@@ -36,6 +36,9 @@ PGMSTR(point_name_3, TRAMMING_POINT_NAME_3);
36 36
   PGMSTR(point_name_4, TRAMMING_POINT_NAME_4);
37 37
   #ifdef TRAMMING_POINT_NAME_5
38 38
     PGMSTR(point_name_5, TRAMMING_POINT_NAME_5);
39
+    #ifdef TRAMMING_POINT_NAME_6
40
+      PGMSTR(point_name_6, TRAMMING_POINT_NAME_6);
41
+    #endif
39 42
   #endif
40 43
 #endif
41 44
 
@@ -45,6 +48,9 @@ PGM_P const tramming_point_name[] PROGMEM = {
45 48
     , point_name_4
46 49
     #ifdef TRAMMING_POINT_NAME_5
47 50
       , point_name_5
51
+      #ifdef TRAMMING_POINT_NAME_6
52
+        , point_name_6
53
+      #endif
48 54
     #endif
49 55
   #endif
50 56
 };

+ 9
- 2
Marlin/src/feature/tramming.h Прегледај датотеку

@@ -31,17 +31,20 @@
31 31
 constexpr xy_pos_t screws_tilt_adjust_pos[] = TRAMMING_POINT_XY;
32 32
 
33 33
 #define G35_PROBE_COUNT COUNT(screws_tilt_adjust_pos)
34
-static_assert(G35_PROBE_COUNT >= 3, "TRAMMING_POINT_XY requires at least 3 XY positions.");
34
+static_assert(WITHIN(G35_PROBE_COUNT, 3, 6), "TRAMMING_POINT_XY requires between 3 and 6 XY positions.");
35 35
 
36 36
 #define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(screws_tilt_adjust_pos[N]), \
37 37
   "TRAMMING_POINT_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
38
-VALIDATE_TRAMMING_POINT(0); VALIDATE_TRAMMING_POINT(1); VALIDATE_TRAMMING_POINT(2); VALIDATE_TRAMMING_POINT(3); VALIDATE_TRAMMING_POINT(4);
38
+VALIDATE_TRAMMING_POINT(0); VALIDATE_TRAMMING_POINT(1); VALIDATE_TRAMMING_POINT(2); VALIDATE_TRAMMING_POINT(3); VALIDATE_TRAMMING_POINT(4); VALIDATE_TRAMMING_POINT(5);
39 39
 
40 40
 extern const char point_name_1[], point_name_2[], point_name_3[]
41 41
   #ifdef TRAMMING_POINT_NAME_4
42 42
     , point_name_4[]
43 43
     #ifdef TRAMMING_POINT_NAME_5
44 44
       , point_name_5[]
45
+      #ifdef TRAMMING_POINT_NAME_6
46
+        , point_name_6[]
47
+      #endif
45 48
     #endif
46 49
   #endif
47 50
 ;
@@ -56,6 +59,10 @@ extern const char point_name_1[], point_name_2[], point_name_3[]
56 59
     #ifdef TRAMMING_POINT_NAME_5
57 60
       #undef _NR_TRAM_NAMES
58 61
       #define _NR_TRAM_NAMES 5
62
+      #ifdef TRAMMING_POINT_NAME_6
63
+        #undef _NR_TRAM_NAMES
64
+        #define _NR_TRAM_NAMES 6
65
+      #endif
59 66
     #endif
60 67
   #endif
61 68
 #endif

Loading…
Откажи
Сачувај