Oblarg
21e957ee42
Add DifferentialDrive voltage constraint ( #2075 )
2019-11-21 21:43:02 -08:00
Oblarg
e0bc97f66b
Add ProfiledPIDSubsystem example ( #2076 )
2019-11-21 20:55:16 -08:00
CTT
a58dbec8aa
Add holonomic follower examples ( #2052 )
2019-11-21 19:52:56 -08:00
Tyler Veness
9a8067465c
Fix incomplete .styleguide ( #2113 )
...
Also clean up other .styleguides.
Fixes #2111 .
2019-11-20 22:44:18 -08:00
Tyler Veness
ffa4b907c0
Fix C++ floating point literal formatting ( #2114 )
...
Found formatting errors with this regex
"([^a-z0-9\.]\.[0-9]|[^a-z0-9\.][0-9]\.[^a-z0-9\.])" and ignored false
positives.
Fixes #2112 .
2019-11-20 21:48:15 -08:00
Oblarg
fa85fbfc1c
Template C++ TrapezoidProfile and ProfiledPIDController on units ( #2109 )
2019-11-20 20:11:46 -08:00
Austin Shalit
c0e36df9d8
Standardize on PWMVictorSPX in examples ( #2104 )
2019-11-19 21:48:22 -08:00
Thad House
500c43fb84
Add examples for DMA, DutyCycle, DutyCycleEncoder and AddressableLED ( #2100 )
2019-11-18 22:12:17 -08:00
Prateek Machiraju
5891628112
Use DifferentialDriveWheelSpeeds in RamseteCommand ctor ( #2091 )
2019-11-18 22:11:05 -08:00
Prateek Machiraju
841ef91c0f
Use gyro angle instead of robot angle for odometry ( #2081 )
...
The odometry classes previously took in the robot angle as an argument, meaning that users had to take care of offsetting the gyro themselves to accurately report the robot angle. This change will make it so that users will not have to worry about resetting gyros and adding offsets themselves, as this will be handled by the odometry classes.
2019-11-15 17:34:10 -08:00
Tyler Veness
1b66ead49d
Use standard constant for pi instead of 3.14 ( #2084 )
2019-11-15 17:33:18 -08:00
Prateek Machiraju
55a7f2b4ad
Add template for old command-based style ( #2031 )
2019-11-10 23:20:33 -08:00
CTT
486fa9c696
Add XboxController examples for arcade and tank drive ( #2058 )
2019-11-10 22:53:17 -08:00
Oblarg
7dc7c71b58
Add feedforward components ( #2045 )
...
Add helper classes for computing feedforwards with parameters supplied by the characterization tool.
2019-11-09 20:16:42 -08:00
Thad House
629e95776a
Add VendorDeps JSON files for command libraries ( #2048 )
...
Add commandversion flag to the examples and templates json files.
2019-11-07 17:38:07 -08:00
Peter Johnson
7508aada93
Add ability to end startCompetition() main loop ( #2032 )
...
This is useful for both cleanly exiting from simulation and for unit testing
at a framework level.
This change required removing move constructor/assignment from IterativeRobot.
2019-11-05 21:33:09 -08:00
Austin Shalit
114ddaf81f
Fix duplicate encoders in examples ( #2033 )
2019-11-03 09:08:05 -08:00
Oblarg
9ebd23d61e
Add setVoltage method to SpeedController ( #1997 )
...
Add a voltage-compensated setVoltage method to SpeedController, which is sorely needed to help teams use feedforward-based controls effectively. Also uses correct units on the cpp side.
Also update relevant examples.
2019-11-01 09:32:40 -07:00
Thad House
16b34cce20
Remove IterativeRobot templates ( #2011 )
...
With the class being deprecated, new projects shouldn't be created with it
2019-10-30 21:26:30 -07:00
Thad House
916596cb01
Fix invalid examples json, add validator ( #2001 )
2019-10-28 20:10:05 -07:00
Peter Johnson
5509a8e968
Use constexpr for all example constants
...
Also make DifferentialDriveKinematics constructor constexpr.
2019-10-28 09:19:41 -07:00
sciencewhiz
d4430b765e
Gearsbot example: Use standard argument order ( #1995 )
...
The convention is to put the subsystem last.
2019-10-27 06:28:29 -07:00
Oblarg
75438ab2ce
Add RamseteCommand ( #1951 )
2019-10-26 21:33:41 -07:00
Oblarg
cbe05e7e8a
Update ProfiledPIDController API ( #1967 )
2019-10-24 20:37:55 -07:00
Oblarg
53816155ba
Improve command decorator names ( #1945 )
2019-10-19 08:13:33 -07:00
Peter Johnson
b3398dca39
Set gradlebase correctly for all examples ( #1950 )
2019-10-18 11:39:31 -07:00
Prateek Machiraju
f405582f86
Add kinematics suite ( #1787 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
Co-authored-by: Matt <matthew.morley.ca@gmail.com >
2019-09-07 23:11:49 -05:00
Tyler Veness
ff8b8f0a8a
Remove percent tolerance from PID controller
...
It breaks the unit system badly; the tolerance member variable has
different units depending on percent vs absolute. Absolute tolerance is
a lot more natural than percent tolerance anyway.
2019-09-03 19:46:59 -07:00
Peter Johnson
761bc3ef85
Change C++ WaitCommand to use units ( #1865 )
...
Also remove unique_ptr usage.
2019-09-02 23:39:51 -07:00
Tyler Veness
2250b7fbe3
Rename GearsBotNew example to GearsBot
2019-08-28 22:08:59 -07:00
Tyler Veness
c9f9feff1f
Replace deprecated API usage in C++ examples
...
Since there is a new version of GearsBot using the new command-based
API, the old GearsBot is just removed.
PR #1842 is being included to verify this PR is correct.
2019-08-28 22:08:59 -07:00
Tyler Veness
2bdb443255
Add frc2 includes to list of "other lib" regexes ( #1855 )
2019-08-26 23:11:07 -07:00
Oblarg
076ed7770c
Add new C++ Command framework ( #1785 )
...
This is the C++ version of #1682 .
The old command framework is still available, but will be deprecated.
Due to name conflicts, the new framework is in the frc2 namespace.
Eventually (after the old command framework is removed in a future year)
it will be moved into the main frc namespace.
2019-08-25 20:55:59 -07:00
Tyler Veness
3ebc5a6d3a
Add ProfiledPIDController
2019-08-16 23:47:02 -07:00
Tyler Veness
fdc098267e
Fix compilation error in elevator trapezoid profile example ( #1826 )
...
Merging #1815 broke it, then #1814 was merged before fixing the failure.
2019-08-16 23:04:12 -07:00
Tyler Veness
a216b9e9ee
Add TrapezoidProfile example ( #1814 )
2019-08-16 22:03:44 -07:00
Tyler Veness
37d316aa09
Add C++20 std::math constants shim ( #1788 )
...
Based on http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0631r7.pdf
2019-07-31 22:15:22 -07:00
Tyler Veness
dd43109596
Deprecate frc/WPILib.h ( #1779 )
...
It drastically increases compile times and is bad style. C++ users
should be including what they use. We don't necessarily have to remove
WPILib.h, but it should at least be deprecated.
2019-07-30 00:41:14 -07:00
Tyler Veness
73ec940786
Remove SampleRobot ( #1658 )
...
SampleRobot provides no benefits over RobotBase to advanced teams and
TimedRobot is recommended for everyone else.
A skeleton template for RobotBase was added.
2019-07-15 20:09:47 -05:00
Tyler Veness
f432f65bef
Update copyright year in license to 2019 ( #1524 )
...
Also update clang-format to 6.0.
2019-05-17 17:35:09 -07:00
Thad House
c12d7729e3
Update examples to use VictorSPX's rather then Sparks ( #1521 )
2018-12-31 13:45:09 -08:00
Thad House
6e8f8be370
Make C++ examples able to run GradleRIO unit tests ( #1490 )
...
Closes #1484
2018-12-17 09:26:20 -08:00
Thad House
7d7af287f6
Add empty classes to command/classes creation ( #1479 )
...
Closes #1478
2018-12-09 21:25:37 -08:00
Jaci Brunning
90572a3cc5
Add wpilibc and wpilibj skeleton templates ( #1441 )
...
See also vscode-wpilib#132.
2018-11-29 22:15:17 -08:00
Tyler
a769d56ec1
Create C++ ShuffleBoard example ( #1438 )
2018-11-28 12:13:38 -08:00
Thad House
ef3a31aa20
Add an example of using the HAL directly ( #1374 )
...
This is useful for advanced users, and shows a few things like error messages, and DS things that are needed.
2018-11-15 19:33:50 -08:00
Austin Shalit
71e29b1d91
Remove unused import from rumble example ( #1395 )
...
This fixes a nit in #1394 .
2018-10-29 20:54:15 -07:00
Austin Shalit
f774e47c80
Add an example showing how to use a hid rumbler ( #1394 )
2018-10-29 12:37:30 -07:00
Tyler Veness
bedef476fd
Replace IterativeRobot in examples with TimedRobot ( #1310 )
...
Fixes #1309 .
2018-09-19 21:41:08 -07:00
Peter Johnson
b44f27ddfa
SendableChooser: Rename addDefault and addObject for clarity ( #1239 )
...
Rename addDefault to setDefaultOption and addObject to addOption.
The old names are still available but are marked as deprecated.
2018-08-19 01:51:17 -07:00