Browse Source

Fix Morgan SCARA S2 calculation

Scott Lahteine 7 years ago
parent
commit
6411d65c48
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp

+ 1
- 1
Marlin/Marlin_main.cpp View File

12003
     else
12003
     else
12004
       C2 = (HYPOT2(sx, sy) - (L1_2 + L2_2)) / (2.0 * L1 * L2);
12004
       C2 = (HYPOT2(sx, sy) - (L1_2 + L2_2)) / (2.0 * L1 * L2);
12005
 
12005
 
12006
-    S2 = sqrt(sq(C2) - 1);
12006
+    S2 = sqrt(1 - sq(C2));
12007
 
12007
 
12008
     // Unrotated Arm1 plus rotated Arm2 gives the distance from Center to End
12008
     // Unrotated Arm1 plus rotated Arm2 gives the distance from Center to End
12009
     SK1 = L1 + L2 * C2;
12009
     SK1 = L1 + L2 * C2;

Loading…
Cancel
Save