Skip to content

Commit

Permalink
Add more dash tunables
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrott committed Oct 8, 2023
1 parent 6115d03 commit 2584ce8
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.firstinspires.ftc.teamcode.tuning;

import com.acmerobotics.dashboard.FtcDashboard;
import com.acmerobotics.dashboard.config.reflection.ReflectionConfig;
import com.acmerobotics.roadrunner.Pose2d;
import com.acmerobotics.roadrunner.ftc.AngularRampLogger;
import com.acmerobotics.roadrunner.ftc.DriveType;
Expand Down Expand Up @@ -153,5 +155,18 @@ public static void register(OpModeManager manager) {
manager.register(metaForClass(ManualFeedbackTuner.class), ManualFeedbackTuner.class);
manager.register(metaForClass(SplineTest.class), SplineTest.class);
manager.register(metaForClass(LocalizationTest.class), LocalizationTest.class);

FtcDashboard.getInstance().withConfigRoot(configRoot -> {
for (Class<?> c : Arrays.asList(
AngularRampLogger.class,
ForwardRampLogger.class,
LateralRampLogger.class,
ManualFeedforwardTuner.class,
MecanumMotorDirectionDebugger.class,
ManualFeedbackTuner.class
)) {
configRoot.putVariable(c.getSimpleName(), ReflectionConfig.createVariableFromClass(c));
}
});
}
}

0 comments on commit 2584ce8

Please sign in to comment.