Skip to content

Commit

Permalink
Update RoboTutor.java
Browse files Browse the repository at this point in the history
LogFileName includes the selected arm's name, and log the arm weight and arm matrix
  • Loading branch information
j50ju authored Oct 28, 2024
1 parent 05fa2a0 commit 986a90e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/src/main/java/cmu/xprize/robotutor/RoboTutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import java.util.Date;
import java.util.Locale;
import java.util.Objects;
import java.util.List;

import cmu.xprize.comp_intervention.data.CInterventionStudentData;
import cmu.xprize.comp_intervention.CInterventionTimes;
Expand Down Expand Up @@ -88,6 +89,7 @@
import cmu.xprize.robotutor.tutorengine.util.CrashHandler;
import cmu.xprize.robotutor.tutorengine.widgets.core.IGuidView;
import cmu.xprize.robotutor.tutorengine.util.MABHandler;
import cmu.xprize.robotutor.tutorengine.util.Arm;
import cmu.xprize.util.CDisplayMetrics;
import cmu.xprize.util.CLoaderView;
import cmu.xprize.util.IReadyListener;
Expand Down Expand Up @@ -381,6 +383,13 @@ private void initializeAndStartLogs() {

// After starting logging, select the arm name using MABHandler
armName = MABHandler.getArm(ARM_WEIGHTS_FILE, null);
List<Arm> arms = MABHandler.getarms(ARM_WEIGHTS_FILE, null);
// Use the helper methods to get the arm weight and matrix name
Float armWeight = MABHandler.getArmWeight(armName, arms);
String matrixName = MABHandler.getMatrixName(armName, arms);

// Log the arm details using Log.w for visibility
Log.w(TAG, "Selected Arm: " + armName + ", Arm Weight: " + armWeight + ", Matrix Name: " + matrixName);

// Update the log filename with the selected arm name
logFilename = logFilename.replace("default_arm", armName);
Expand Down

0 comments on commit 986a90e

Please sign in to comment.