poep
This commit is contained in:
@@ -89,11 +89,6 @@ public class PersonalMotionPreviewElement extends View {
|
|||||||
|
|
||||||
this.exercise = exercise;
|
this.exercise = exercise;
|
||||||
this.path = exercise.getPath();
|
this.path = exercise.getPath();
|
||||||
this.motionProcessor = new MotionProcessor(qiContext);
|
|
||||||
this.motionProcessor.startListening();
|
|
||||||
this.motionProcessor.setMotionDataEventHandler((processed, preprocessed, sampleIndex, sampleRate, deviceId) -> {
|
|
||||||
// TODO: Implement the calculation of the `performingPath` based on the motion data
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -105,6 +100,13 @@ public class PersonalMotionPreviewElement extends View {
|
|||||||
*/
|
*/
|
||||||
public void provideQiContext(QiContext context) {
|
public void provideQiContext(QiContext context) {
|
||||||
this.qiContext = context;
|
this.qiContext = context;
|
||||||
|
if ( this.motionProcessor != null )
|
||||||
|
this.motionProcessor.stopListening();
|
||||||
|
this.motionProcessor = new MotionProcessor(qiContext);
|
||||||
|
this.motionProcessor.startListening();
|
||||||
|
this.motionProcessor.setMotionDataEventHandler((processed, preprocessed, sampleIndex, sampleRate, deviceId) -> {
|
||||||
|
// TODO: Implement the calculation of the `performingPath` based on the motion data
|
||||||
|
});
|
||||||
saySomethingNice();
|
saySomethingNice();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user