Thad House
b88369f5e8
Move deprecation warning for SampleRobot to constructor ( #1503 )
...
This way, the warning doesn't occur when including wpilib.h
Closes #1501
2018-12-24 15:46:12 -06:00
Thad House
ce6f1d0588
Change deperecation year for serial port direct constructor ( #1504 )
2018-12-24 15:17:19 -06:00
Tyler Veness
41596608cc
Suppress Watchdog's generic timeout message in MotorSafety ( #1486 )
2018-12-14 10:53:33 -08:00
Nicolas Machado
ff58c5156a
Change SmartDashboard type of PIDBase.cpp to match PIDBase.java ( #1470 )
2018-12-07 19:40:31 -08:00
Tyler Veness
6d4326a560
Rate-limit Watchdog timeout prints to 1Hz ( #1459 )
2018-12-07 19:39:02 -08:00
Sam Carlberg
97ba195b88
Fix LiveWindow attempting to start listeners on uninitialized sendables ( #1463 )
...
Additionally adds a defensive check in SendableBuilderImpl to avoid the NPE.
2018-12-07 19:38:22 -08:00
Dustin Spicuzza
b64dfacff3
DriverStation: fix error checking for GetXXXAxis and GetXXXPov ( #1469 )
...
Fixes #1436
2018-12-06 22:31:14 -08:00
Peter Johnson
dcbf02a1ec
Update auto SPI for timestamp changes ( #1457 )
...
The 2019 FPGA image switched the output of auto SPI from plain bytes to a
sequence of 32-bit words (timestamp, then words with the byte values in the
least significant byte of each word).
In addition to changing the HAL and simulators to reflect this, add piecewise
integration support to wpilibc/wpilibj SPI to take advantage of the timestamps
and use it in the ADXRS450 gyro.
2018-12-06 22:29:20 -08:00
Tyler Veness
26e8e587f9
MotorSafety: Use Watchdog instead of DS class polling ( #1442 )
2018-12-01 01:34:52 -08:00
Tyler Veness
3b33abfc7b
Make Watchdog use single thread dispatch ( #1347 )
...
Notifier has one thread per instance because the callbacks must be
asynchronous. Watchdog callbacks can be synchronous, so this overhead
can be done away with via a scheduler thread akin to what the HAL
Notifier does.
2018-12-01 00:05:33 -08:00
Sam Carlberg
6f0c185a05
Add methods to change the selected tab in the Shuffleboard app ( #1448 )
2018-11-27 22:12:50 -08:00
Tyler Veness
acb786a791
Remove MotorSafetyHelper, create MotorSafety base class instead ( #562 )
...
Most of the MotorSafety implementation was moved into the MotorSafety base
class. SafePWM's inheritance of MotorSafety was moved into PWM to
eliminate Java needing a helper class.
In Java, a helper class for Sendable (SendableImpl) was added due to
lack of multiple inheritance.
2018-11-22 21:15:26 -08:00
Sam Carlberg
45f4472d42
Add mechanism to control Shuffleboard recordings and add event markers ( #1414 )
2018-11-18 23:15:30 -08:00
Austin Schuh
9207d788ab
Convert ReadInterrupt* to return int64_t time ( #1417 )
...
HAL_ReadInterruptRisingTimestamp and HAL_ReadInterruptFallingTimestamp
return time as a double. Instead, keep the raw integer count and move the
double conversion into the C++ and Java code. This enables comparison of the
time with other timers.
2018-11-15 21:22:03 -08:00
Tyler Veness
63775362fe
Remove SynchronousPID class ( #1429 )
...
PR #1300 supersedes it, but won't be merged until the 2020 season. Since
SynchronousPID hasn't been used during a season, it would be best to
just remove it to avoid breakage when we deprecate and remove it again.
2018-11-15 19:25:31 -08:00
Peter Johnson
43d188a429
RobotBase: Call cscore Shutdown() from destructor
2018-11-09 23:33:55 -08:00
Jaci Brunning
28087424ec
Add deploy directory detection ( #1400 )
...
Add Filesystem class for java and namespace methods for C++ for detecting deploy location.
2018-11-02 13:16:44 -07:00
Liam Kinne
fb557f49ea
Add missing driver station documentation ( #1388 )
2018-11-01 23:34:48 -07:00
Thad House
f0b0965f9b
Remove large HAL headers from wpilibc headers ( #1386 )
...
Now only includes the types in the wpilib headers.
Should immensely clean up intellisense.
Closes #1383
2018-10-29 12:49:17 -07:00
Tyler Veness
99e0f08a6f
Move applicable integration tests to native build as unit tests ( #1364 )
2018-10-29 00:12:38 -07:00
Thad House
9174f23f36
Remove some usages of windows.h ( #1370 )
...
For HAL and wpilib, we don't need them, especially where they were being used.
2018-10-28 22:33:55 -07:00
Redrield
9f6544fa87
Allow binding commands to POV ( #1378 )
2018-10-28 21:54:06 -07:00
Thad House
a8aacd3657
Update build setup for raspbian and debug binaries ( #1384 )
...
- Build both debug and release binaries
- Append "d" to debug libraries in the style of opencv
- Split shared and static classifiers
- Add raspbian support
2018-10-27 00:19:38 -07:00
Tyler Veness
0a2ab4f0d7
Revert change in behavior in HeldButtonScheduler ( #1381 )
...
Originally, the command was restarted every time the scheduler was
executed if the button was pressed. #1340 changed this behavior in a
breaking manner.
2018-10-20 21:25:37 -07:00
Liam Kinne
da9a575526
Rename squaredInputs to squareInputs in DifferentialDrive ( #1361 )
...
Fixes #1360 .
2018-10-13 23:10:16 -07:00
Tyler Veness
81498e6af9
Deprecate IterativeRobot in favor of TimedRobot ( #1341 )
...
Since https://github.com/wpilibsuite/allwpilib/issues/786 has been
closed as not a legitimate concern, there is now no reason to use
IterativeRobot over TimedRobot. It's a drop-in replacement that's
strictly an improvement in terms of execution jitter.
To migrate, one simply has to replace the IterativeRobot subclass in
their robot code with TimedRobot.
2018-10-04 01:02:07 -07:00
Thad House
fd82153456
Fix shuffleboard C++ tests, and run them on desktop ( #1351 )
2018-10-02 20:55:03 -07:00
Sam Carlberg
175c6c1f01
Add fluent builders for more flexibly adding data to Shuffleboard ( #1022 )
2018-09-28 01:18:18 -07:00
Tyler Veness
a732854866
Clean up edge detection logic in ButtonScheduler subclasses ( #1340 )
...
This also changes the behavior of whileActive to call start once on the starting edge
instead of every loop iteration.
2018-09-26 22:55:34 -07:00
Tyler Veness
6171856020
Document Watchdog epochs better ( #1345 )
2018-09-26 22:53:34 -07:00
Tyler Veness
8b1274d744
Replace typedefs in C++ with using declarations ( #1339 )
...
These are more readable than typedefs. C headers were left alone.
2018-09-26 00:09:25 -07:00
Tyler Veness
1aa8446725
Add move constructors and assignment operators to wpilibc ( #1314 )
...
Fixes #898 .
2018-09-24 00:08:25 -07:00
Tyler Veness
467c9fd686
Add kInvalid value to HAL_I2CPort and HAL_SPIPort ( #1329 )
...
This allows HAL_CloseI2C() and HAL_CloseSPI() to be noops, which makes
enabling move semantics in the I2C and SPI wpilibc classes easier and
cleaner.
Fixes #1328 .
2018-09-23 21:14:04 -07:00
Tyler Veness
b505bbefd1
Rename variable in SPI class not compliant with style guide ( #1330 )
...
Also rename some wpilibj SPI class variables to match wpilibc and
better communicate their intent.
2018-09-23 18:26:02 -07:00
Thad House
d2a5aaafdd
Use external dependencies for NI and NetComm libraries ( #1304 )
...
This removes a number of large binary files from the repo and enables vendors
to depend on these libraries separately.
2018-09-19 21:57:58 -07:00
Thad House
59386635e7
Add CAN API constructor that takes explicit manufacturer and device type ( #1311 )
...
Useful for vendors wanting to use the API and make their own device parameters
2018-09-19 21:40:47 -07:00
Matt Soucy
8b5dc53cc7
Add Lambda support to InstantCommand ( #1262 )
2018-09-11 23:44:22 -07:00
Kay Kasemir
59700882f1
PIDController: Mention unit for 'period' ( #1305 )
2018-09-11 21:38:19 -07:00
Peter Johnson
67b1c85315
Notifier: properly reset HAL alarm in non-periodic case ( #1296 )
...
The loop spins otherwise.
2018-09-03 16:07:23 -07:00
Tyler Veness
0b113ad9ce
Fix some PIDCommand constructors not forwarding subsystems ( #1299 )
...
Also added missing constructor to wpilibc's InstantCommand and renamed
argument from requirement to subsystem as per
https://github.com/wpilibsuite/allwpilib/pull/1275#issuecomment-416071940 .
2018-09-02 14:18:12 -07:00
Matt Soucy
e28295fc7b
Add dependency injection of Subsystem to Command ( #1275 )
2018-08-19 19:43:21 -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
Tyler Veness
4801ae2499
Replace ellipsis characters munged by wpiformat with three periods ( #1256 )
...
The Java LinearDigitalFilter class has already been changed.
2018-07-29 19:25:26 -07:00
Peter Johnson
0e9172f9a7
Fix many errorprone warnings ( #1247 )
...
This fixes two real bugs:
- TimedRobot had a m_period that was hiding the IterativeRobotBase m_period
and was not getting initialized.
- PDPSim was swapping two parameters to getCurrent()
2018-07-29 16:47:22 -07:00
Peter Johnson
195e101816
cscore: Use Twine instead of StringRef in API ( #1244 )
2018-07-29 12:53:41 -07:00
Peter Johnson
9408fd5176
Add Doxygen comments for namespaces ( #1245 )
2018-07-29 12:49:28 -07:00
Peter Johnson
6933fefe55
Use Pimpl idiom for Scheduler
...
Particularly since Scheduler is a singleton, it makes a lot of sense to
use the pointer-to-implementation idiom to reduce header depedencies.
2018-07-28 17:34:42 -07:00
Peter Johnson
fedf828120
Command: Use SmallPtrSet for requirements instead of std::set
2018-07-28 17:34:42 -07:00
Peter Johnson
eb64ea9fc7
MotorSafetyHelper: Use SmallPtrSet instead of std::set
2018-07-28 17:34:42 -07:00
Peter Johnson
a2d314b0d9
ConditionalCommand.cpp: Remove iostream include
2018-07-28 17:34:42 -07:00