Pārlūkot izejas kodu

Minor code and comment polishing

fsantini 11 gadus atpakaļ
vecāks
revīzija
5bde7fcb28
2 mainītis faili ar 4 papildinājumiem un 10 dzēšanām
  1. 2
    6
      Marlin/Marlin_main.cpp
  2. 2
    4
      Marlin/vector_3.cpp

+ 2
- 6
Marlin/Marlin_main.cpp Parādīt failu

809
     plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
809
     plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
810
     //bedLevel.debug("bedLevel");
810
     //bedLevel.debug("bedLevel");
811
 
811
 
812
-    plan_bed_level_matrix.debug("bed level before");
812
+    //plan_bed_level_matrix.debug("bed level before");
813
     //vector_3 uncorrected_position = plan_get_position_mm();
813
     //vector_3 uncorrected_position = plan_get_position_mm();
814
     //uncorrected_position.debug("position before");
814
     //uncorrected_position.debug("position before");
815
 
815
 
816
-    // and set our bed level equation to do the right thing
817
-//    plan_bed_level_matrix = matrix_3x3::create_inverse(bedLevel);
818
-//    plan_bed_level_matrix.debug("bed level after");
819
-
820
     vector_3 corrected_position = plan_get_position();
816
     vector_3 corrected_position = plan_get_position();
821
 //    corrected_position.debug("position after");
817
 //    corrected_position.debug("position after");
822
     current_position[X_AXIS] = corrected_position.x;
818
     current_position[X_AXIS] = corrected_position.x;
824
     current_position[Z_AXIS] = corrected_position.z;
820
     current_position[Z_AXIS] = corrected_position.z;
825
 
821
 
826
     // but the bed at 0 so we don't go below it.
822
     // but the bed at 0 so we don't go below it.
827
-    current_position[Z_AXIS] = -Z_PROBE_OFFSET_FROM_EXTRUDER; // in the lsq we reach here after raising the extruder due to the loop structure
823
+    current_position[Z_AXIS] = -Z_PROBE_OFFSET_FROM_EXTRUDER;
828
 
824
 
829
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
825
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
830
 }
826
 }

+ 2
- 4
Marlin/vector_3.cpp Parādīt failu

129
 
129
 
130
 matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
130
 matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
131
 {
131
 {
132
-    vector_3 z_row = vector_3(target.x, target.y, target.z).get_normal();
132
+    vector_3 z_row = target.get_normal();
133
     vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal();
133
     vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal();
134
     vector_3 y_row = vector_3(0, 1, -target.y/target.z).get_normal();
134
     vector_3 y_row = vector_3(0, 1, -target.y/target.z).get_normal();
135
 
135
 
139
 
139
 
140
  
140
  
141
      // create the matrix already correctly transposed
141
      // create the matrix already correctly transposed
142
-    matrix_3x3 rot = matrix_3x3::create_from_rows(vector_3(x_row.x, x_row.y, x_row.z),
143
-                                vector_3(y_row.x, y_row.y, y_row.z),
144
-                                vector_3(z_row.x, z_row.y, z_row.z));
142
+    matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row);
145
 
143
 
146
  //   rot.debug("rot");
144
  //   rot.debug("rot");
147
     return rot;
145
     return rot;

Notiek ielāde…
Atcelt
Saglabāt