fixies, animation, say
This commit is contained in:
@@ -39,4 +39,3 @@ public class EndScreenActivity extends AppCompatActivity implements RobotLifecyc
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -78,7 +78,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
QiSDK.register(this, this);
|
||||
setContentView(R.layout.activity_fitness);
|
||||
videoView = findViewById(R.id.videoView);
|
||||
ExerciseManager.TOTAL_REPETITIONS_PERFORMED = 0;
|
||||
// Fill empty objects with exercise data
|
||||
this.exerciseNameTextView = findViewById(R.id.textViewFitnessTitle);
|
||||
this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription);
|
||||
@@ -176,7 +175,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
// Start checking for user movement once the video has loaded
|
||||
this.motionProcessor.startListening();
|
||||
this.motionProcessor.startCheckingUserMovement();
|
||||
this.motionProcessor.setRecording(true, 3.f);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -189,8 +187,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
EXERCISE_VIDEO_REPETITION++;
|
||||
if (progress >= 10) {
|
||||
runOnUiThread(() -> NavigationManager.navigateToActivity(this, EndScreenActivity.class));
|
||||
InputProcessor.exercisesRemaining = 1;
|
||||
progress = 1;
|
||||
// InputProcessor.exercisesRemaining = 1;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -274,7 +271,10 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
private void updateProgress() {
|
||||
progressCircle.setProgress(progress);
|
||||
progressText.setText(progress + "/" + maxProgress);
|
||||
}
|
||||
// run on new thread because if i dont network bs runs on main thread
|
||||
new Thread(() -> {
|
||||
Pepper.animate("armraise");
|
||||
}).start(); }
|
||||
|
||||
public void triggerColorBurst(boolean isGoodRep) {
|
||||
|
||||
|
@@ -25,6 +25,7 @@ public class HelpActivity extends AppCompatActivity implements RobotLifecycleCal
|
||||
|
||||
@Override
|
||||
public void onRobotFocusGained(QiContext qiContext) {
|
||||
Pepper.provideContext(qiContext, this.getClass());
|
||||
Pepper.say("Welkom bij FitBot. De robot die helpt om fit te blijven. Druk op Start om de oefening te beginnen. Ga terug naar het begin scherm door op het huisje te klikken");
|
||||
}
|
||||
|
||||
|
@@ -120,6 +120,7 @@ public class InputProcessor {
|
||||
if (this.totalChecks == 0 || this.selfRotationVectorPaths == null
|
||||
|| this.selfRotationVectorPaths.length == 0
|
||||
|| this.selfRotationVectorPaths[0] == null
|
||||
|| this.selfRotationVectorPaths[1] == null
|
||||
|| this.selfRotationVectorPaths[0].size() == 0
|
||||
|| this.selfRotationVectorPaths[1].size() == 0)
|
||||
continue;
|
||||
@@ -160,6 +161,7 @@ public class InputProcessor {
|
||||
Log.i("InputProcessor", "Moving to end screen; finished all exercises");
|
||||
// Move to end screen on main activity
|
||||
this.parentActivity.runOnUiThread(() -> NavigationManager.navigateToActivity(this.parentActivity, EndScreenActivity.class));
|
||||
// ExerciseManager.TOTAL_REPETITIONS_PERFORMED = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user