-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sim GUI showing incorrect number of array elements for custom logged type #25
Comments
Could you compare the values in the simGUI with the actual values? That could help with diagnosing the issue. Verifying whether Also, I don't think this is the full issue, but in your struct schema definition you define |
Thanks for the detailed report! It was helpful in finding the root cause. This should be resolved by wpilibsuite/allwpilib#7346. Everything looks to be decoding properly with the exception of |
Thanks for the update and the fix! |
Reopening until the issue is fixed in a release |
Describe the bug
When using a logging annotation to log on an array of a custom type which implements
StructSerializable
, the simulation GUI shows 11 elements, but the array only contains 2 elements.To Reproduce
Steps to reproduce the behavior:
frc/robot/subsystems/vision/VisionSubsystem.java
gradlew simulateJava
in a terminal window.Telemetry/Container/Vision/LimelightInputs
in the NetworkTables box even though the array only has 2 elements.Link to code:
Expected behavior
Expecting the Sim GUI to show the correct number of elements in the array, similar to an array of
SwerveModulePosition
objects.Screenshots
Array definition:
Sim GUI:
Desktop (please complete the following information if applicable):
Project Version: 2025.1.1-beta-1
VS Code Version: 1.94.2
WPILib Extension Version: 2025.1.1-beta-1
C++ Extension Version: 1.22.9
Java Extension Version: 1.36.2024092708
Java Debug Extension Version: 0.58.2024090204
Java Dependencies Extension Version 0.24.0
Java Version: 17
Java Location: C:\Users\Public\wpilib\2025\jdk
Vendor Libraries:
PathplannerLib (2025.0.0-beta-3.1)
CTRE-Phoenix (v5) (5.34.0-beta-1)
CTRE-Phoenix (v6) (25.0.0-beta-1)
REVLib (2024.2.4)
WPILib-New-Commands (1.0.0)
Additional context
I've double-checked the
LimelightInputsStruct
type, thinking it might be improperly packing the object, or incorrectly calculating its own size, but it looks correct to me.In the absence of an official guide on implementing
StructSerialiable
for custom types, I've referred to SwerveModuleState, Pose3d, and Rotation2d's struct patterns to try and achieve the same result, but clearly I'm missing something.The text was updated successfully, but these errors were encountered: