Sfoglia il codice sorgente

地磁校准太久卡退修复

lvjincheng 3 anni fa
parent
commit
f5f953a7bd

+ 3 - 2
Assets/BowArrow/Scripts/Bluetooth/o09Axis.cs

@@ -269,11 +269,12 @@ public class o0MagneticCalibraterEllipsoidFitting//默认在无磁干扰环境
     }
     public Vector3 Update(Vector3 v)
     {
-        if (v.magnitude > 30)
-            Debug.Log(v);
+        // if (v.magnitude > 30)
+        //     Debug.Log(v);
         if (Calibration)
         {
             records.Add(v);
+            if (records.Count > 3600) records.RemoveAt(0);
             return v;
         }
         if(_CorrectMatrix != null)

+ 1 - 0
Assets/BowArrow/test-ellipse/Ellipse.cs

@@ -65,6 +65,7 @@ public class Ellipse : MonoBehaviour
 
     public void AddAndUpdatePointArray(Vector3 addPoint) {
         this.arrayList.Add(addPoint);
+        if (this.arrayList.Count > 3600) this.arrayList.RemoveAt(0);
         this.DrawPointCloud(this.arrayList);
     }