From 627298ac3a817aed119914be032971c6b40ad211 Mon Sep 17 00:00:00 2001 From: shueja-personal Date: Thu, 11 Jan 2024 12:36:42 -0800 Subject: [PATCH] Use current timestamp in NT puts --- monologue/src/generate/java/NTLogger.java.jinja | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monologue/src/generate/java/NTLogger.java.jinja b/monologue/src/generate/java/NTLogger.java.jinja index a8fc530..98f3378 100644 --- a/monologue/src/generate/java/NTLogger.java.jinja +++ b/monologue/src/generate/java/NTLogger.java.jinja @@ -4,6 +4,7 @@ package monologue; import edu.wpi.first.networktables.NetworkTableInstance; import edu.wpi.first.networktables.*; import edu.wpi.first.util.struct.Struct; +import edu.wpi.first.util.WPIUtilJNI; import edu.wpi.first.util.sendable.Sendable; import edu.wpi.first.wpilibj.DataLogManager; import edu.wpi.first.wpilibj.smartdashboard.SendableBuilderImpl; @@ -69,9 +70,9 @@ class NTLogger extends GenericLogger { {%endif%} } {%if t.TypeName == 'IntegerArray'%} - NetworkTablesJNI.set{{t.java.EntryName}}(published.get(entryName), 0, toLongArray(value)); + NetworkTablesJNI.set{{t.java.EntryName}}(published.get(entryName), WPIUtilJNI.now(), toLongArray(value)); {%else%} - NetworkTablesJNI.set{{t.java.EntryName}}(published.get(entryName), 0, value); + NetworkTablesJNI.set{{t.java.EntryName}}(published.get(entryName), WPIUtilJNI.now(), value); {%endif%} }