소스 검색

Get upstream commits

Scott Lahteine 10 년 전
부모
커밋
4fbb80567e

+ 0
- 6
Marlin/Configuration.h 파일 보기

@@ -413,12 +413,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
413 413
 
414 414
   #ifdef AUTO_BED_LEVELING_GRID
415 415
 
416
-    // Use one of these defines to specify the origin
417
-    // for a topographical map to be printed for your bed.
418
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
419
-    #define TOPO_ORIGIN OriginFrontLeft
420
-
421
-    // The edges of the rectangle in which to probe
422 416
     #define LEFT_PROBE_BED_POSITION 15
423 417
     #define RIGHT_PROBE_BED_POSITION 170
424 418
     #define FRONT_PROBE_BED_POSITION 20

+ 7
- 7
Marlin/ConfigurationStore.cpp 파일 보기

@@ -18,7 +18,7 @@
18 18
  *  max_xy_jerk
19 19
  *  max_z_jerk
20 20
  *  max_e_jerk
21
- *  add_homing (x3)
21
+ *  home_offset (x3)
22 22
  *
23 23
  * Mesh bed leveling:
24 24
  *  active
@@ -136,7 +136,7 @@ void Config_StoreSettings()  {
136 136
   EEPROM_WRITE_VAR(i, max_xy_jerk);
137 137
   EEPROM_WRITE_VAR(i, max_z_jerk);
138 138
   EEPROM_WRITE_VAR(i, max_e_jerk);
139
-  EEPROM_WRITE_VAR(i, add_homing);
139
+  EEPROM_WRITE_VAR(i, home_offset);
140 140
 
141 141
   uint8_t mesh_num_x = 3;
142 142
   uint8_t mesh_num_y = 3;
@@ -294,7 +294,7 @@ void Config_RetrieveSettings() {
294 294
     EEPROM_READ_VAR(i, max_xy_jerk);
295 295
     EEPROM_READ_VAR(i, max_z_jerk);
296 296
     EEPROM_READ_VAR(i, max_e_jerk);
297
-    EEPROM_READ_VAR(i, add_homing);
297
+    EEPROM_READ_VAR(i, home_offset);
298 298
 
299 299
     uint8_t mesh_num_x = 0;
300 300
     uint8_t mesh_num_y = 0;
@@ -447,7 +447,7 @@ void Config_ResetDefault() {
447 447
   max_xy_jerk = DEFAULT_XYJERK;
448 448
   max_z_jerk = DEFAULT_ZJERK;
449 449
   max_e_jerk = DEFAULT_EJERK;
450
-  add_homing[X_AXIS] = add_homing[Y_AXIS] = add_homing[Z_AXIS] = 0;
450
+  home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
451 451
 
452 452
   #if defined(MESH_BED_LEVELING)
453 453
     mbl.active = 0;
@@ -607,9 +607,9 @@ void Config_PrintSettings(bool forReplay) {
607 607
     SERIAL_ECHOLNPGM("Home offset (mm):");
608 608
     SERIAL_ECHO_START;
609 609
   }
610
-  SERIAL_ECHOPAIR("  M206 X", add_homing[X_AXIS] );
611
-  SERIAL_ECHOPAIR(" Y", add_homing[Y_AXIS] );
612
-  SERIAL_ECHOPAIR(" Z", add_homing[Z_AXIS] );
610
+  SERIAL_ECHOPAIR("  M206 X", home_offset[X_AXIS] );
611
+  SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS] );
612
+  SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS] );
613 613
   SERIAL_EOL;
614 614
 
615 615
   #ifdef DELTA

+ 1
- 1
Marlin/Marlin.h 파일 보기

@@ -235,7 +235,7 @@ extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in per
235 235
 extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
236 236
 extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
237 237
 extern float current_position[NUM_AXIS] ;
238
-extern float add_homing[3];
238
+extern float home_offset[3];
239 239
 #ifdef DELTA
240 240
   extern float endstop_adj[3];
241 241
   extern float delta_radius;

+ 83
- 107
Marlin/Marlin_main.cpp 파일 보기

@@ -245,7 +245,7 @@ float volumetric_multiplier[EXTRUDERS] = {1.0
245 245
   #endif
246 246
 };
247 247
 float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
248
-float add_homing[3] = { 0, 0, 0 };
248
+float home_offset[3] = { 0, 0, 0 };
249 249
 #ifdef DELTA
250 250
   float endstop_adj[3] = { 0, 0, 0 };
251 251
 #endif
@@ -1006,9 +1006,9 @@ static void axis_is_at_home(int axis) {
1006 1006
       return;
1007 1007
     }
1008 1008
     else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
1009
-      current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homing[X_AXIS];
1010
-      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homing[X_AXIS];
1011
-      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homing[X_AXIS],
1009
+      current_position[X_AXIS] = base_home_pos(X_AXIS) + home_offset[X_AXIS];
1010
+      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + home_offset[X_AXIS];
1011
+      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + home_offset[X_AXIS],
1012 1012
                                   max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
1013 1013
       return;
1014 1014
     }
@@ -1036,11 +1036,11 @@ static void axis_is_at_home(int axis) {
1036 1036
      
1037 1037
      for (i=0; i<2; i++)
1038 1038
      {
1039
-        delta[i] -= add_homing[i];
1039
+        delta[i] -= home_offset[i];
1040 1040
      } 
1041 1041
      
1042
-    // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homing[X_AXIS]);
1043
-  // SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homing[Y_AXIS]);
1042
+    // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(home_offset[X_AXIS]);
1043
+  // SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(home_offset[Y_AXIS]);
1044 1044
     // SERIAL_ECHOPGM(" addhome Theta="); SERIAL_ECHO(delta[X_AXIS]);
1045 1045
     // SERIAL_ECHOPGM(" addhome Psi+Theta="); SERIAL_ECHOLN(delta[Y_AXIS]);
1046 1046
       
@@ -1058,14 +1058,14 @@ static void axis_is_at_home(int axis) {
1058 1058
    } 
1059 1059
    else
1060 1060
    {
1061
-      current_position[axis] = base_home_pos(axis) + add_homing[axis];
1062
-      min_pos[axis] =          base_min_pos(axis) + add_homing[axis];
1063
-      max_pos[axis] =          base_max_pos(axis) + add_homing[axis];
1061
+      current_position[axis] = base_home_pos(axis) + home_offset[axis];
1062
+      min_pos[axis] =          base_min_pos(axis) + home_offset[axis];
1063
+      max_pos[axis] =          base_max_pos(axis) + home_offset[axis];
1064 1064
    }
1065 1065
 #else
1066
-  current_position[axis] = base_home_pos(axis) + add_homing[axis];
1067
-  min_pos[axis] =          base_min_pos(axis) + add_homing[axis];
1068
-  max_pos[axis] =          base_max_pos(axis) + add_homing[axis];
1066
+  current_position[axis] = base_home_pos(axis) + home_offset[axis];
1067
+  min_pos[axis] =          base_min_pos(axis) + home_offset[axis];
1068
+  max_pos[axis] =          base_max_pos(axis) + home_offset[axis];
1069 1069
 #endif
1070 1070
 }
1071 1071
 
@@ -1299,7 +1299,13 @@ static void engage_z_probe() {
1299 1299
 static void retract_z_probe() {
1300 1300
   // Retract Z Servo endstop if enabled
1301 1301
   #ifdef SERVO_ENDSTOPS
1302
-    if (servo_endstops[Z_AXIS] > -1) {
1302
+    if (servo_endstops[Z_AXIS] > -1)
1303
+    {
1304
+      #if Z_RAISE_AFTER_PROBING > 0
1305
+        do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
1306
+        st_synchronize();
1307
+      #endif
1308
+    
1303 1309
       #if SERVO_LEVELING
1304 1310
         servos[servo_endstops[Z_AXIS]].attach(0);
1305 1311
       #endif
@@ -1312,7 +1318,7 @@ static void retract_z_probe() {
1312 1318
   #elif defined(Z_PROBE_ALLEN_KEY)
1313 1319
     // Move up for safety
1314 1320
     feedrate = homing_feedrate[X_AXIS];
1315
-    destination[Z_AXIS] = current_position[Z_AXIS] + 20;
1321
+    destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING;
1316 1322
     prepare_move_raw();
1317 1323
 
1318 1324
     // Move to the start position to initiate retraction
@@ -1354,10 +1360,15 @@ static void retract_z_probe() {
1354 1360
 
1355 1361
 }
1356 1362
 
1357
-enum ProbeAction { ProbeStay, ProbeEngage, ProbeRetract, ProbeEngageRetract };
1363
+enum ProbeAction {
1364
+  ProbeStay             = 0,
1365
+  ProbeEngage           = BIT(0),
1366
+  ProbeRetract          = BIT(1),
1367
+  ProbeEngageAndRetract = (ProbeEngage | ProbeRetract)
1368
+};
1358 1369
 
1359 1370
 /// Probe bed height at position (x,y), returns the measured z value
1360
-static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract, int verbose_level=1) {
1371
+static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageAndRetract, int verbose_level=1) {
1361 1372
   // move to right place
1362 1373
   do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
1363 1374
   do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
@@ -1848,7 +1859,7 @@ inline void gcode_G28() {
1848 1859
       if (code_value_long() != 0) {
1849 1860
           current_position[X_AXIS] = code_value()
1850 1861
             #ifndef SCARA
1851
-              + add_homing[X_AXIS]
1862
+              + home_offset[X_AXIS]
1852 1863
             #endif
1853 1864
           ;
1854 1865
       }
@@ -1857,7 +1868,7 @@ inline void gcode_G28() {
1857 1868
     if (code_seen(axis_codes[Y_AXIS]) && code_value_long() != 0) {
1858 1869
       current_position[Y_AXIS] = code_value()
1859 1870
         #ifndef SCARA
1860
-          + add_homing[Y_AXIS]
1871
+          + home_offset[Y_AXIS]
1861 1872
         #endif
1862 1873
       ;
1863 1874
     }
@@ -1931,7 +1942,7 @@ inline void gcode_G28() {
1931 1942
 
1932 1943
 
1933 1944
     if (code_seen(axis_codes[Z_AXIS]) && code_value_long() != 0)
1934
-      current_position[Z_AXIS] = code_value() + add_homing[Z_AXIS];
1945
+      current_position[Z_AXIS] = code_value() + home_offset[Z_AXIS];
1935 1946
 
1936 1947
     #ifdef ENABLE_AUTO_BED_LEVELING
1937 1948
       if (home_all_axis || code_seen(axis_codes[Z_AXIS]))
@@ -2118,7 +2129,7 @@ inline void gcode_G28() {
2118 2129
     #ifdef AUTO_BED_LEVELING_GRID
2119 2130
 
2120 2131
     #ifndef DELTA
2121
-      bool topo_flag = verbose_level > 2 || code_seen('T') || code_seen('t');
2132
+      bool do_topography_map = verbose_level > 2 || code_seen('T') || code_seen('t');
2122 2133
     #endif
2123 2134
 
2124 2135
       if (verbose_level > 0)
@@ -2173,15 +2184,16 @@ inline void gcode_G28() {
2173 2184
 
2174 2185
     #ifdef Z_PROBE_SLED
2175 2186
       dock_sled(false); // engage (un-dock) the probe
2176
-    #elif not defined(SERVO_ENDSTOPS)
2187
+    #elif defined(Z_PROBE_ALLEN_KEY)
2177 2188
       engage_z_probe();
2178 2189
     #endif
2179 2190
 
2180 2191
     st_synchronize();
2181 2192
 
2182
-  #ifdef DELTA
2183
-    reset_bed_level();
2184
-  #else
2193
+    #ifdef DELTA
2194
+      reset_bed_level();
2195
+    #else
2196
+
2185 2197
     // make sure the bed_level_rotation_matrix is identity or the planner will get it incorectly
2186 2198
     //vector_3 corrected_position = plan_get_position_mm();
2187 2199
     //corrected_position.debug("position before G29");
@@ -2222,42 +2234,36 @@ inline void gcode_G28() {
2222 2234
       delta_grid_spacing[1] = yGridSpacing;
2223 2235
 
2224 2236
       float z_offset = Z_PROBE_OFFSET_FROM_EXTRUDER;
2225
-      if (code_seen(axis_codes[Z_AXIS])) {
2226
-        z_offset += code_value();
2227
-      }
2237
+      if (code_seen(axis_codes[Z_AXIS])) z_offset += code_value();
2228 2238
     #endif
2229 2239
 
2230 2240
       int probePointCounter = 0;
2231 2241
       bool zig = true;
2232 2242
 
2233
-      for (int yCount=0; yCount < auto_bed_leveling_grid_points; yCount++)
2234
-      {
2243
+      for (int yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
2235 2244
         double yProbe = front_probe_bed_position + yGridSpacing * yCount;
2236 2245
         int xStart, xStop, xInc;
2237 2246
 
2238
-        if (zig)
2239
-        {
2247
+        if (zig) {
2240 2248
           xStart = 0;
2241 2249
           xStop = auto_bed_leveling_grid_points;
2242 2250
           xInc = 1;
2243 2251
           zig = false;
2244 2252
         }
2245
-        else
2246
-        {
2253
+        else {
2247 2254
           xStart = auto_bed_leveling_grid_points - 1;
2248 2255
           xStop = -1;
2249 2256
           xInc = -1;
2250 2257
           zig = true;
2251 2258
         }
2252 2259
 
2253
-      #ifndef DELTA
2254
-        // If topo_flag is set then don't zig-zag. Just scan in one direction.
2255
-        // This gets the probe points in more readable order.
2256
-        if (!topo_flag) zig = !zig;
2257
-      #endif
2260
+        #ifndef DELTA
2261
+          // If do_topography_map is set then don't zig-zag. Just scan in one direction.
2262
+          // This gets the probe points in more readable order.
2263
+          if (!do_topography_map) zig = !zig;
2264
+        #endif
2258 2265
 
2259
-        for (int xCount=xStart; xCount != xStop; xCount += xInc)
2260
-        {
2266
+        for (int xCount = xStart; xCount != xStop; xCount += xInc) {
2261 2267
           double xProbe = left_probe_bed_position + xGridSpacing * xCount;
2262 2268
 
2263 2269
           // raise extruder
@@ -2282,7 +2288,7 @@ inline void gcode_G28() {
2282 2288
               act = ProbeStay;
2283 2289
           }
2284 2290
           else
2285
-            act = ProbeEngageRetract;
2291
+            act = ProbeEngageAndRetract;
2286 2292
 
2287 2293
           measured_z = probe_pt(xProbe, yProbe, z_before, act, verbose_level);
2288 2294
 
@@ -2324,49 +2330,31 @@ inline void gcode_G28() {
2324 2330
         }
2325 2331
       }
2326 2332
 
2327
-      if (topo_flag) {
2328
-
2329
-        int xx, yy;
2333
+      // Show the Topography map if enabled
2334
+      if (do_topography_map) {
2330 2335
 
2331 2336
         SERIAL_PROTOCOLPGM(" \nBed Height Topography: \n");
2332
-        #if TOPO_ORIGIN == OriginFrontLeft
2333
-          SERIAL_PROTOCOLPGM("+-----------+\n");
2334
-          SERIAL_PROTOCOLPGM("|...Back....|\n");
2335
-          SERIAL_PROTOCOLPGM("|Left..Right|\n");
2336
-          SERIAL_PROTOCOLPGM("|...Front...|\n");
2337
-          SERIAL_PROTOCOLPGM("+-----------+\n");
2338
-          for (yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--)
2339
-        #else
2340
-          for (yy = 0; yy < auto_bed_leveling_grid_points; yy++)
2341
-        #endif
2342
-          {
2343
-            #if TOPO_ORIGIN == OriginBackRight
2344
-              for (xx = 0; xx < auto_bed_leveling_grid_points; xx++)
2345
-            #else
2346
-              for (xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--)
2347
-            #endif
2348
-              {
2349
-                int ind =
2350
-                  #if TOPO_ORIGIN == OriginBackRight || TOPO_ORIGIN == OriginFrontLeft
2351
-                    yy * auto_bed_leveling_grid_points + xx
2352
-                  #elif TOPO_ORIGIN == OriginBackLeft
2353
-                    xx * auto_bed_leveling_grid_points + yy
2354
-                  #elif TOPO_ORIGIN == OriginFrontRight
2355
-                    abl2 - xx * auto_bed_leveling_grid_points - yy - 1
2356
-                  #endif
2357
-                ;
2358
-                float diff = eqnBVector[ind] - mean;
2359
-                if (diff >= 0.0)
2360
-                  SERIAL_PROTOCOLPGM(" +");   // Include + for column alignment
2361
-                else
2362
-                  SERIAL_PROTOCOLPGM(" ");
2363
-                SERIAL_PROTOCOL_F(diff, 5);
2364
-              } // xx
2365
-              SERIAL_EOL;
2366
-          } // yy
2337
+        SERIAL_PROTOCOLPGM("+-----------+\n");
2338
+        SERIAL_PROTOCOLPGM("|...Back....|\n");
2339
+        SERIAL_PROTOCOLPGM("|Left..Right|\n");
2340
+        SERIAL_PROTOCOLPGM("|...Front...|\n");
2341
+        SERIAL_PROTOCOLPGM("+-----------+\n");
2342
+
2343
+        for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
2344
+          for (int xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--) {
2345
+            int ind = yy * auto_bed_leveling_grid_points + xx;
2346
+            float diff = eqnBVector[ind] - mean;
2347
+            if (diff >= 0.0)
2348
+              SERIAL_PROTOCOLPGM(" +");   // Include + for column alignment
2349
+            else
2350
+              SERIAL_PROTOCOLPGM(" ");
2351
+            SERIAL_PROTOCOL_F(diff, 5);
2352
+          } // xx
2367 2353
           SERIAL_EOL;
2354
+        } // yy
2355
+        SERIAL_EOL;
2368 2356
 
2369
-      } //topo_flag
2357
+      } //do_topography_map
2370 2358
 
2371 2359
 
2372 2360
       set_bed_level_equation_lsq(plane_equation_coefficients);
@@ -2388,18 +2376,15 @@ inline void gcode_G28() {
2388 2376
         z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeRetract, verbose_level);
2389 2377
       }
2390 2378
       else {
2391
-        z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, verbose_level=verbose_level);
2392
-        z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level=verbose_level);
2393
-        z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level=verbose_level);
2379
+        z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, ProbeEngageAndRetract, verbose_level);
2380
+        z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeEngageAndRetract, verbose_level);
2381
+        z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeEngageAndRetract, verbose_level);
2394 2382
       }
2395 2383
       clean_up_after_endstop_move();
2396 2384
       set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
2397 2385
 
2398 2386
     #endif // !AUTO_BED_LEVELING_GRID
2399 2387
 
2400
-    do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
2401
-    st_synchronize();
2402
-
2403 2388
   #ifndef DELTA
2404 2389
     if (verbose_level > 0)
2405 2390
       plan_bed_level_matrix.debug(" \n\nBed Level Correction Matrix:");
@@ -2419,7 +2404,7 @@ inline void gcode_G28() {
2419 2404
 
2420 2405
   #ifdef Z_PROBE_SLED
2421 2406
     dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel
2422
-  #elif not defined(SERVO_ENDSTOPS)
2407
+  #elif defined(Z_PROBE_ALLEN_KEY)
2423 2408
     retract_z_probe();
2424 2409
   #endif
2425 2410
     
@@ -2464,22 +2449,13 @@ inline void gcode_G92() {
2464 2449
   if (!code_seen(axis_codes[E_AXIS]))
2465 2450
     st_synchronize();
2466 2451
 
2467
-  for (int i=0;i<NUM_AXIS;i++) {
2452
+  for (int i = 0; i < NUM_AXIS; i++) {
2468 2453
     if (code_seen(axis_codes[i])) {
2469
-      if (i == E_AXIS) {
2470
-        current_position[i] = code_value();
2454
+      current_position[i] = code_value();
2455
+      if (i == E_AXIS)
2471 2456
         plan_set_e_position(current_position[E_AXIS]);
2472
-      }
2473
-      else {
2474
-        current_position[i] = code_value() +
2475
-          #ifdef SCARA
2476
-            ((i != X_AXIS && i != Y_AXIS) ? add_homing[i] : 0)
2477
-          #else
2478
-            add_homing[i]
2479
-          #endif
2480
-        ;
2457
+      else
2481 2458
         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
2482
-      }
2483 2459
     }
2484 2460
   }
2485 2461
 }
@@ -3416,9 +3392,9 @@ inline void gcode_M114() {
3416 3392
     SERIAL_PROTOCOLLN("");
3417 3393
     
3418 3394
     SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
3419
-    SERIAL_PROTOCOL(delta[X_AXIS]+add_homing[X_AXIS]);
3395
+    SERIAL_PROTOCOL(delta[X_AXIS]+home_offset[X_AXIS]);
3420 3396
     SERIAL_PROTOCOLPGM("   Psi+Theta (90):");
3421
-    SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homing[Y_AXIS]);
3397
+    SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+home_offset[Y_AXIS]);
3422 3398
     SERIAL_PROTOCOLLN("");
3423 3399
     
3424 3400
     SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
@@ -3636,12 +3612,12 @@ inline void gcode_M205() {
3636 3612
 inline void gcode_M206() {
3637 3613
   for (int8_t i=X_AXIS; i <= Z_AXIS; i++) {
3638 3614
     if (code_seen(axis_codes[i])) {
3639
-      add_homing[i] = code_value();
3615
+      home_offset[i] = code_value();
3640 3616
     }
3641 3617
   }
3642 3618
   #ifdef SCARA
3643
-    if (code_seen('T')) add_homing[X_AXIS] = code_value(); // Theta
3644
-    if (code_seen('P')) add_homing[Y_AXIS] = code_value(); // Psi
3619
+    if (code_seen('T')) home_offset[X_AXIS] = code_value(); // Theta
3620
+    if (code_seen('P')) home_offset[Y_AXIS] = code_value(); // Psi
3645 3621
   #endif
3646 3622
 }
3647 3623
 
@@ -5239,7 +5215,7 @@ void clamp_to_software_endstops(float target[3])
5239 5215
     float negative_z_offset = 0;
5240 5216
     #ifdef ENABLE_AUTO_BED_LEVELING
5241 5217
       if (Z_PROBE_OFFSET_FROM_EXTRUDER < 0) negative_z_offset = negative_z_offset + Z_PROBE_OFFSET_FROM_EXTRUDER;
5242
-      if (add_homing[Z_AXIS] < 0) negative_z_offset = negative_z_offset + add_homing[Z_AXIS];
5218
+      if (home_offset[Z_AXIS] < 0) negative_z_offset = negative_z_offset + home_offset[Z_AXIS];
5243 5219
     #endif
5244 5220
     
5245 5221
     if (target[Z_AXIS] < min_pos[Z_AXIS]+negative_z_offset) target[Z_AXIS] = min_pos[Z_AXIS]+negative_z_offset;

+ 0
- 6
Marlin/configurator/config/Configuration.h 파일 보기

@@ -434,12 +434,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
434 434
 
435 435
   #ifdef AUTO_BED_LEVELING_GRID
436 436
 
437
-    // Use one of these defines to specify the origin
438
-    // for a topographical map to be printed for your bed.
439
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
440
-    #define TOPO_ORIGIN OriginFrontLeft
441
-
442
-    // The edges of the rectangle in which to probe
443 437
     #define LEFT_PROBE_BED_POSITION 15
444 438
     #define RIGHT_PROBE_BED_POSITION 170
445 439
     #define FRONT_PROBE_BED_POSITION 20

+ 1
- 6
Marlin/example_configurations/Felix/Configuration.h 파일 보기

@@ -382,12 +382,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
382 382
   // Note: this feature occupies 10'206 byte
383 383
   #ifdef AUTO_BED_LEVELING_GRID
384 384
 
385
-    // Use one of these defines to specify the origin
386
-    // for a topographical map to be printed for your bed.
387
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
388
-    #define TOPO_ORIGIN OriginFrontLeft
389
-
390
-    // set the rectangle in which to probe
385
+home_offset    // set the rectangle in which to probe
391 386
     #define LEFT_PROBE_BED_POSITION 15
392 387
     #define RIGHT_PROBE_BED_POSITION 170
393 388
     #define BACK_PROBE_BED_POSITION 180

+ 1
- 6
Marlin/example_configurations/Felix/Configuration_DUAL.h 파일 보기

@@ -382,12 +382,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
382 382
   // Note: this feature occupies 10'206 byte
383 383
   #ifdef AUTO_BED_LEVELING_GRID
384 384
 
385
-    // Use one of these defines to specify the origin
386
-    // for a topographical map to be printed for your bed.
387
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
388
-    #define TOPO_ORIGIN OriginFrontLeft
389
-
390
-    // set the rectangle in which to probe
385
+home_offset    // set the rectangle in which to probe
391 386
     #define LEFT_PROBE_BED_POSITION 15
392 387
     #define RIGHT_PROBE_BED_POSITION 170
393 388
     #define BACK_PROBE_BED_POSITION 180

+ 0
- 6
Marlin/example_configurations/Hephestos/Configuration.h 파일 보기

@@ -406,12 +406,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
406 406
 
407 407
   #ifdef AUTO_BED_LEVELING_GRID
408 408
 
409
-    // Use one of these defines to specify the origin
410
-    // for a topographical map to be printed for your bed.
411
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
412
-    #define TOPO_ORIGIN OriginFrontLeft
413
-
414
-    // The edges of the rectangle in which to probe
415 409
     #define LEFT_PROBE_BED_POSITION 15
416 410
     #define RIGHT_PROBE_BED_POSITION 170
417 411
     #define FRONT_PROBE_BED_POSITION 20

+ 0
- 6
Marlin/example_configurations/K8200/Configuration.h 파일 보기

@@ -411,12 +411,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
411 411
 
412 412
   #ifdef AUTO_BED_LEVELING_GRID
413 413
 
414
-    // Use one of these defines to specify the origin
415
-    // for a topographical map to be printed for your bed.
416
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
417
-    #define TOPO_ORIGIN OriginFrontLeft
418
-
419
-    // The edges of the rectangle in which to probe
420 414
     #define LEFT_PROBE_BED_POSITION 15
421 415
     #define RIGHT_PROBE_BED_POSITION 170
422 416
     #define FRONT_PROBE_BED_POSITION 20

+ 0
- 6
Marlin/example_configurations/SCARA/Configuration.h 파일 보기

@@ -435,12 +435,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
435 435
 
436 436
   #ifdef AUTO_BED_LEVELING_GRID
437 437
 
438
-    // Use one of these defines to specify the origin
439
-    // for a topographical map to be printed for your bed.
440
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
441
-    #define TOPO_ORIGIN OriginFrontLeft
442
-
443
-    // The edges of the rectangle in which to probe
444 438
     #define LEFT_PROBE_BED_POSITION 15
445 439
     #define RIGHT_PROBE_BED_POSITION 170
446 440
     #define FRONT_PROBE_BED_POSITION 20

+ 0
- 6
Marlin/example_configurations/WITBOX/Configuration.h 파일 보기

@@ -405,12 +405,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
405 405
 
406 406
   #ifdef AUTO_BED_LEVELING_GRID
407 407
 
408
-    // Use one of these defines to specify the origin
409
-    // for a topographical map to be printed for your bed.
410
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
411
-    #define TOPO_ORIGIN OriginFrontLeft
412
-
413
-    // The edges of the rectangle in which to probe
414 408
     #define LEFT_PROBE_BED_POSITION 15
415 409
     #define RIGHT_PROBE_BED_POSITION 170
416 410
     #define FRONT_PROBE_BED_POSITION 20

+ 0
- 6
Marlin/example_configurations/makibox/Configuration.h 파일 보기

@@ -403,12 +403,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
403 403
 
404 404
   #ifdef AUTO_BED_LEVELING_GRID
405 405
 
406
-    // Use one of these defines to specify the origin
407
-    // for a topographical map to be printed for your bed.
408
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
409
-    #define TOPO_ORIGIN OriginFrontLeft
410
-
411
-    // The edges of the rectangle in which to probe
412 406
     #define LEFT_PROBE_BED_POSITION 15
413 407
     #define RIGHT_PROBE_BED_POSITION 170
414 408
     #define FRONT_PROBE_BED_POSITION 20

+ 0
- 6
Marlin/example_configurations/tvrrug/Round2/Configuration.h 파일 보기

@@ -405,12 +405,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
405 405
 
406 406
   #ifdef AUTO_BED_LEVELING_GRID
407 407
 
408
-    // Use one of these defines to specify the origin
409
-    // for a topographical map to be printed for your bed.
410
-    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
411
-    #define TOPO_ORIGIN OriginFrontLeft
412
-
413
-    // The edges of the rectangle in which to probe
414 408
     #define LEFT_PROBE_BED_POSITION 15
415 409
     #define RIGHT_PROBE_BED_POSITION 170
416 410
     #define FRONT_PROBE_BED_POSITION 20

+ 7
- 13
Marlin/stepper.cpp 파일 보기

@@ -102,11 +102,8 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
102 102
       X_DIR_WRITE(v); \
103 103
       X2_DIR_WRITE(v); \
104 104
     } \
105
-    else{ \
106
-      if (current_block->active_extruder) \
107
-        X2_DIR_WRITE(v); \
108
-      else \
109
-        X_DIR_WRITE(v); \
105
+    else { \
106
+      if (current_block->active_extruder) X2_DIR_WRITE(v); else X_DIR_WRITE(v); \
110 107
     }
111 108
   #define X_APPLY_STEP(v,ALWAYS) \
112 109
     if (extruder_duplication_enabled || ALWAYS) { \
@@ -114,10 +111,7 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
114 111
       X2_STEP_WRITE(v); \
115 112
     } \
116 113
     else { \
117
-      if (current_block->active_extruder != 0) \
118
-        X2_STEP_WRITE(v); \
119
-      else \
120
-        X_STEP_WRITE(v); \
114
+      if (current_block->active_extruder != 0) X2_STEP_WRITE(v); else X_STEP_WRITE(v); \
121 115
     }
122 116
 #else
123 117
   #define X_APPLY_DIR(v,Q) X_DIR_WRITE(v)
@@ -125,16 +119,16 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
125 119
 #endif
126 120
 
127 121
 #ifdef Y_DUAL_STEPPER_DRIVERS
128
-  #define Y_APPLY_DIR(v,Q) Y_DIR_WRITE(v), Y2_DIR_WRITE((v) != INVERT_Y2_VS_Y_DIR)
129
-  #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v), Y2_STEP_WRITE(v)
122
+  #define Y_APPLY_DIR(v,Q) { Y_DIR_WRITE(v); Y2_DIR_WRITE((v) != INVERT_Y2_VS_Y_DIR); }
123
+  #define Y_APPLY_STEP(v,Q) { Y_STEP_WRITE(v); Y2_STEP_WRITE(v); }
130 124
 #else
131 125
   #define Y_APPLY_DIR(v,Q) Y_DIR_WRITE(v)
132 126
   #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v)
133 127
 #endif
134 128
 
135 129
 #ifdef Z_DUAL_STEPPER_DRIVERS
136
-  #define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v), Z2_DIR_WRITE(v)
137
-  #define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v), Z2_STEP_WRITE(v)
130
+  #define Z_APPLY_DIR(v,Q) { Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }
131
+  #define Z_APPLY_STEP(v,Q) { Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }
138 132
 #else
139 133
   #define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v)
140 134
   #define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v)

+ 1
- 1
Marlin/ultralcd.cpp 파일 보기

@@ -436,7 +436,7 @@ static void lcd_main_menu() {
436 436
 void lcd_set_home_offsets() {
437 437
   for(int8_t i=0; i < NUM_AXIS; i++) {
438 438
     if (i != E_AXIS) {
439
-      add_homing[i] -= current_position[i];
439
+      home_offset[i] -= current_position[i];
440 440
       current_position[i] = 0.0;
441 441
     }
442 442
   }

Loading…
취소
저장