Commit Graph

70 Commits

Author SHA1 Message Date
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
Thad House
509819d83f Split the two command implementations into separate libraries (#2012)
This will allow us at the user code side to determine to include old commands, new commands or both.
2019-11-01 21:58:54 -07:00
Austin Shalit
a769f1f227 Fix bug in RamseteCommand (using degrees instead of radians) (#2020) 2019-11-01 13:21:02 -07: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
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
sciencewhiz
cfe23c5cd0 Fix grammar error in comment for configureButtonBindings (#1969) 2019-10-22 19:59:15 -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
sciencewhiz
7bd69e591c Fix typo in temperature (#1940) 2019-10-14 16:16:30 -07:00
Peter Johnson
471f375a38 Simplify Sendable interface (#1864)
This removes the name and subsystem from individual objects, and instead
puts this data into a new singleton class, SendableRegistry.  Much of
LiveWindow has been refactored into SendableRegistry.

In C++, a new CRTP helper class, SendableHelper, has been added to provide
move and destruction functionality.

Shims for GetName, SetName, GetSubsystem, and SetSubsystem have been added
to Command and Subsystem (both old and new), and also to SendableHelper to
prevent code breakage.

This deprecates SendableBase in preparation for future removal.
2019-09-14 15:22:54 -05: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
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
Oblarg
558c383088 Add new Java Command framework (#1682)
The old command framework is still available, but will be deprecated.

Due to name conflicts, the new framework is in the wpilibj2 package.
Eventually (after the old command framework is removed in a future year)
it will be moved into the main wpilibj package.
2019-08-25 14:47:07 -07:00
Thad House
b2861f8948 Use 2020 artifacts and artifactory server (#1838)
Uses 2020 artifacts and artifactory server, and new versioning and repository plugins.
2019-08-22 21:48:43 -07:00
Tyler Veness
3ebc5a6d3a Add ProfiledPIDController 2019-08-16 23:47:02 -07:00
Tyler Veness
a216b9e9ee Add TrapezoidProfile example (#1814) 2019-08-16 22:03:44 -07:00
Matt
95a54a0f29 Add java arcade drive example (#1810) 2019-08-09 16:19:33 -07:00
Austin Shalit
09d00a6227 Update Java examples to use new PIDController (#1809)
This also allows us to re-enable Werror.
2019-08-04 20:35:33 -07:00
Abiel Fernandez
ba9b517427 Add missing Java examples (#841) 2019-08-04 20:34:02 -07:00
Austin Shalit
df12fc2a86 Java cleanups (#1776)
* Remove extra ';'s
* Remove unnecessary conversions to String
* Use StandardCharsets object
* Replace infinite while with check for interrupted thread
* Remove redundant local vars
* Remove redundant throws clause
* Remove redundant primitive wrapping
* Fix malformed Nested class test
* Remove unnecessary unboxing
* Remove unnecessary explicit type argument
* Replace lambdas with method references
* Replace statement lambdas with expression lambdas
* Replace null check with method call
* Replace number comparison with method call
* Fix broken javadoc comments
* Replace Arrays.asList with singletonLists
* Remove excessive lambda usage
* Remove redundant string operation
* Remove redundant type casts
* Remove unnecessary returns
* Remove redundant suppressions
* Fix unresolved file reference
* static analysis fixes
2019-07-31 22:19:48 -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
Austin Shalit
f7cfdd7cee Replace crlf line endings with lf (#1731) 2019-06-28 20:55:14 -07:00
Thad House
3dfb01d45b Update to new Native Utils (#1696)
Also update to azure 2019 windows image
2019-06-28 14:09:10 -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
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 Veness
1696557c46 Fix deprecation warning in wpilibj shuffleboard example (#1427)
TimedRobot should be used instead of IterativeRobot.
2018-11-12 19:38:50 -08:00
Sam Carlberg
8be693f55d Fix list layout in shuffleboard example (#1413) 2018-11-09 01:14:15 -08:00
Austin Shalit
f774e47c80 Add an example showing how to use a hid rumbler (#1394) 2018-10-29 12:37:30 -07:00
Sam Carlberg
175c6c1f01 Add fluent builders for more flexibly adding data to Shuffleboard (#1022) 2018-09-28 01:18:18 -07:00
Thad House
d5d744a390 Fix publishing of templates on jenkins (#1343) 2018-09-26 21:10:26 -07:00
Thad House
0c58a0a705 Repackage CameraServer classes (#1321)
This is necessary for modularization.
Move the wpilibj CameraServer classes to the cameraserver package.
Move the edu.wpi.first.wpilibj.vision package to edu.wpi.first.vision.
To avoid code breakage, add deprecated copies of the wpilibj classes to the wpilibj jar.
2018-09-23 21:20:12 -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
Jeremy White
85118a023d Minor fixes required to enable the simulated robots to run (#1181)
* Fix bugs in PacGoat Java example that prevent it from working.

We have conflicting ports in use, each of which causes a crash
at startup.  These changes fix those issues.

* Change to avoid a crash in Visual C++ when running simulated code.

Without this change, we would get a crash in SendableRobotBase when
constructing a Twine from the 'kOptions' constant string;
we'd get an unable to access memory exception.
2018-07-22 00:58:42 -07:00
Thad House
80134164a4 Move Java main function from library to user code (#1148)
It is much more reliable than the old approach, as it no longer depends on a magic string
in a manifest file, and if the user changes their main class, or makes it not import from
something RobotBase, it will fail to compile instead of failing at runtime.

With requiring an importer, we should be able to automate this in the importer.
2018-07-18 22:01:19 -07:00
Thad House
064989f2e4 Fix projects having different version numbers (#1113) 2018-06-17 19:59:49 -07:00
Thad House
c7e97f45f5 Add RobotPeriodic functions to default templates. (#1149) 2018-06-10 20:16:54 -07:00
Thad House
b20158015c Update java robot class docs (#1150) 2018-06-10 20:12:41 -07:00
Austin Shalit
e548a5f705 Update and enable PMD 6.3.0 (#1107) 2018-06-03 10:00:53 -07:00
Thad House
5fcb67aaf5 Fix Checkstyle (#1095)
Broken by merge of earlier change.
2018-05-24 22:56:36 -04:00
Thad House
863cfde394 Adds tests to ensure all examples have matching item in json file (#1079)
Also checks that all items in the json file have a matching example
One was missing from C++, that example was added (The one in eclipse was completely wrong)
2018-05-24 20:08:37 -04:00
Austin Shalit
40cc743cc7 Enable checkstyle on cscore, ntcore, wpiutil (#1032)
Also update to version 8.10.
2018-05-24 00:31:04 -04:00