last minute changes

This commit is contained in:
2024-06-11 09:55:09 +02:00
parent dc4a29eb99
commit f0f2481288
3 changed files with 5 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
private static final float SENSOR_SAMPLE_RATE = 10.0f; private static final float SENSOR_SAMPLE_RATE = 10.0f;
private static final int EXERCISE_COUNT = 5; private static final int EXERCISE_COUNT = 5;
private static int EXERCISE_VIDEO_REPETITION = 1; public static int EXERCISE_VIDEO_REPETITION = 1;
private static final float EXERCISE_SPEED_MULTIPLIER = 1.0f; private static final float EXERCISE_SPEED_MULTIPLIER = 1.0f;
@Override @Override
@@ -83,9 +83,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription); this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription);
//this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription); //this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription);
// Set the repetition count for the exercise
EXERCISE_VIDEO_REPETITION = 1;
progressCircle = findViewById(R.id.progressCircle); progressCircle = findViewById(R.id.progressCircle);
progressText = findViewById(R.id.progressText); progressText = findViewById(R.id.progressText);
progressCircle.setMax(maxProgress); progressCircle.setMax(maxProgress);

View File

@@ -16,8 +16,10 @@ import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
import com.example.fitbot.R; import com.example.fitbot.R;
import com.example.fitbot.exercise.ExerciseManager;
import com.example.fitbot.pepper.Pepper; import com.example.fitbot.pepper.Pepper;
import com.example.fitbot.util.NavigationManager; import com.example.fitbot.util.NavigationManager;
import com.example.fitbot.ui.activities.FitnessActivity;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
@@ -40,7 +42,6 @@ public class MainActivity extends AppCompatActivity {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN); WindowManager.LayoutParams.FLAG_FULLSCREEN);
startButton = findViewById(R.id.startButtonMain); startButton = findViewById(R.id.startButtonMain);
startButton.setOnClickListener(v -> { startButton.setOnClickListener(v -> {
Uri videoUri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.bicepvideo); Uri videoUri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.bicepvideo);

View File

@@ -32,7 +32,6 @@ public class InputProcessor {
private float exerciseRepetitionDurationInSeconds = 0.0f; private float exerciseRepetitionDurationInSeconds = 0.0f;
public static int exercisesRemaining = 1; public static int exercisesRemaining = 1;
private float errorCheckInterval_s; private float errorCheckInterval_s;
private int checksPerformed = 0; private int checksPerformed = 0;
private int totalChecks = 0; private int totalChecks = 0;
@@ -81,6 +80,7 @@ public class InputProcessor {
this.selfRotationVectorPaths[0] = new ArrayList<>(); this.selfRotationVectorPaths[0] = new ArrayList<>();
this.selfRotationVectorPaths[1] = new ArrayList<>(); this.selfRotationVectorPaths[1] = new ArrayList<>();
this.parentActivity = parentActivity; this.parentActivity = parentActivity;
ExerciseManager.TOTAL_REPETITIONS_PERFORMED = 0;
// Initialize each ArrayList in the array // Initialize each ArrayList in the array
} }
@@ -249,7 +249,7 @@ public class InputProcessor {
// Create socket server // Create socket server
this.server = WebServer.createServer(); this.server = WebServer.createServer();
// //
FitnessActivity.progress = 1; // FitnessActivity.progress = 1;
Log.i("MotionProcessor", "Listening for incoming connections."); Log.i("MotionProcessor", "Listening for incoming connections.");
// Check if the socket // Check if the socket