mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Shuffleboard SimpleWidget: Return pointer instead of reference (#4703)
Based on beta test feedback, returning a pointer is more intuitive, as typically the return value is late bound to an instance variable.
This commit is contained in:
@@ -31,10 +31,10 @@ class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
void RobotInit() override {
|
||||
// Add a widget titled 'Max Speed' with a number slider.
|
||||
m_maxSpeed = &frc::Shuffleboard::GetTab("Configuration")
|
||||
.Add("Max Speed", 1)
|
||||
.WithWidget("Number Slider")
|
||||
.GetEntry();
|
||||
m_maxSpeed = frc::Shuffleboard::GetTab("Configuration")
|
||||
.Add("Max Speed", 1)
|
||||
.WithWidget("Number Slider")
|
||||
.GetEntry();
|
||||
|
||||
// Create a 'DriveBase' tab and add the drivetrain object to it.
|
||||
frc::ShuffleboardTab& driveBaseTab = frc::Shuffleboard::GetTab("DriveBase");
|
||||
|
||||
Reference in New Issue
Block a user