{@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
There was a lot of duplicated code between all 7 PWM speed controllers.
This moves all the duplicated code down to a base class, that will make
it easier to add speed controllers in future years if needed again. Also
if we need to add a method to all speed controllers, we only have to do
it in 1 place, and not 7.
Change-Id: I25eb1d097c0f5f7dbd7656db2f4a30d006d50f98
Ensure the POR, PWR, and CST error bits are not set when reading the sample.
Reported by: Jared Russell, Austin Schuh
Change-Id: Ib38178d6b51880480aee86e13c16f9ba89a80693
The request is not guaranteed to be in a single packet, so it may be necessary
to perform multiple reads to get the complete request. The previous code
could unpredictably fail as it only performed a single read.
Fixes artf4817.
Change-Id: I7734a12e1a2542f5d7ca0889453c387f0bb30538
For Java, this is as simple as just adding it, as all motors already
have an implementation from MotorSafety that is correctly resolved. For
C++, I had to override StopMotor in the classes that descend from
SafePWM and explicitly call the SafePWM version. RobotDrive now calls
StopMotor on each of its SpeedControllers, instead of calling Disable or
setting the motor to 0.0 as it was doing previously.
Additional small formatting corrections to the previous commit starting
this were added.
Change-Id: Ie94565394927a910ce74bc628670ac3d658d8df9
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
initial values for m_invertedMotors is now 1
previously it was done in some of the constructors, but not all of them.
Change-Id: I2c1ce8d8a67f82d02c4c51f1c4d1aaad143f3112
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 onTarget() method uses the average error and there might not be a valid value
until the PIDController runs once. This is causing commands to bail out early in
simulation.
Change-Id: I7bac9ecb847cbe4f378385b1a6998bba10147554
The GetSmartDashboardType() function defined by GyroBase was returning the
correct "Gyro", but the overrides in AnalogGyro and ADXRS450_Gyro were
incorrectly changing this, resulting in SmartDashboard not recognizing these
as being gyros.
Additionally, AddSensor in the C++ AnalogGyro was setting the name to Gyro
rather than AnalogGyro.
Change-Id: Ib2e31cd2712cc2bc26c8082ed760175d0ee80fb6
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
Also remove m_mutex. It's no longer necessary because we ensure the automatic
thread is stopped while the set is being accessed.
Change-Id: I5994bbeba022a2ebd9e166fca369ebc8c229975c
it's not directly required to link at this time, and if you want to use a different
version of protobuf on the end-user's computer then linking their robot programs
will fail
Change-Id: I9ad7c07a17b7a332b4027adbe71be605e415bc2d
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
adds build of gz_msgs on end-user computer
This means we don't need to provide different zips for different
versions of ubuntu.
The problem was that gazebo on 14.04 comes with protobuf 2.5 but gazebo on 15.10 comes with 2.6
added a few other fixes to the install script as well
also fix dependency between simluation publishing and libwpilibcsim
building
Change-Id: I57d5a26ed7795bc61a25402e2986c6023d1d78ac
To publish the simulation zip, run ./gradlew publish -PmakeSim
Targeting Ubuntu 14.04 and 15.10 for now, with 14.04 being the
currently best supported.
Two scripts have been drafted for installing, for 14.04 and 15.10
It currently publishes to ~/releases/maven/development/simulation
There is a known bug that gz_msgs for 15.10 must be built using
protobuf 2.6, which is not the default on 14.04.
Change-Id: I6cccd601671553d30fd05bbbc79c2b7dc1efbf1d
including grabbing ntcore sources, for both
Java and C++. This will need changes made in
the wpilib promotion tasks to copy the generatd
documentation to the correct places.
Change-Id: I64590b5eda001da2cc8ae498b2b1c0fd298da284
DriverStation was being added to the singletons and also as a const
member variable. This made it so that on program exit, it was
getting double freed.
Change-Id: I87f8260615dc31d57ce7c7204c1dfde22973ad51
Reverted to old driverstation and joystick code because we're not ready
for windows drive station yet
updated paths to reflect new wpilib organization
fixed name of gazebo topic (if you want /gazebo/frc/time use ~/time)
included network tables in wpilibJavaSim
Added ds script, and improved frcsim script
always start gazebo with verbose
Change-Id: I3c54b7000019a5985079a88200896a8069e69b86
the task allcsim will build everything
requires ntcore desktop to be built
also fixed Driverstation to match non-sim C++ API
Conflicts:
wpilibc/simulation/CMakeLists.txt
Change-Id: Id38141a5b48ed7fe064c7e6c8d2f618481b7e298