From 469bb3290d2f3cfd0a90c572fc8ab01f2cd0be53 Mon Sep 17 00:00:00 2001 From: Wispy <101812473+WispySparks@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:35:31 -0600 Subject: [PATCH] [epilogue] Add a measure's symbol to its name when logged by Epilogue (#7535) --- .../edu/wpi/first/epilogue/logging/EpilogueBackend.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/EpilogueBackend.java b/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/EpilogueBackend.java index f006a319dc..6759460fad 100644 --- a/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/EpilogueBackend.java +++ b/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/EpilogueBackend.java @@ -198,9 +198,10 @@ public interface EpilogueBackend { * * @param identifier the identifier of the data field * @param value the new value of the data field + * @param the dimension of the unit */ - default void log(String identifier, Measure value) { - log(identifier, value.baseUnitMagnitude()); + default void log(String identifier, Measure value) { + log(identifier, value, value.baseUnit()); } /** @@ -212,7 +213,7 @@ public interface EpilogueBackend { * @param the dimension of the unit */ default void log(String identifier, Measure value, U unit) { - log(identifier, value.in(unit)); + log(identifier + " (" + unit.symbol() + ")", value.in(unit)); } /**