Преглед на файлове

fixed bug in timing measurement of touch events

Sebastian Vendt преди 6 години
родител
ревизия
adc1042557
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/src/main/java/com/motionlogger/sebastianvendt/motionlogger/RecordingActivity.java

+ 1 - 1
app/src/main/java/com/motionlogger/sebastianvendt/motionlogger/RecordingActivity.java

@@ -193,7 +193,7 @@ public class RecordingActivity extends AppCompatActivity implements SensorEventL
                     }
                 } else {
                     trackedID[0] = actionID;
-                    startTimeTouch[1] = System.nanoTime();
+                    startTimeTouch[0] = System.nanoTime();
                 }
             } else if (maskedAction == MotionEvent.ACTION_UP || maskedAction == MotionEvent.ACTION_POINTER_UP) { //ACTION_UP gets fired when the final pointer is released
                 //measure time between this event and the last touch event