{@inheritDoc} doesn't exist in Doxygen, so I removed instances of it from the C++ source. It isn't needed anyway because Doxygen automatically fills in base class documentation for member functions in derived classes if no documentation is given. The extension mapping for .inc files was accidentally removed during the build system changes so this commit adds it back in.
Change-Id: I599e3bdafd76ee7d78a66090d81707cda5a399d7
Fixes artf4809.
In both C++ and Java, error messages are being sent to both the console
(via stdout/stderr) and being reported via the HAL. We don't want to
remove the stdout/stderr reporting at present because users debugging only
via netconsole (e.g. using riolog) won't see the HAL-reported errors. Until
there's an alternative means to getting the HAL-reported errors to those
users, instead store the previous 5 error messages and don't duplicate them
more often than once per second.
Changes the error reporting from setErrorData() to sendError(), which
improves driver station error reporting. The "location" in C++ is given as
the immediate caller (e.g. the WPILib function). The "location" in Java is
given as the first user function in the call stack. Note the full call stack
is provided in both instances.
Change-Id: I590dd63dcb66825301ebb260aff00cd8d7d501ed
Fixed API in the following classes:
- RobotDrive
- AnalogGyro
moved some files from Athena the shared that are independant of platform
Renamed Gyro to AnalogGyro
added smart pointer constructors to RobotDrive
Change-Id: If8a1bde5aed77fd60869d1993c302dd519bc8848
The current feed forward calculation is only useful for velocity PID controllers where F, the feed forward constant, is 1 over the maximum setpoint for the output. For motion profiles which use position PID controllers, the appropriate calculation for velocity and acceleration feed forwards is different. This change allows the user to provide their own feed forward implementation without having to rewrite the entire Calculate() function.
Both default feed forward calculations are velocity feed forwards. Suggestions for sensible feed forward constants are included in the inline comments.
Change-Id: Id175786f26bd342de52a1fae89595cbeba5dfc93
Years update, references to WIND_BASE were removed, and WPILib license was
moved to the root directory of the project.
If there was already a comment block, a year range through 2016 was created
using the first year in the comment. If there was no comment block, a block
with just the year 2016 was added.
Comments were not added to files from external sources (NI, CTRE).
Change-Id: Iff4f098ab908b90b8d929902dea903de2f596acc
This allows both greater than 72 minute (2^32 * 1 us) timeouts and also
gracefully handles notifiers across the FPGA time counter rollover.
Change-Id: Ibde0b903155f60b618b0ca4d5f8f6dd49f90b020
Also provide templated varags constructor for backwards compatibility and
ease of use.
Update PIDController to use new constructor, eliminating static function
CallCalculate().
Change-Id: Iaeae95aa5953f294f5debc5fc569ef6d4684f223
This removes redundant queue code from the C++ library.
The old queue code is still needed by simulation, and as the delta between
the simulation and athena headers has grown significantly, this splits the
header into two separate files.
Change-Id: Ia76b38337a25eb9d4890b3eb9bd76b1cbda7f285
Checking the status code in the macro before "context" is used avoids
significant overhead (string processing) in the common case when the code
is zero.
Change-Id: I69b8b220187ac1ab905cdf56dde5c4b6c61101b7
All the Error and assert calls were using const ::std::string & arguments.
When provided with a char*, the compiler was creating a temporary string
object to pass in. This was triggering mallocs everywhere, even in the
fast paths.
Change-Id: Ie0ad1f240334de677618086bddd64113c56aae6e
For the previous couple of months, the PID tests have been hanging.
The reason that the tests have been hanging lies with the Notifier,
not the PID controller. Basically, a deadlock was occuring during
Notifier destruction when the notifier destructor was called while
the notifier interrupt handler was being called. Because the low-level
interrupt manager waits for the interrupt handler to finish executing before
disabling itself, the notifier destructor would not exit until the
ProcessQueue function finished. However, at the same time, the handler
was attempting to lock the queueMutex before continuing; the Notifier
destructor had locked the queueMutex while wrapping things up, meaning
that the last run of the handler would not complete until the destructor
did, resulting in a deadlock.
In order to repair this, I reduced the scope of the lock on the queueMutex
in the destructor so that it only locks when absolutely necessary. This
should work now.
This bug was likely introduced over the summer when we updated to stl
mutexes and locks, which may have messed up the original lock structure.
This likely did not affect any teams, as it can only occur if you are actively
destroying every* Notifier object present and if the destructor happens to be
called while the handler is being run.
*Note: the component of the destructor causing issues only ran if the last
Notifier object is being destroyed.
Change-Id: I38ba4e60816a2a8d523e927c25378390a0755444
This is a major restructuring of the WPILib repository to simply build
procedures and remove the remnants of Maven from everything except the
eclipse plugins. Gradle files have been largely simplified or rewritten,
taking advantage of splitting up parts of the build into separate build
files for ease of reading.
The eclipse plugins are now in a separate project, as is ntcore. All
dependencies are resolved via Maven dependencies, with the
Jenkins-maintained WPILib repo. Project structures have also been
simplified: we no longer have separate subprojects inside wpilibc and
wpilibj. Where possible, these changes hav been done with git renames,
to make sure we still have full history for all repositories. Other
unrelated subprojects have also been broken out: OutlineViewer is now a
separate project.
Change-Id: Ib4e2a6e1a2f66427a14f16612b0e0d69ed661878