Button events in robot telemetry log

I am collecting telemetry data with the Datalog class. I have enabled collecting DS and joystick data. I am seeing all that, but I don’t see any record of any button events, unless I am misunderstanding how they should look.

What I do see right after the robot is initialized is this:

1.504079,“DS:joystick0/buttons”,
1.504079,“DS:joystick0/axes”,0;-0.0078125;0;0;0;-0.0078125
1.504079,“DS:joystick0/povs”,-1
1.504079,“DS:joystick1/buttons”,
1.504079,“DS:joystick1/axes”,0;-0.0078125;0;0;0;-0.0078125
1.504079,“DS:joystick1/povs”,-1
1.504079,“DS:joystick2/buttons”,
1.504079,“DS:joystick2/axes”,
1.504079,“DS:joystick2/povs”,
1.504079,“DS:joystick3/buttons”,
1.504079,“DS:joystick3/axes”,
1.504079,“DS:joystick3/povs”,
1.504079,“DS:joystick4/buttons”,
1.504079,“DS:joystick4/axes”,
1.504079,“DS:joystick4/povs”,
1.504079,“DS:joystick5/buttons”,
1.504079,“DS:joystick5/axes”,
1.504079,“DS:joystick5/povs”,

And I think that when a button is pressed, I get this:

28.132465,“DS:joystick1/buttons”,
28.291979,“DS:joystick1/buttons”,
49.672122,“DS:joystick1/buttons”,
49.771875,“DS:joystick1/buttons”,

My guess is that those are button down and button up events, but it doesn’t say that, and it doesn’t say which button it is. That doesn’t seem right. Am I missing a step in the code somewhere?

The buttons are stored as a boolean array (one value per button) in the DataLog file; what should be happening is they should come through as semicolon-separated boolean values in the CSV export. There may be a bug with this, I’ll look into it. Can you open an issue on the allwpilib repo on GitHub?

The bug that caused this was fixed shortly after the last 2022 release; should be fine for 2023.

1 Like

You’re right, and I was the one who committed the fix. :man_facepalming:

Any workaround?

Three options:

  1. It’s not a CSV exporter, but you can use the Python data log reader to dump the values.
  2. Grab the datalogtool development artifact. Unfortunately I’m not having good luck getting into Artifactory right now to give you a direct link, will update this post when I do.
  3. Build datalogtool yourself, using ./gradlew datalogtool:build from the allwpilib repo.

Ever find that direct link?

Windows 64-bit download (note: you’ll need to click the close button in the upper right of the login screen that this pops up)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.