Add RioLocalizerInputs to localizer_plotter
Change-Id: I7f96ce25c602892b1966b0265fc915e761c8c327
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/y2024/localizer/localizer_plotter.ts b/y2024/localizer/localizer_plotter.ts
index b5e764b..4e64a68 100644
--- a/y2024/localizer/localizer_plotter.ts
+++ b/y2024/localizer/localizer_plotter.ts
@@ -21,6 +21,8 @@
'/drivetrain', 'frc971.control_loops.drivetrain.Output');
const localizer = aosPlotter.addMessageSource(
'/localizer', 'y2024.localizer.Status');
+ const rio_inputs = aosPlotter.addMessageSource(
+ '/drivetrain', 'frc971.control_loops.drivetrain.RioLocalizerInputs');
const imu = aosPlotter.addRawMessageSource(
'/localizer', 'frc971.IMUValuesBatch',
new ImuMessageHandler(conn.getSchema('frc971.IMUValuesBatch')));
@@ -43,6 +45,12 @@
positionPlot.addMessageLine(position, ['right_encoder'])
.setColor(CYAN)
.setDrawLine(false);
+ positionPlot.addMessageLine(rio_inputs, ['left_encoder'])
+ .setColor(BROWN)
+ .setDrawLine(false);
+ positionPlot.addMessageLine(rio_inputs, ['right_encoder'])
+ .setColor(CYAN)
+ .setDrawLine(false);
// Drivetrain Velocities
@@ -98,6 +106,12 @@
voltagePlot.addMessageLine(output, ['right_voltage'])
.setColor(GREEN)
.setPointSize(0);
+ voltagePlot.addMessageLine(rio_inputs, ['left_voltage'])
+ .setColor(RED)
+ .setDrawLine(false);
+ voltagePlot.addMessageLine(rio_inputs, ['right_voltage'])
+ .setColor(GREEN)
+ .setDrawLine(false);
// Heading
const yawPlot = aosPlotter.addPlot(element);