Skip to content

Conversation

jasondaming
Copy link
Member

Summary

Updates the Shuffleboard documentation to recommend using lambda functions (Java) or callables (Python) with addNumber(), addString(), and addBoolean() methods for sending dynamic data, rather than the getEntry() and setDouble()/setString() pattern.

Changes

  • Replaced example code showing getEntry() pattern with lambda/callable pattern
  • Updated Java example to use addNumber() with lambda
  • Updated Python example to use addNumber() with lambda
  • Added important note clarifying that getEntry() API should only be used for reading data from Shuffleboard (sliders, text fields, etc.), not for sending data

Fixes #2617

Replaces the getEntry()/setDouble() pattern with the recommended addNumber()/addString()/addBoolean() lambda/callable pattern for sending dynamic data to Shuffleboard. Adds important note clarifying when to use each API.

Fixes wpilibsuite#2617
@sciencewhiz
Copy link
Collaborator

Given that shuffleboard API is going away in 2027 and the fact there's been lots of feedback about people not liking lambdas, I'm not sure this one is worth fixing.

@jasondaming
Copy link
Member Author

Up to you, that is fine. I would say lets start going through the issues and start weeding out the ones we don't want to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shuffleboard API docs do not mention sending data with lambda functions

2 participants