Просмотр исходного кода

Merge pull request #2145 from thinkyhead/gcode_folding

Indentation in process_commands
Scott Lahteine 10 лет назад
Родитель
Сommit
c9141e604a
1 измененных файлов: 51 добавлений и 51 удалений
  1. 51
    51
      Marlin/Marlin_main.cpp

+ 51
- 51
Marlin/Marlin_main.cpp Просмотреть файл

5227
   switch(command_code) {
5227
   switch(command_code) {
5228
     case 'G': switch (codenum) {
5228
     case 'G': switch (codenum) {
5229
 
5229
 
5230
-    // G0, G1
5231
-    case 0:
5232
-    case 1:
5233
-      gcode_G0_G1();
5234
-      break;
5235
-
5236
-    // G2, G3
5237
-    #ifndef SCARA
5238
-      case 2: // G2  - CW ARC
5239
-      case 3: // G3  - CCW ARC
5240
-        gcode_G2_G3(codenum == 2);
5230
+      // G0, G1
5231
+      case 0:
5232
+      case 1:
5233
+        gcode_G0_G1();
5241
         break;
5234
         break;
5242
-    #endif
5243
-
5244
-    // G4 Dwell
5245
-    case 4:
5246
-      gcode_G4();
5247
-      break;
5248
 
5235
 
5249
-    #ifdef FWRETRACT
5236
+      // G2, G3
5237
+      #ifndef SCARA
5238
+        case 2: // G2  - CW ARC
5239
+        case 3: // G3  - CCW ARC
5240
+          gcode_G2_G3(codenum == 2);
5241
+          break;
5242
+      #endif
5250
 
5243
 
5251
-      case 10: // G10: retract
5252
-      case 11: // G11: retract_recover
5253
-        gcode_G10_G11(codenum == 10);
5244
+      // G4 Dwell
5245
+      case 4:
5246
+        gcode_G4();
5254
         break;
5247
         break;
5255
 
5248
 
5256
-    #endif //FWRETRACT
5257
-
5258
-    case 28: // G28: Home all axes, one at a time
5259
-      gcode_G28();
5260
-      break;
5249
+      #ifdef FWRETRACT
5261
 
5250
 
5262
-    #if defined(ENABLE_AUTO_BED_LEVELING) || defined(MESH_BED_LEVELING)
5263
-      case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
5264
-        gcode_G29();
5265
-        break;
5266
-    #endif
5251
+        case 10: // G10: retract
5252
+        case 11: // G11: retract_recover
5253
+          gcode_G10_G11(codenum == 10);
5254
+          break;
5267
 
5255
 
5268
-    #ifdef ENABLE_AUTO_BED_LEVELING
5256
+      #endif //FWRETRACT
5269
 
5257
 
5270
-      #ifndef Z_PROBE_SLED
5258
+      case 28: // G28: Home all axes, one at a time
5259
+        gcode_G28();
5260
+        break;
5271
 
5261
 
5272
-        case 30: // G30 Single Z Probe
5273
-          gcode_G30();
5262
+      #if defined(ENABLE_AUTO_BED_LEVELING) || defined(MESH_BED_LEVELING)
5263
+        case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
5264
+          gcode_G29();
5274
           break;
5265
           break;
5266
+      #endif
5275
 
5267
 
5276
-      #else // Z_PROBE_SLED
5268
+      #ifdef ENABLE_AUTO_BED_LEVELING
5277
 
5269
 
5278
-          case 31: // G31: dock the sled
5279
-          case 32: // G32: undock the sled
5280
-            dock_sled(codenum == 31);
5270
+        #ifndef Z_PROBE_SLED
5271
+
5272
+          case 30: // G30 Single Z Probe
5273
+            gcode_G30();
5281
             break;
5274
             break;
5282
 
5275
 
5283
-      #endif // Z_PROBE_SLED
5276
+        #else // Z_PROBE_SLED
5284
 
5277
 
5285
-    #endif // ENABLE_AUTO_BED_LEVELING
5278
+            case 31: // G31: dock the sled
5279
+            case 32: // G32: undock the sled
5280
+              dock_sled(codenum == 31);
5281
+              break;
5286
 
5282
 
5287
-    case 90: // G90
5288
-      relative_mode = false;
5289
-      break;
5290
-    case 91: // G91
5291
-      relative_mode = true;
5292
-      break;
5283
+        #endif // Z_PROBE_SLED
5293
 
5284
 
5294
-    case 92: // G92
5295
-      gcode_G92();
5296
-      break;
5285
+      #endif // ENABLE_AUTO_BED_LEVELING
5297
 
5286
 
5298
-    default: code_is_good = false;
5287
+      case 90: // G90
5288
+        relative_mode = false;
5289
+        break;
5290
+      case 91: // G91
5291
+        relative_mode = true;
5292
+        break;
5293
+
5294
+      case 92: // G92
5295
+        gcode_G92();
5296
+        break;
5297
+
5298
+      default: code_is_good = false;
5299
     }
5299
     }
5300
     break;
5300
     break;
5301
 
5301
 

Загрузка…
Отмена
Сохранить