Skip to content

Commit

Permalink
Shuffleboard's getEntry() now returns a GenericEntry (#2520)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Jan 12, 2024
1 parent 2523ac5 commit ed51b46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The following example demonstrates how to create a button on your dashboard that
.. code-block:: java
ShuffleboardTab tab = Shuffleboard.getTab("Shooter");
NetworkTableEntry shooterEnable = tab.add("Shooter Enable", false).getEntry();
GenericEntry shooterEnable = tab.add("Shooter Enable", false).getEntry();
// Command Example assumed to be in a PIDSubsystem
new NetworkButton(shooterEnable).onTrue(new InstantCommand(m_shooter::enable));
Expand All @@ -58,7 +58,7 @@ The following example demonstrates how to create a button on your dashboard that
.. code-block:: c++

frc::ShuffleboardTab& tab = frc::Shuffleboard::GetTab("Shooter");
nt::NetworkTableEntry shooterEnable = tab.Add("Shooter Enable", false).GetEntry();
nt::GenericEntry& shooterEnable = *tab.Add("Shooter Enable", false).GetEntry();
// Command-based assumed to be in a PIDSubsystem
frc2::NetworkButton(shooterEnable).OnTrue(frc2::InstantCommand([&] { m_shooter.Enable(); }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Unlike ``SmartDashboard.getNumber`` and friends, retrieving data from Shuffleboa
class DriveBase extends Subsystem {
private ShuffleboardTab tab = Shuffleboard.getTab("Drive");
private NetworkTableEntry maxSpeed =
private GenericEntry maxSpeed =
tab.add("Max Speed", 1)
.getEntry();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If data needs to be updated (for example, the output of some calculation done on
class VisionCalculator {
private ShuffleboardTab tab = Shuffleboard.getTab("Vision");
private NetworkTableEntry distanceEntry =
private GenericEntry distanceEntry =
tab.add("Distance to target", 0)
.getEntry();
Expand Down

0 comments on commit ed51b46

Please sign in to comment.