Skip to content

Commit 991f058

Browse files
cfinn68916pjbuterbaugh
authored andcommitted
Add c++ counterparts for java shuffleboard snippets (#2299)
* Add c++ counterparts for java shuffleboard snippets * Add frc:: to c++ examples
1 parent bdcd855 commit 991f058

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

source/docs/software/dashboards/shuffleboard/layouts-with-code/sending-data.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Sending simple data (numbers, strings, booleans, and arrays of these) is done by
1515

1616
.. code-tab:: c++
1717

18-
Shuffleboard::GetTab("Numbers")
18+
frc::Shuffleboard::GetTab("Numbers")
1919
.Add("Pi", 3.14);
2020

2121
If data needs to be updated (for example, the output of some calculation done on the robot), call ``getEntry()`` after defining the value, then update it when needed or in a ``periodic`` function
@@ -52,6 +52,11 @@ Simply using `addPersistent` instead of `add` will make the value saved on the r
5252
Shuffleboard.getTab("Drive")
5353
.addPersistent("Max Speed", 1.0);
5454

55+
.. code-tab:: c++
56+
57+
frc::Shuffleboard::GetTab("Drive")
58+
.AddPersistent("Max Speed", 1.0);
59+
5560
Sending sensors, motors, etc
5661
----------------------------
5762

@@ -63,3 +68,8 @@ Analogous to ``SmartDashboard.putData``, any ``Sendable`` object (most sensors,
6368

6469
Shuffleboard.getTab("Tab Title")
6570
.add("Sendable Title", mySendable);
71+
72+
.. code-tab:: c++
73+
74+
frc::Shuffleboard::GetTab("Tab Title")
75+
.Add("Sendable Title", mySendable);

0 commit comments

Comments
 (0)