Bladeren bron

Remove SCARA axis_scaling

Scott Lahteine 7 jaren geleden
bovenliggende
commit
83a41c7ceb
4 gewijzigde bestanden met toevoegingen van 17 en 68 verwijderingen
  1. 0
    1
      Marlin/Marlin.h
  2. 5
    19
      Marlin/Marlin_main.cpp
  3. 12
    44
      Marlin/configuration_store.cpp
  4. 0
    4
      Marlin/ultralcd.cpp

+ 0
- 1
Marlin/Marlin.h Bestand weergeven

@@ -317,7 +317,6 @@ float code_value_temp_diff();
317 317
                delta_diagonal_rod_trim_tower_3;
318 318
   void recalc_delta_settings(float radius, float diagonal_rod);
319 319
 #elif IS_SCARA
320
-  extern float axis_scaling[ABC];  // Build size scaling
321 320
   void forward_kinematics_SCARA(const float &a, const float &b);
322 321
 #endif
323 322
 

+ 5
- 19
Marlin/Marlin_main.cpp Bestand weergeven

@@ -253,7 +253,6 @@
253 253
  * M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
254 254
  * M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
255 255
  * M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
256
- * M365 - SCARA calibration: Scaling factor, X, Y, Z axis
257 256
  * ************* SCARA End ***************
258 257
  *
259 258
  * ************ Custom codes - This can change to suit future G-code regulations
@@ -505,8 +504,7 @@ static uint8_t target_extruder;
505 504
               L2_2 = sq(float(L2));
506 505
 
507 506
   float delta_segments_per_second = SCARA_SEGMENTS_PER_SECOND,
508
-        delta[ABC],
509
-        axis_scaling[ABC] = { 1, 1, 1 };    // Build size scaling, default to 1
507
+        delta[ABC];
510 508
 #endif
511 509
 
512 510
 float cartes[XYZ] = { 0 };
@@ -5750,8 +5748,8 @@ inline void gcode_M303() {
5750 5748
     if (IsRunning()) {
5751 5749
       //gcode_get_destination(); // For X Y Z E F
5752 5750
       forward_kinematics_SCARA(delta_a, delta_b);
5753
-      destination[X_AXIS] = cartes[X_AXIS] / axis_scaling[X_AXIS];
5754
-      destination[Y_AXIS] = cartes[Y_AXIS] / axis_scaling[Y_AXIS];
5751
+      destination[X_AXIS] = cartes[X_AXIS];
5752
+      destination[Y_AXIS] = cartes[Y_AXIS];
5755 5753
       destination[Z_AXIS] = current_position[Z_AXIS];
5756 5754
       prepare_move_to_destination();
5757 5755
       //ok_to_send();
@@ -5800,15 +5798,6 @@ inline void gcode_M303() {
5800 5798
     return SCARA_move_to_cal(45, 135);
5801 5799
   }
5802 5800
 
5803
-  /**
5804
-   * M365: SCARA calibration: Scaling factor, X, Y, Z axis
5805
-   */
5806
-  inline void gcode_M365() {
5807
-    LOOP_XYZ(i)
5808
-      if (code_seen(axis_codes[i]))
5809
-        axis_scaling[i] = code_value_float();
5810
-  }
5811
-
5812 5801
 #endif // SCARA
5813 5802
 
5814 5803
 #if ENABLED(EXT_SOLENOID)
@@ -7407,9 +7396,6 @@ void process_next_command() {
7407 7396
         case 364:  // M364 SCARA Psi pos3 (90 deg to Theta)
7408 7397
           if (gcode_M364()) return;
7409 7398
           break;
7410
-        case 365: // M365 Set SCARA scaling for X Y Z
7411
-          gcode_M365();
7412
-          break;
7413 7399
       #endif // SCARA
7414 7400
 
7415 7401
       case 400: // M400 finish all moves
@@ -8359,8 +8345,8 @@ void prepare_move_to_destination() {
8359 8345
 
8360 8346
     static float C2, S2, SK1, SK2, THETA, PSI;
8361 8347
 
8362
-    float sx = RAW_X_POSITION(cartesian[X_AXIS]) * axis_scaling[X_AXIS] - SCARA_OFFSET_X,  //Translate SCARA to standard X Y
8363
-          sy = RAW_Y_POSITION(cartesian[Y_AXIS]) * axis_scaling[Y_AXIS] - SCARA_OFFSET_Y;  // With scaling factor.
8348
+    float sx = RAW_X_POSITION(cartesian[X_AXIS]) - SCARA_OFFSET_X,  //Translate SCARA to standard X Y
8349
+          sy = RAW_Y_POSITION(cartesian[Y_AXIS]) - SCARA_OFFSET_Y;  // With scaling factor.
8364 8350
 
8365 8351
     #if (L1 == L2)
8366 8352
       C2 = HYPOT2(sx, sy) / (2 * L1_2) - 1;

+ 12
- 44
Marlin/configuration_store.cpp Bestand weergeven

@@ -36,7 +36,7 @@
36 36
  *
37 37
  */
38 38
 
39
-#define EEPROM_VERSION "V24"
39
+#define EEPROM_VERSION "V25"
40 40
 
41 41
 // Change EEPROM version if these are changed:
42 42
 #define EEPROM_OFFSET 100
@@ -105,24 +105,21 @@
105 105
  * DOGLCD:
106 106
  *  379  M250 C    lcd_contrast (int)
107 107
  *
108
- * SCARA:
109
- *  381  M365 XYZ  axis_scaling (float x3)
110
- *
111 108
  * FWRETRACT:
112
- *  393  M209 S    autoretract_enabled (bool)
113
- *  394  M207 S    retract_length (float)
114
- *  398  M207 W    retract_length_swap (float)
115
- *  402  M207 F    retract_feedrate_mm_s (float)
116
- *  406  M207 Z    retract_zlift (float)
117
- *  410  M208 S    retract_recover_length (float)
118
- *  414  M208 W    retract_recover_length_swap (float)
119
- *  418  M208 F    retract_recover_feedrate_mm_s (float)
109
+ *  381  M209 S    autoretract_enabled (bool)
110
+ *  382  M207 S    retract_length (float)
111
+ *  386  M207 W    retract_length_swap (float)
112
+ *  390  M207 F    retract_feedrate_mm_s (float)
113
+ *  394  M207 Z    retract_zlift (float)
114
+ *  398  M208 S    retract_recover_length (float)
115
+ *  402  M208 W    retract_recover_length_swap (float)
116
+ *  406  M208 F    retract_recover_feedrate_mm_s (float)
120 117
  *
121 118
  * Volumetric Extrusion:
122
- *  422  M200 D    volumetric_enabled (bool)
123
- *  423  M200 T D  filament_size (float x4) (T0..3)
119
+ *  410  M200 D    volumetric_enabled (bool)
120
+ *  411  M200 T D  filament_size (float x4) (T0..3)
124 121
  *
125
- *  439  This Slot is Available!
122
+ *  427  This Slot is Available!
126 123
  *
127 124
  */
128 125
 #include "Marlin.h"
@@ -330,13 +327,6 @@ void Config_StoreSettings()  {
330 327
   #endif
331 328
   EEPROM_WRITE(lcd_contrast);
332 329
 
333
-  #if IS_SCARA
334
-    EEPROM_WRITE(axis_scaling); // 3 floats
335
-  #else
336
-    dummy = 1.0f;
337
-    EEPROM_WRITE(dummy);
338
-  #endif
339
-
340 330
   #if ENABLED(FWRETRACT)
341 331
     EEPROM_WRITE(autoretract_enabled);
342 332
     EEPROM_WRITE(retract_length);
@@ -520,12 +510,6 @@ void Config_RetrieveSettings() {
520 510
     #endif
521 511
     EEPROM_READ(lcd_contrast);
522 512
 
523
-    #if IS_SCARA
524
-      EEPROM_READ(axis_scaling);  // 3 floats
525
-    #else
526
-      EEPROM_READ(dummy);
527
-    #endif
528
-
529 513
     #if ENABLED(FWRETRACT)
530 514
       EEPROM_READ(autoretract_enabled);
531 515
       EEPROM_READ(retract_length);
@@ -584,10 +568,6 @@ void Config_ResetDefault() {
584 568
     planner.axis_steps_per_mm[i] = tmp1[i];
585 569
     planner.max_feedrate_mm_s[i] = tmp2[i];
586 570
     planner.max_acceleration_mm_per_s2[i] = tmp3[i];
587
-    #if IS_SCARA
588
-      if (i < COUNT(axis_scaling))
589
-        axis_scaling[i] = 1;
590
-    #endif
591 571
   }
592 572
 
593 573
   planner.acceleration = DEFAULT_ACCELERATION;
@@ -716,18 +696,6 @@ void Config_PrintSettings(bool forReplay) {
716 696
 
717 697
   CONFIG_ECHO_START;
718 698
 
719
-  #if IS_SCARA
720
-    if (!forReplay) {
721
-      SERIAL_ECHOLNPGM("Scaling factors:");
722
-      CONFIG_ECHO_START;
723
-    }
724
-    SERIAL_ECHOPAIR("  M365 X", axis_scaling[X_AXIS]);
725
-    SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
726
-    SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
727
-    SERIAL_EOL;
728
-    CONFIG_ECHO_START;
729
-  #endif // SCARA
730
-
731 699
   if (!forReplay) {
732 700
     SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
733 701
     CONFIG_ECHO_START;

+ 0
- 4
Marlin/ultralcd.cpp Bestand weergeven

@@ -1823,10 +1823,6 @@ void kill_screen(const char* lcd_msg) {
1823 1823
     #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
1824 1824
       MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &stepper.abort_on_endstop_hit);
1825 1825
     #endif
1826
-    #if IS_SCARA
1827
-      MENU_ITEM_EDIT(float74, MSG_XSCALE, &axis_scaling[X_AXIS], 0.5, 2);
1828
-      MENU_ITEM_EDIT(float74, MSG_YSCALE, &axis_scaling[Y_AXIS], 0.5, 2);
1829
-    #endif
1830 1826
     END_MENU();
1831 1827
   }
1832 1828
 

Laden…
Annuleren
Opslaan