瀏覽代碼

Fix EEPROM servo angles init, section grouping

Scott Lahteine 6 年之前
父節點
當前提交
c04cf127f7
共有 1 個文件被更改,包括 231 次插入180 次删除
  1. 231
    180
      Marlin/src/module/configuration_store.cpp

+ 231
- 180
Marlin/src/module/configuration_store.cpp 查看文件

@@ -432,214 +432,264 @@ void MarlinSettings::postprocess() {
432 432
     const uint8_t esteppers = COUNT(planner.settings.axis_steps_per_mm) - XYZ;
433 433
     EEPROM_WRITE(esteppers);
434 434
 
435
-    EEPROM_WRITE(planner.settings);
435
+    //
436
+    // Planner Motion
437
+    //
438
+    {
439
+      EEPROM_WRITE(planner.settings);
436 440
 
437
-    #if HAS_CLASSIC_JERK
438
-      EEPROM_WRITE(planner.max_jerk);
439
-      #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE)
440
-        dummy = float(DEFAULT_EJERK);
441
-        EEPROM_WRITE(dummy);
441
+      #if HAS_CLASSIC_JERK
442
+        EEPROM_WRITE(planner.max_jerk);
443
+        #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE)
444
+          dummy = float(DEFAULT_EJERK);
445
+          EEPROM_WRITE(dummy);
446
+        #endif
447
+      #else
448
+        const float planner_max_jerk[XYZE] = { float(DEFAULT_XJERK), float(DEFAULT_YJERK), float(DEFAULT_ZJERK), float(DEFAULT_EJERK) };
449
+        EEPROM_WRITE(planner_max_jerk);
442 450
       #endif
443
-    #else
444
-      const float planner_max_jerk[XYZE] = { float(DEFAULT_XJERK), float(DEFAULT_YJERK), float(DEFAULT_ZJERK), float(DEFAULT_EJERK) };
445
-      EEPROM_WRITE(planner_max_jerk);
446
-    #endif
447 451
 
448
-    #if ENABLED(JUNCTION_DEVIATION)
449
-      EEPROM_WRITE(planner.junction_deviation_mm);
450
-    #else
451
-      dummy = 0.02f;
452
-      EEPROM_WRITE(dummy);
453
-    #endif
452
+      #if ENABLED(JUNCTION_DEVIATION)
453
+        EEPROM_WRITE(planner.junction_deviation_mm);
454
+      #else
455
+        dummy = 0.02f;
456
+        EEPROM_WRITE(dummy);
457
+      #endif
458
+    }
454 459
 
455
-    _FIELD_TEST(home_offset);
460
+    //
461
+    // Home Offset
462
+    //
463
+    {
464
+      _FIELD_TEST(home_offset);
456 465
 
457
-    #if HAS_SCARA_OFFSET
458
-      EEPROM_WRITE(scara_home_offset);
459
-    #else
460
-      #if !HAS_HOME_OFFSET
461
-        const float home_offset[XYZ] = { 0 };
466
+      #if HAS_SCARA_OFFSET
467
+        EEPROM_WRITE(scara_home_offset);
468
+      #else
469
+        #if !HAS_HOME_OFFSET
470
+          const float home_offset[XYZ] = { 0 };
471
+        #endif
472
+        EEPROM_WRITE(home_offset);
462 473
       #endif
463
-      EEPROM_WRITE(home_offset);
464
-    #endif
465 474
 
466
-    #if HAS_HOTEND_OFFSET
467
-      // Skip hotend 0 which must be 0
468
-      for (uint8_t e = 1; e < HOTENDS; e++)
469
-        LOOP_XYZ(i) EEPROM_WRITE(hotend_offset[i][e]);
470
-    #endif
475
+      #if HAS_HOTEND_OFFSET
476
+        // Skip hotend 0 which must be 0
477
+        for (uint8_t e = 1; e < HOTENDS; e++)
478
+          LOOP_XYZ(i) EEPROM_WRITE(hotend_offset[i][e]);
479
+      #endif
480
+    }
471 481
 
472 482
     //
473 483
     // Global Leveling
474 484
     //
485
+    {
486
+      const float zfh = (
487
+        #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
488
+          planner.z_fade_height
489
+        #else
490
+          10.0
491
+        #endif
492
+      );
493
+      EEPROM_WRITE(zfh);
494
+    }
475 495
 
476
-    const float zfh = (
477
-      #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
478
-        planner.z_fade_height
479
-      #else
480
-        10.0
496
+    //
497
+    // Mesh Bed Leveling
498
+    //
499
+    {
500
+      #if ENABLED(MESH_BED_LEVELING)
501
+        // Compile time test that sizeof(mbl.z_values) is as expected
502
+        static_assert(
503
+          sizeof(mbl.z_values) == (GRID_MAX_POINTS) * sizeof(mbl.z_values[0][0]),
504
+          "MBL Z array is the wrong size."
505
+        );
506
+        const uint8_t mesh_num_x = GRID_MAX_POINTS_X, mesh_num_y = GRID_MAX_POINTS_Y;
507
+        EEPROM_WRITE(mbl.z_offset);
508
+        EEPROM_WRITE(mesh_num_x);
509
+        EEPROM_WRITE(mesh_num_y);
510
+        EEPROM_WRITE(mbl.z_values);
511
+      #else // For disabled MBL write a default mesh
512
+        dummy = 0;
513
+        const uint8_t mesh_num_x = 3, mesh_num_y = 3;
514
+        EEPROM_WRITE(dummy); // z_offset
515
+        EEPROM_WRITE(mesh_num_x);
516
+        EEPROM_WRITE(mesh_num_y);
517
+        for (uint8_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_WRITE(dummy);
481 518
       #endif
482
-    );
483
-    EEPROM_WRITE(zfh);
519
+    }
484 520
 
485 521
     //
486
-    // Mesh Bed Leveling
522
+    // Probe Z Offset
487 523
     //
524
+    {
525
+      _FIELD_TEST(zprobe_zoffset);
488 526
 
489
-    #if ENABLED(MESH_BED_LEVELING)
490
-      // Compile time test that sizeof(mbl.z_values) is as expected
491
-      static_assert(
492
-        sizeof(mbl.z_values) == (GRID_MAX_POINTS) * sizeof(mbl.z_values[0][0]),
493
-        "MBL Z array is the wrong size."
494
-      );
495
-      const uint8_t mesh_num_x = GRID_MAX_POINTS_X, mesh_num_y = GRID_MAX_POINTS_Y;
496
-      EEPROM_WRITE(mbl.z_offset);
497
-      EEPROM_WRITE(mesh_num_x);
498
-      EEPROM_WRITE(mesh_num_y);
499
-      EEPROM_WRITE(mbl.z_values);
500
-    #else // For disabled MBL write a default mesh
501
-      dummy = 0;
502
-      const uint8_t mesh_num_x = 3, mesh_num_y = 3;
503
-      EEPROM_WRITE(dummy); // z_offset
504
-      EEPROM_WRITE(mesh_num_x);
505
-      EEPROM_WRITE(mesh_num_y);
506
-      for (uint8_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_WRITE(dummy);
507
-    #endif // MESH_BED_LEVELING
508
-
509
-    _FIELD_TEST(zprobe_zoffset);
510
-
511
-    #if !HAS_BED_PROBE
512
-      const float zprobe_zoffset = 0;
513
-    #endif
514
-    EEPROM_WRITE(zprobe_zoffset);
527
+      #if !HAS_BED_PROBE
528
+        const float zprobe_zoffset = 0;
529
+      #endif
530
+      EEPROM_WRITE(zprobe_zoffset);
531
+    }
515 532
 
516 533
     //
517 534
     // Planar Bed Leveling matrix
518 535
     //
519
-
520
-    #if ABL_PLANAR
521
-      EEPROM_WRITE(planner.bed_level_matrix);
522
-    #else
523
-      dummy = 0;
524
-      for (uint8_t q = 9; q--;) EEPROM_WRITE(dummy);
525
-    #endif
536
+    {
537
+      #if ABL_PLANAR
538
+        EEPROM_WRITE(planner.bed_level_matrix);
539
+      #else
540
+        dummy = 0;
541
+        for (uint8_t q = 9; q--;) EEPROM_WRITE(dummy);
542
+      #endif
543
+    }
526 544
 
527 545
     //
528 546
     // Bilinear Auto Bed Leveling
529 547
     //
548
+    {
549
+      #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
550
+        // Compile time test that sizeof(z_values) is as expected
551
+        static_assert(
552
+          sizeof(z_values) == (GRID_MAX_POINTS) * sizeof(z_values[0][0]),
553
+          "Bilinear Z array is the wrong size."
554
+        );
555
+        const uint8_t grid_max_x = GRID_MAX_POINTS_X, grid_max_y = GRID_MAX_POINTS_Y;
556
+        EEPROM_WRITE(grid_max_x);            // 1 byte
557
+        EEPROM_WRITE(grid_max_y);            // 1 byte
558
+        EEPROM_WRITE(bilinear_grid_spacing); // 2 ints
559
+        EEPROM_WRITE(bilinear_start);        // 2 ints
560
+        EEPROM_WRITE(z_values);              // 9-256 floats
561
+      #else
562
+        // For disabled Bilinear Grid write an empty 3x3 grid
563
+        const uint8_t grid_max_x = 3, grid_max_y = 3;
564
+        const int bilinear_start[2] = { 0 }, bilinear_grid_spacing[2] = { 0 };
565
+        dummy = 0;
566
+        EEPROM_WRITE(grid_max_x);
567
+        EEPROM_WRITE(grid_max_y);
568
+        EEPROM_WRITE(bilinear_grid_spacing);
569
+        EEPROM_WRITE(bilinear_start);
570
+        for (uint16_t q = grid_max_x * grid_max_y; q--;) EEPROM_WRITE(dummy);
571
+      #endif
572
+    }
530 573
 
531
-    #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
532
-      // Compile time test that sizeof(z_values) is as expected
533
-      static_assert(
534
-        sizeof(z_values) == (GRID_MAX_POINTS) * sizeof(z_values[0][0]),
535
-        "Bilinear Z array is the wrong size."
536
-      );
537
-      const uint8_t grid_max_x = GRID_MAX_POINTS_X, grid_max_y = GRID_MAX_POINTS_Y;
538
-      EEPROM_WRITE(grid_max_x);            // 1 byte
539
-      EEPROM_WRITE(grid_max_y);            // 1 byte
540
-      EEPROM_WRITE(bilinear_grid_spacing); // 2 ints
541
-      EEPROM_WRITE(bilinear_start);        // 2 ints
542
-      EEPROM_WRITE(z_values);              // 9-256 floats
543
-    #else
544
-      // For disabled Bilinear Grid write an empty 3x3 grid
545
-      const uint8_t grid_max_x = 3, grid_max_y = 3;
546
-      const int bilinear_start[2] = { 0 }, bilinear_grid_spacing[2] = { 0 };
547
-      dummy = 0;
548
-      EEPROM_WRITE(grid_max_x);
549
-      EEPROM_WRITE(grid_max_y);
550
-      EEPROM_WRITE(bilinear_grid_spacing);
551
-      EEPROM_WRITE(bilinear_start);
552
-      for (uint16_t q = grid_max_x * grid_max_y; q--;) EEPROM_WRITE(dummy);
553
-    #endif // AUTO_BED_LEVELING_BILINEAR
554
-
555
-    _FIELD_TEST(planner_leveling_active);
556
-
557
-    #if ENABLED(AUTO_BED_LEVELING_UBL)
558
-      EEPROM_WRITE(planner.leveling_active);
559
-      EEPROM_WRITE(ubl.storage_slot);
560
-    #else
561
-      const bool ubl_active = false;
562
-      const int8_t storage_slot = -1;
563
-      EEPROM_WRITE(ubl_active);
564
-      EEPROM_WRITE(storage_slot);
565
-    #endif // AUTO_BED_LEVELING_UBL
574
+    //
575
+    // Unified Bed Leveling
576
+    //
577
+    {
578
+      _FIELD_TEST(planner_leveling_active);
579
+
580
+      #if ENABLED(AUTO_BED_LEVELING_UBL)
581
+        EEPROM_WRITE(planner.leveling_active);
582
+        EEPROM_WRITE(ubl.storage_slot);
583
+      #else
584
+        const bool ubl_active = false;
585
+        const int8_t storage_slot = -1;
586
+        EEPROM_WRITE(ubl_active);
587
+        EEPROM_WRITE(storage_slot);
588
+      #endif // AUTO_BED_LEVELING_UBL
589
+    }
590
+
591
+    //
592
+    // Servo Angles
593
+    //
594
+    {
595
+      #if !(HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES))
596
+
597
+        uint16_t servo_angles[NUM_SERVOS][2] = { { 0, 0 } };
566 598
 
567
-    #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES)
568
-      #if ENABLED(SWITCHING_EXTRUDER)
569
-        constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES;
570
-      #endif
571
-      constexpr uint16_t servo_angles[NUM_SERVOS][2] = {
572 599
         #if ENABLED(SWITCHING_EXTRUDER)
573
-          [SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0][0], sesa[0][1] }
600
+
601
+          constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES;
602
+          servo_angles[SWITCHING_EXTRUDER_SERVO_NR][0] = sesa[0][0];
603
+          servo_angles[SWITCHING_EXTRUDER_SERVO_NR][1] = sesa[0][1];
574 604
           #if EXTRUDERS > 3
575
-            , [SWITCHING_EXTRUDER_E23_SERVO_NR] = { sesa[1][0], sesa[1][1] }
605
+            servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][0] = sesa[1][0];
606
+            servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][1] = sesa[1][1];
576 607
           #endif
608
+
577 609
         #elif ENABLED(SWITCHING_NOZZLE)
578
-          [SWITCHING_NOZZLE_SERVO_NR] = SWITCHING_NOZZLE_SERVO_ANGLES
610
+
611
+          constexpr uint16_t snsa[] = SWITCHING_NOZZLE_SERVO_ANGLES;
612
+          servo_angles[SWITCHING_NOZZLE_SERVO_NR][0] = snsa[0];
613
+          servo_angles[SWITCHING_NOZZLE_SERVO_NR][1] = snsa[1];
614
+
579 615
         #elif defined(Z_SERVO_ANGLES) && defined(Z_PROBE_SERVO_NR)
580
-          [Z_PROBE_SERVO_NR] = Z_SERVO_ANGLES
616
+
617
+          constexpr uint16_t zsa[] = Z_SERVO_ANGLES;
618
+          servo_angles[Z_PROBE_SERVO_NR][0] = zsa[0];
619
+          servo_angles[Z_PROBE_SERVO_NR][1] = zsa[1];
620
+
581 621
         #endif
582
-      };
583
-    #endif
584 622
 
585
-    EEPROM_WRITE(servo_angles);
623
+      #endif // !HAS_SERVOS || !EDITABLE_SERVO_ANGLES
586 624
 
587
-    // 11 floats for DELTA / [XYZ]_DUAL_ENDSTOPS
588
-    #if ENABLED(DELTA)
625
+      EEPROM_WRITE(servo_angles);
626
+    }
589 627
 
590
-      _FIELD_TEST(delta_height);
628
+    //
629
+    // DELTA Geometry or Dual Endstops offsets
630
+    //
631
+    {
632
+      #if ENABLED(DELTA)
591 633
 
592
-      EEPROM_WRITE(delta_height);              // 1 float
593
-      EEPROM_WRITE(delta_endstop_adj);         // 3 floats
594
-      EEPROM_WRITE(delta_radius);              // 1 float
595
-      EEPROM_WRITE(delta_diagonal_rod);        // 1 float
596
-      EEPROM_WRITE(delta_segments_per_second); // 1 float
597
-      EEPROM_WRITE(delta_calibration_radius);  // 1 float
598
-      EEPROM_WRITE(delta_tower_angle_trim);    // 3 floats
634
+        _FIELD_TEST(delta_height);
599 635
 
600
-    #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
636
+        EEPROM_WRITE(delta_height);              // 1 float
637
+        EEPROM_WRITE(delta_endstop_adj);         // 3 floats
638
+        EEPROM_WRITE(delta_radius);              // 1 float
639
+        EEPROM_WRITE(delta_diagonal_rod);        // 1 float
640
+        EEPROM_WRITE(delta_segments_per_second); // 1 float
641
+        EEPROM_WRITE(delta_calibration_radius);  // 1 float
642
+        EEPROM_WRITE(delta_tower_angle_trim);    // 3 floats
601 643
 
602
-      _FIELD_TEST(x2_endstop_adj);
644
+      #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
603 645
 
604
-      // Write dual endstops in X, Y, Z order. Unused = 0.0
605
-      dummy = 0;
606
-      #if ENABLED(X_DUAL_ENDSTOPS)
607
-        EEPROM_WRITE(endstops.x2_endstop_adj);   // 1 float
608
-      #else
609
-        EEPROM_WRITE(dummy);
610
-      #endif
646
+        _FIELD_TEST(x2_endstop_adj);
611 647
 
612
-      #if ENABLED(Y_DUAL_ENDSTOPS)
613
-        EEPROM_WRITE(endstops.y2_endstop_adj);   // 1 float
614
-      #else
615
-        EEPROM_WRITE(dummy);
616
-      #endif
648
+        // Write dual endstops in X, Y, Z order. Unused = 0.0
649
+        dummy = 0;
650
+        #if ENABLED(X_DUAL_ENDSTOPS)
651
+          EEPROM_WRITE(endstops.x2_endstop_adj);   // 1 float
652
+        #else
653
+          EEPROM_WRITE(dummy);
654
+        #endif
617 655
 
618
-      #if Z_MULTI_ENDSTOPS
619
-        EEPROM_WRITE(endstops.z2_endstop_adj);   // 1 float
620
-      #else
621
-        EEPROM_WRITE(dummy);
622
-      #endif
656
+        #if ENABLED(Y_DUAL_ENDSTOPS)
657
+          EEPROM_WRITE(endstops.y2_endstop_adj);   // 1 float
658
+        #else
659
+          EEPROM_WRITE(dummy);
660
+        #endif
623 661
 
624
-      #if ENABLED(Z_TRIPLE_ENDSTOPS)
625
-        EEPROM_WRITE(endstops.z3_endstop_adj);   // 1 float
626
-      #else
627
-        EEPROM_WRITE(dummy);
628
-      #endif
662
+        #if Z_MULTI_ENDSTOPS
663
+          EEPROM_WRITE(endstops.z2_endstop_adj);   // 1 float
664
+        #else
665
+          EEPROM_WRITE(dummy);
666
+        #endif
629 667
 
630
-    #endif
668
+        #if ENABLED(Z_TRIPLE_ENDSTOPS)
669
+          EEPROM_WRITE(endstops.z3_endstop_adj);   // 1 float
670
+        #else
671
+          EEPROM_WRITE(dummy);
672
+        #endif
631 673
 
632
-    _FIELD_TEST(lcd_preheat_hotend_temp);
674
+      #endif
675
+    }
633 676
 
634
-    #if DISABLED(ULTIPANEL)
635
-      constexpr int16_t lcd_preheat_hotend_temp[2] = { PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND },
636
-                        lcd_preheat_bed_temp[2] = { PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED };
637
-      constexpr uint8_t lcd_preheat_fan_speed[2] = { PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED };
638
-    #endif
677
+    //
678
+    // LCD Preheat settings
679
+    //
680
+    {
681
+      _FIELD_TEST(lcd_preheat_hotend_temp);
639 682
 
640
-    EEPROM_WRITE(lcd_preheat_hotend_temp);
641
-    EEPROM_WRITE(lcd_preheat_bed_temp);
642
-    EEPROM_WRITE(lcd_preheat_fan_speed);
683
+      #if DISABLED(ULTIPANEL)
684
+        constexpr int16_t lcd_preheat_hotend_temp[2] = { PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND },
685
+                          lcd_preheat_bed_temp[2] = { PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED };
686
+        constexpr uint8_t lcd_preheat_fan_speed[2] = { PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED };
687
+      #endif
688
+
689
+      EEPROM_WRITE(lcd_preheat_hotend_temp);
690
+      EEPROM_WRITE(lcd_preheat_bed_temp);
691
+      EEPROM_WRITE(lcd_preheat_fan_speed);
692
+    }
643 693
 
644 694
     //
645 695
     // PIDTEMP
@@ -678,13 +728,14 @@ void MarlinSettings::postprocess() {
678 728
     //
679 729
     // LCD Contrast
680 730
     //
731
+    {
732
+      _FIELD_TEST(lcd_contrast);
681 733
 
682
-    _FIELD_TEST(lcd_contrast);
683
-
684
-    #if !HAS_LCD_CONTRAST
685
-      const int16_t lcd_contrast = 32;
686
-    #endif
687
-    EEPROM_WRITE(lcd_contrast);
734
+      #if !HAS_LCD_CONTRAST
735
+        const int16_t lcd_contrast = 32;
736
+      #endif
737
+      EEPROM_WRITE(lcd_contrast);
738
+    }
688 739
 
689 740
     //
690 741
     // Firmware Retraction
@@ -1199,7 +1250,7 @@ void MarlinSettings::postprocess() {
1199 1250
       // SERVO_ANGLES
1200 1251
       //
1201 1252
       {
1202
-        #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES)
1253
+        #if !(HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES))
1203 1254
           uint16_t servo_angles[NUM_SERVOS][2];
1204 1255
         #endif
1205 1256
         EEPROM_READ(servo_angles);
@@ -1894,26 +1945,26 @@ void MarlinSettings::reset(PORTARG_SOLO) {
1894 1945
       #else
1895 1946
         #define REQ_ANGLES 2
1896 1947
       #endif
1897
-      constexpr uint16_t extruder_angles[] = SWITCHING_EXTRUDER_SERVO_ANGLES;
1898
-      static_assert(COUNT(extruder_angles) == REQ_ANGLES, "SWITCHING_EXTRUDER_SERVO_ANGLES needs " STRINGIFY(REQ_ANGLES) " angles.");
1899
-      servo_angles[SWITCHING_EXTRUDER_SERVO_NR][0] = extruder_angles[0];
1900
-      servo_angles[SWITCHING_EXTRUDER_SERVO_NR][1] = extruder_angles[1];
1948
+      constexpr uint16_t sesa[] = SWITCHING_EXTRUDER_SERVO_ANGLES;
1949
+      static_assert(COUNT(sesa) == REQ_ANGLES, "SWITCHING_EXTRUDER_SERVO_ANGLES needs " STRINGIFY(REQ_ANGLES) " angles.");
1950
+      servo_angles[SWITCHING_EXTRUDER_SERVO_NR][0] = sesa[0];
1951
+      servo_angles[SWITCHING_EXTRUDER_SERVO_NR][1] = sesa[1];
1901 1952
       #if EXTRUDERS > 3
1902
-        servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][0] = extruder_angles[2];
1903
-        servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][1] = extruder_angles[3];
1953
+        servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][0] = sesa[2];
1954
+        servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][1] = sesa[3];
1904 1955
       #endif
1905 1956
 
1906 1957
     #elif ENABLED(SWITCHING_NOZZLE)
1907 1958
 
1908
-      constexpr uint16_t nozzle_angles[2] = SWITCHING_NOZZLE_SERVO_ANGLES;
1909
-      servo_angles[SWITCHING_NOZZLE_SERVO_NR][0] = nozzle_angles[0];
1910
-      servo_angles[SWITCHING_NOZZLE_SERVO_NR][1] = nozzle_angles[1];
1959
+      constexpr uint16_t snsa[2] = SWITCHING_NOZZLE_SERVO_ANGLES;
1960
+      servo_angles[SWITCHING_NOZZLE_SERVO_NR][0] = snsa[0];
1961
+      servo_angles[SWITCHING_NOZZLE_SERVO_NR][1] = snsa[1];
1911 1962
 
1912 1963
     #elif defined(Z_SERVO_ANGLES) && defined(Z_PROBE_SERVO_NR)
1913 1964
 
1914
-      constexpr uint16_t z_probe_angles[2] = Z_SERVO_ANGLES;
1915
-      servo_angles[Z_PROBE_SERVO_NR][0] = z_probe_angles[0];
1916
-      servo_angles[Z_PROBE_SERVO_NR][1] = z_probe_angles[1];
1965
+      constexpr uint16_t zsa[2] = Z_SERVO_ANGLES;
1966
+      servo_angles[Z_PROBE_SERVO_NR][0] = zsa[0];
1967
+      servo_angles[Z_PROBE_SERVO_NR][1] = zsa[1];
1917 1968
 
1918 1969
     #endif
1919 1970
 

Loading…
取消
儲存